[Insight-users] Isosurface using a different image pixel type? Baffled by generic programming.

Luis Ibanez luis.ibanez at kitware.com
Wed May 25 17:03:02 EDT 2005


Hi Robet,


It is indeed very easy.

Simply pass your image through the ThresholdImageFilter
nd generate the binary image that the BinaryMask3DMeshSource needs.

For details, look at the ITK Software Guide


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


Section 6.1, pdf-page 165.


        Regards,


           Luis



------------------------
Atwood, Robert C wrote:

> This should be easy. I only wanted to change the example 
> Examples/Filtering/IsoSurfaceExtraction.cxx , as described in Section 
> 6.10.1 of the Users Guide (draft), so that the input image is a 
> different type. Since it seems like everything is templated from 
> PixelType, I would have thought that through the mechanism of Generic 
> Programming , I could change this eg. to unsigned char, and recompile. 
> However, this does not work, seemingly because BinaryMask3DMeshSource is 
> not templated over the image type, but has a built in image type of 
> <unsigned short , 3>.  I don't see this mentioned in the User Guide or 
> in the code for the example. Only the collaboration diagram from the 
> Doxygen clarifies why my program (derived from the example by changing 
> one line) does not compile.  
>  
> How should I get the image (pixel) type into the BinaryMask3DMEshSOurce 
> class ??
>  
> Robert
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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