Skip to content

Try to set model origin when extracting contour from image.

Yumin Yuan requested to merge yumin/smtk:image-model-origin into master

If there is no entities with tessellation in the model before this op, we will try to set the origin of the model to be center of the image bounds if it is valid. The reason is that by default a new model's origin is (0, 0, 0), and its feature size is 1e-6, so if the image that these contours are extracted from has large coordinates numbers, the actual projected points in storage will have very big numbers (see pmodel::projectPoint) which could lead the finding of point coordinates from vtk to points in storage difficult, for example, pmodel::splitModelEdgeAtModelVertex, which is used by SplitEdge op to find an edge point given coordinates converted from VTK to do a split.

Merge request reports