[Insight-developers] Questions about ROI implementation

Julien Jomier jjomier@cs.unc.edu
Wed, 9 Apr 2003 21:37:35 -0400


Hi Kent,

I think BlobSpatialObject is what you need.
A BlobSpatialObject consists of a list of points that describe the boundary
of the blob.
Adding and removing points should be easy (just adding/removing from the
internal STL list).
You can take a look at itkBlobSpatialObjectTest.cxx in the testing
directory.
One suggestion, I'll keep the slice-by-slice-ROI as a 3D Blob.

Regarding your second point, you can read/write BlobSpatialObjects by using
the itkSpatialObjectReader/Writer
in Insight/Utilities/MetaIO/SpatialObject. If you need to add more features
to BlobSpatialObject, i.e deriving this class, you may have to create a new
MetaXXX and MetaXXXConverter.

Let me know if I can help with this.

Julien

> -----Original Message-----
> From: insight-developers-admin@public.kitware.com 
> [mailto:insight-developers-admin@public.kitware.com] On 
> Behalf Of Kent Williams
> Sent: Wednesday, April 09, 2003 4:29 PM
> To: Insight Developers List
> Subject: [Insight-developers] Questions about ROI implementation
> 
> 
> I'm supposed to implement an ROI (Region of Interest) type in 
> ITK.  ROIs  are 
> used in Brains2 to outline brain features, and are most often 
> manually 
> traced, slice by slice, then combined to define a solid.  So 
> basically they 
> are a list of 2D points in a slice.
> 
> I have 2 basic questions about implementing ROIs:
> 
> 1. I'll derive them from itk::SpatialObject, but is there a 
> subclass of 
> itk::SpatialObject that would be more apropos?  Looking through the 
> documentation and source code, I'm not picking up many clues. 
>  It looks like 
> it's straightforward to read in the ROI file, create 
> itk:SpatialObjectPoint 
> objects and add them as children.
> 
> It also looks as though deriving from a 2D BlobSpatialObject 
> would be close; 
> the main behavior we need to add for our purposes is a way to 
> add and remove 
> points, for interactive tracing.
> 
> 2. Is there any class I should inherit from for reading and 
> writing a file of 
> our ROI files? I know about ImageIO but I'm not seeing any 
> similar framework 
> for reading and writing spatial objects.  Should there be 
> such a framework?
> 
> _______________________________________________
> Insight-developers mailing list Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>