[Insight-users] ImagePCAShapeModelEstimator

Zachary Pincus zpincus at stanford.edu
Wed Mar 9 16:03:30 EST 2005


The output is not normalized. Recalling that the the standard deviation 
of a Principal Component is the square root of the corresponding 
eigenvector, we can simply multiply each image output of the 
ImagePCAShapeModelEstimator by the square root of the corresponding 
eigenvector, which the ImagePCAShapeModelEstimator reports.

I do the multiplication with a functor, but you could use an iterator 
if you prefer.

Here's my multiplication functor. I don't think ITK has a 
MultiplyImageFilter, but if it does you could use that instead.

   template<class TInput, class TOutput> struct MultiplyFunctor {
     double Multiplier;
     TOutput operator() (const TInput &value) { return value * 
Multiplier;}
   };

   typedef MultiplyFunctor<OutputPixelType, OutputPixelType> 
MultiplyType;
   typedef itk::UnaryFunctorImageFilter<OutputImageType, 
OutputImageType, MultiplyType>
     ImageMultiplierType;

   typename ImageMultiplierType::Pointer multiplier = 
ImageMultiplierType::New();
   MultiplyType multFunctor;
   multFunctor.Multiplier = vcl_sqrt(eigenvalues[i]);
   multiplier->SetFunctor(multFunctor);
   multiplier->SetInput(m_PCAEstimator->GetOutput(i + 1));
   multiplier->Update();


Zach



On Mar 9, 2005, at 10:07 AM, Uday Kurkure wrote:

>
>
> Hello all,
>
> In the software guide on pdf page 485 it is written
> that,
>
> "Further we assume that the shape modes have been
> normalized by multiplying with the corresponding
> singular value. Hence, will can set the principal
> component standard deviations to all ones."
>
> So, is the output of the ImagePCAShapeModelEstimator
> already normalized or the user has to do it
> separately?
> If second, then what is the best way to do it?
>
> Thanks,
> -Uday
>
>
> 	
> 		
> __________________________________
> Celebrate Yahoo!'s 10th Birthday!
> Yahoo! Netrospective: 100 Moments of the Web
> http://birthday.yahoo.com/netrospective/
> _______________________________________________
> 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