[Insight-users] SpatialObjectToImageFilter or TriangleMeshToBinaryImageFilter?

advanced math advanced.math at gmail.com
Sun Sep 10 09:37:24 EDT 2006


Dear all,

I want to do Rasterization of a mesh to get a binary image. Seems
there 2 classes could be used, SpatialObjectToImageFilter and
TriangleMeshToBinaryImageFilter. Which one should I use? Which is
faster?

I've tried the SpatialObjectToImageFilter, but got very strange result.
First, instead of a image inside mesh set to "1", outside the mesh set
to "0", I got an image set to "1" on the surface of mesh, but "0" to
the other part of the image.

second, The class documentation indicates that by default, if the user
does not specify the size of the output image, the size of the
object's bounding box is used. However, what I got is an image much
larger than the bounding box of the mesh object.

Thanks,
Tim Lee


More information about the Insight-users mailing list