[Insight-users] Creating a simple shape

Luis Ibanez luis.ibanez at kitware.com
Fri Feb 26 16:26:52 EST 2010


Hi Erik,

You can do this by combining of the following
two classes:


*   itk::SpatialObject (and its derived classes)
*   itk::SpatialObjectToImageFilter


You will find examples in:


   Insight/Examples/Filtering/
                   SpatialObjectToImage1.cxx
                   SpatialObjectToImage2.cxx
                   SpatialObjectToImage3.cxx


Simply use the ".nii" filename extension
when providing the filename for storing
the output image.


You will find the family of SpatialObject classes
listed in the following Doxygen page:

http://public.kitware.com/Insight/Doxygen/html/classitk_1_1SpatialObject.html


For example

* Arrow
* Box
* Ellipse




     Regards,


           Luis


--------------------------------------------------------------
On Fri, Feb 26, 2010 at 7:29 AM, Erik Tuerke <tuerke at cbs.mpg.de> wrote:
> Hi!
>
> I am searching a way to create simple shapes as cubes and balls and save it
> in format nifti.
> The nifti can be a simple binary file, so the shape has the intensity 1 and
> the surrounding space the intensity 0.
>
> Has somebody done that before and can help me?
>
> Thanks a lot!
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list