[Insight-users] How to define/work with custom structure of itkPoints?

Luis Ibanez luis.ibanez@kitware.com
Tue, 31 Dec 2002 12:11:31 -0500


Hi Parag,


1) Yes, you can customize the itk::PointSet by
    creating a specific MeshTraits for your own
    purposes.

2) The blanks to fill in are basically all the
    types inside MeshTraits.  Note that in practice
    you will only need to replace some of them.

    Typically the "PixelType"

3) For creating your filters you may want to
    follow the example of the MeshToMeshFilter
    rather than the ImageToImageFilter.

The base class is:
http://www.itk.org/Insight/Doxygen/html/classitk_1_1MeshToMeshFilter.html

Look for example at the TransformMesh filter:
http://www.itk.org/Insight/Doxygen/html/classitk_1_1TransformMeshFilter.html


Please let us know if you have further questions.


    Thanks


     Luis


---------------------------------



Parag Chandra wrote:

> Hi,
> 
>  
> 
> I currently have a data structure defined like this:
> 
>  
> 
> std::vector<itkPoint> AxisSet;
> 
> std::vector<AxisSet> LeafSet;
> 
> std::vector<LeafSet> IntersectionSet;
> 
>  
> 
> to store points of interest. This data structure will be passed around 
> as the input/output of ProcessObjects. Currently, this structure is 
> encapsulated in a class called PointsOfInterest derived from Object, and 
> I am abusing ImageToImageFilter to derive classes which produce and 
> consume PointsOfInterest objects.
> 
>  
> 
> My questions are:
> 
>  
> 
> 1) Is it possible to use PointSet with a custom MeshTraits class to 
> represent this nested hierarchy? I just need to be able to 
> set/get/address individual points like so: pointsOfInterest[set #][leaf 
> #][axis #][point #]. If not, how would I go about deriving my own custom 
> DataObject class? In other words, what 'blanks' need to be filled in?
> 
>  
> 
> 2) Given that PointsOfInterest is now a full-fledged DataObject, what 
> would be the best way to define filters that produce and/or consume 
> these PointsOfInterest objects? I am trying to use ImageToImageFilter as 
> an example, but for one thing, the input type may be completely 
> different from the output type (input Image --> output 
> PointsOfInterest). There is also a lot of code in there for handling 
> regions, but I will always guarantee that the entire PointsOfInterest 
> object is available to a filter, so it should be simpler to derive an 
> appropriate filter class.
> 
>  
> 
> By the way, I am using the 1.0 release under VC++6.
> 
>  
> 
> Thanks in advance.
> 
> -Parag Chandra
>