[Insight-developers] Blox Images
Brad King
brad.king@kitware.com
Tue, 29 Jan 2002 16:53:45 -0500 (EST)
Hello, all:
I've briefly looked into removing the ImageTraits template arguments, and
it looks pretty easy. However, some of the changes led me to read through
the Blox image classes.
BloxBoundaryPointImage contains the following declarations:
----------------------------------------------------------------------------
/**
* Methods for getting/setting the physical image that this Blox-derived
* image stores information about.
*/
void SetSourceImage(typename TSourceImage::Pointer pSource);
/** Update parameters of the source image (origin, spacing, etc.)
* Call me before finding boundary points!! */
void UpdateSourceParameters();
/** Walk the source image, find boundary points, store them. */
void FindBoundaryPoints();
/** Method to set the threshold for detecting boundary points */
itkSetMacro(Threshold, double);
----------------------------------------------------------------------------
BloxCoreAtomImage contains the following declarations:
----------------------------------------------------------------------------
/** Set the boundary point image from which we derive core atoms. */
void SetBoundaryPointImage(typename TBoundaryPointImage::Pointer ps);
/** Walk the source image, find core atoms, store them. */
void FindCoreAtoms();
/** Find core atoms given a specific boundary point. */
void FindCoreAtomsAtBoundaryPoint(BloxBoundaryPointItem<NDimensions>* pi);
/** Do eigenanalysis on all pixels in the image. */
void DoEigenanalysis();
/** Core atom voting routine. */
void DoCoreAtomVoting();
/** Gets and sets for member variables. */
itkSetMacro(DistanceMin, double);
itkSetMacro(DistanceMax, double);
itkSetMacro(Epsilon, double);
itkSetMacro(Polarity, bool);
itkGetMacro(NumCoreAtoms, unsigned long int);
----------------------------------------------------------------------------
It appears that these classes are performing filtering right in the Image
subclass, which does not follow the pipeline mechanism. I read through
the itkBloxBoundaryPointImageTest, and it nicely sets up a pipeline to do
some processing on an image. It then forces an update, takes the output
of the pipeline, and calls SetSourceImage with it on a
BloxBoundaryPointImage which is allocated by hand. Next,
FindBoundaryPoints is called to do some processing and generate the
BloxBoundaryPointImage's data.
I think these classes should be changed to filters. A normal itk::Image
should be sufficient to store the Blox image pixels, given the proper
pixel type as its first template argument. A filter should be able to
take the source image and produce the corresponding Blox image using the
same analysis done by the FindBoundaryPoints method. The pipeline
mechanism would take care of much of the work currently implemented by
hand in the test.
-Brad