[Insight-users] Displaying active Shape model

Kishore Mosaliganti kishoreraom at gmail.com
Mon Nov 16 16:23:29 EST 2009


Hi John,

I did that same process once before.

You do need to ensure that your binary training images are aligned
before using the PCAShapeModelEstimator else your shape model will be
inaccurate. You can try doing some binary image registration methods
in ITK for that.

Once you do that, you can insert them as training images and set the
number of principal components you want. See below:

    // Input to PCAShapeEstimator
    EstimatorType::Pointer shapeEstimator = EstimatorType::New();
    shapeEstimator->SetNumberOfTrainingImages( count );
    shapeEstimator->SetNumberOfPrincipalComponentsRequired( numOfPrinComp );

    // Input the training images
    for ( unsigned int i = 0 ; i < count; i++ )
      shapeEstimator->SetInput( i , shapes[i] );
    shapeEstimator->UpdateLargestPossibleRegion();

    // Get the eigen values
    itk::Array< double > eigen( labelMap->GetNumberOfLabelObjects() - 1 );
    eigen = shapeEstimator->GetEigenValues();

    // Generates the PCA models
    output = shapeEstimator->GetOutput(i);


To get the different shape modes, you will then have to add the mean
shape with the principal component shapes scaled by their eigen
values.



Kishore



On Sun, Nov 15, 2009 at 7:23 PM, John Durkin <jrd5084 at psu.edu> wrote:
> Dear Luis and Insight community,
>
>
> I have made an active shape model using itkImagePCAShapeModelEstimator and I
> would like to verify its correctness.  In the itk guide there is an image of
> the corpus callosum mean shape and the first two standard deviations of the
> first two principal components.  I was wondering if someone could tell me
> how to genereate these images using my shape model.
>
> Also when creating my model from my binary training images, should I try to
> allign them using a few landmarks?
>
> Thanks,
>
> John Durkin
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list