[Insight-users] ImagePCAShapeModelEstimator

Reinhard Hameeteman reinhard.afstuderen at gmail.com
Thu May 18 06:36:13 EDT 2006


Dear Mr. Pincus,

Thanks for your response.
Apperantly we have different experiences in how to get the best
response form the ITK list. But of course you do have a point in the
benefit for others.

With 'documentation' I guess you mean the few doxygen lines, which
aren't very informative as to what type of images are allowed or how
the class should be used. Of course the class is templated over the
input and output types, but in ITK that does not mean all types are
allowed.
I'll start digging in the code.

Reinhard

2006/5/17, Zachary Pincus <zpincus at stanford.edu>:
> First off, these sort of questions are better addressed to the entire
> ITK list -- you'll have a better chance of a response, and others can
> benefit from having the answers archived.
>
> Now, depending on what, precisely, you mean by "do PCA on them" this
> class may work for your needs. You might need to modify it (in a
> fairly simple and trivial way) to work for vector images, though.
>
> The class just treats each image as a 1D vector, then creates the
> covariance matrix of the vectors (more or less, see the
> documentation; it makes the matrix A'A instead of AA', where A is the
> data) and finds the eigenvalues of that. I'm not sure if out-of-the-
> box it will pass vector images to the eigensolver properly, but again
> this is a pretty simple modification; please ask the ITK list if you
> need help with this.
>
> It's called a "shape model estimator" because its use in ITK is in
> the context of a shape-guided levelset algorithm (Leventon et al.),
> but it just does PCA on a set of images and returns the mean and
> eigen images. To get the coefficients for any given image, you'll
> want to use the PCADecompositionCalculator.
>
> Zach
>
>
>
> On May 17, 2006, at 8:39 AM, Reinhard Hameeteman wrote:
>
> > Dear Mr Pincus,
> >
> > Do you have any example on the use of the ImagePCAShapeModelEstimator?
> > I've got some vector images and want to do a PCA on them, but I'm not
> > sure whether this class is suited for that. From the doxygen
> > documentation I would say it is, but the name suggests it works on
> > shapes rather than voxels (scalar or vector).
> >
> > Thanks,
> > Reinhard Hameeteman
> >
> >
> > 2005/9/14, Zachary Pincus <zpincus at stanford.edu>:
> >> > Please read the ITK Software Guide
> >> >
> >> >    http://www.itk.org/ItkSoftwareGuide.pdf
> >> >
> >> > in particular section 9.3.7, in pdf-page 587 where you
> >> > will find explained in detail how to use the class:
> >> >
> >> >         itk::ImagePCAShapeModelEstimator
> >>
> >>
> >> Actually, the documentation is not particularly detailed on how to
> >> use the ImagePCAShapeModelEstimator class -- to my mind, this has
> >> been a fairly long-standing bugaboo in the software guide. It merely
> >> states that the ImagePCAShapeModelEstimator class can be used to
> >> generate a shape model. The example then proceeds to read in a pre-
> >> computed model from the command line and nowhere illustrates how to
> >> compute such a model.
> >>
> >> Nor is the doxygen particularly informative as to the precise nature
> >> of the inputs to and outputs from the shape model estimator. I'd be
> >> happy to write a paragraph for the guide, and/or fix the doxygen if
> >> anyone wants. (I also think that the computation of the shape model
> >> may be sped up significantly in some cases by use of the SVD instead
> >> of an eigen-decomposition. I'm exploring this possibility too...)
> >>
> >> For reference, you need to pass the ImagePCAShapeModelEstimator a set
> >> of signed distance function images. So if you have a set of black-
> >> and-
> >> white "mask" images representing a population of shapes, you need to
> >> convert those to signed distance maps with either the
> >> ApproximateSignedDistanceMapImageFilter class or the
> >> SignedDanielssonDistanceMapImageFilter class. Then feed these signed
> >> distance maps as the inputs to the ImagePCAShapeModelEstimator class.
> >>
> >> Zach Pincus
> >>
> >> Program in Biomedical Informatics and Department of Biochemistry
> >> Stanford University School of Medicine
> >>
> >>
> >> On Sep 8, 2005, at 4:28 PM, Luis Ibanez wrote:
> >>
> >> >
> >> > Hi Quan,
> >> >
> >> > Please read the ITK Software Guide
> >> >
> >> >    http://www.itk.org/ItkSoftwareGuide.pdf
> >> >
> >> > in particular section 9.3.7, in pdf-page 587 where you
> >> > will find explained in detail how to use the class:
> >> >
> >> >         itk::ImagePCAShapeModelEstimator
> >> >
> >> >
> >> > The source code of the associated example can be found at
> >> >
> >> >
> >> >     Insight/Examples/Segmentation/
> >> > GeodesicActiveContourShapePriorLevelSetImageFilter.cxx
> >> >
> >> >
> >> >
> >> >
> >> >    Regards,
> >> >
> >> >
> >> >       Luis
> >> >
> >> >
> >> >
> >> >
> >> > ----------------
> >> > Quan Chen wrote:
> >> >
> >> >> Just want to confirm my understanding.  The input (training image)
> >> >> to the ImagePCAShapeModelEstimator should be the level set image,
> >> >> right?  So if we have contours, we should create levelset image by
> >> >> ourselve with the zero set the contour itself before feeding to
> >> >> the PCA estimator.
> >> >>
> >> ---------------------------------------------------------------------
> >> >> ---
> >> >> _______________________________________________
> >> >> Insight-users mailing list
> >> >> Insight-users at itk.org
> >> >> http://www.itk.org/mailman/listinfo/insight-users
> >> >>
> >> >
> >> > _______________________________________________
> >> > Insight-users mailing list
> >> > Insight-users at itk.org
> >> > http://www.itk.org/mailman/listinfo/insight-users
> >> >
> >>
> >> _______________________________________________
> >> Insight-users mailing list
> >> Insight-users at itk.org
> >> http://www.itk.org/mailman/listinfo/insight-users
> >>
>
>


More information about the Insight-users mailing list