[Insight-users] create a binary image of a mesh using SpatialObjectToImageFilter

Luis Ibanez luis.ibanez at kitware.com
Mon Dec 19 12:25:49 EST 2005


Hi Yan,


1) You can simply use an erosion filter with a structuring element
    of radius 1 and then subtract the eroded mask from the
    rasterized mask.


2) Using the TriangleMeshToBinaryImageFilter will also give you a
    rasterized mask with 1s inside and 0s outside. So, there is no
    significant difference with using the SpatialObject.


For details on how to use the Mathematical Morphology filters, please
refer to the ITK Software Guide


                http://www.itk.org/ItkSoftwareGuide.pdf



   Regards,


     Luis


-----------------
Yan Yang wrote:
> Hi All,
>  
> I used itk::SpatialObjectToImageFilter to rasterise a mesh in a 3D 
> binary image, the resulting image has 1 inside and 0 outside the mesh. 
> But I would like to get a mesh with 1 on the mesh only, that is only the 
> edges with 1, could you tell me how to do it?
>  
> BTW, can I use itk::TriangleMeshToBinaryImageFilter? What is the 
> different result between the TriangleMeshToBinaryImageFilter and the 
> SpatialObjectToImageFilter?
>  
> Thanks,
>  
> Yan
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list