[IGSTK-Developers] igstkImageReader & ImageSpatialObject

Andinet Enquobahrie andinet.enqu at kitware.com
Thu Sep 8 13:32:02 EDT 2005


Hello Patrick,

You have brought up important points.  Before I comment on  each  item, 
I want to mention as a general remark that some of these 
inconsistencies/confusions are partly due to the new image reader 
classes design. As we go further along the development, these flaws will 
be flushed out.

For example, in the ImageSpatialObject classs, igstkImageReader should 
be used instead of igstkCTImageReader class.

> I have some question about the design of these two classes.
> It seems that the igstkImageReader is essentially a 
> itkImageToVTKFilter, and the inheritance relation is:
> igstkImageReader <-- igstkDICOMImageReader <-- igstkCTImageReader
> and in the igstkImageSpatialObject it uses the CTImageReader and the 
> GetVTKImage() method to pass the data to 
> ImageSpatialObjectRepresentation. the internal itkImageSpatialObject 
> actually is not used at all.
> Here is my question:
> 1. If we encapsulate the Reader Class into the ImageSpatialObject, it 
> will be very hard to extend. (if people wants to read in other kind of 
> data). So I think we should separate them and use the 
> internalitkImageSpatialObject->SetImage() method to pass the image 
> data from reader to igstkImageSpatialObject

I don't think this would be a problem once we replace the CTImageReader 
with ImageReader class. The new ImageReader class is templated over 
input image data type. It was designed this way so that we can handle 
different types of data.

>
> 2. itkImageToVTKFilter is actually a filter, need input image, it 
> behaves differently from ImageReader. I think we should not make this 
> class to be the base class of igstkImageReader. instead, put it into 
> the igstkImageSpatialObjectRepresentation. then we can use this filter 
> and the igstkImageSpatialObject->GetImage() method to filter the data 
> to VTKImageData and create actor for it.
>
I am not sure if I understood this question. igstk::ImageReader is 
derived from itk:Object. itkImageToVTKfilter is not the base class of 
ImageReader...

> 3. Also the igstkImageSpatialObjectRepresentation class may be need to 
> branch into two class: igstkImageSpatialObject2DRepresentation and 
> igstkImageSpatialObject3DRepresentation. b/z we need implement 
> different rendering method for 2D (slice) and for 3D (volume or surface).

Good point....

> 4. Also some small requirements: logger need to be added to 
> igstkImageSpatialObject; testing program need to be added for 
> igstkImageSpatialObjectRepresentation

These are missing  components...especially test programs are critical. 
We shouldn't add new classes/filters without an accompanying test 
program....

cheers,
-Andinet




More information about the IGSTK-Developers mailing list