[Insight-users] Error using ImagePCAShapeModelEstimator

Luis Ibanez luis.ibanez at kitware.com
Mon Oct 8 19:01:50 EDT 2007


Hi toluwase,

Your use of capitalization is inconsistent with the
actual name of the methods.


1) SetNumberofTrainingImages should be
    SetNumberOfTrainingImages  (note the capital in "Of")

2) SetNumberofPrincipalComponentsrequired should be
    SetNumberOfPrincipalComponentsRequired'
    (note the capitals in "Of" and "Required")


You may want to become familiar with the coding style and
naming standards of ITK. They are defined in the file


          Insight/Documentation/Style.pdf


    Regards,


       Luis



------------------------
toluwalase lasaki wrote:
> Hi all,
>  
> I was wondering if anyone might be able to explain to me/help me better 
> understand 2 errors I get while using the ImagePCAShapeModelEstimator. I 
> get 2 errors as follows:
>  
> *1.*      error C2039: 'SetNumberofTrainingImages' : is not a member of 
> 'itk::ImagePCAShapeModelEstimator<TInputImage,TOutputImage>'
> with
> [
> TInputImage=InputImageType,
> TOutputImage=OutputImageType
> ]
>  
> *2.*   error C2039: 'SetNumberofPrincipalComponentsrequired' : is not a 
> member of 'itk::ImagePCAShapeModelEstimator<TInputImage,TOutputImage>'
> with
> [
> TInputImage=InputImageType,
> TOutputImage=OutputImageType
> ]
>  
> Here is how I set up the ImagePCAShapeModelEstimator:
>  
> typedef itk::ImagePCAShapeModelEstimator< InputImageType,
>                  OutputImageType > EstimatorType;
>            EstimatorType::Pointer shapeestimator = EstimatorType::New();
>            shapeestimator->SetNumberofTrainingImages(6);
>            shapeestimator->SetNumberofPrincipalComponentsrequired(6);
>  
> It states in the deoxygen documentation for the 
> ImagePCAShapeModelEstimator that 'SetNumberofTrainingImages' and 
> 'SetNumberofPrincipalComponentsrequired' are public member functions: 
> http://www.itk.org/Doxygen32/html/classitk_1_1ImagePCAShapeModelEstimator.html
>  
> Can someone please explain what might be wrong. I'm fairly new to itk 
> and I'm not that good at coding in c++. I think might be 
> misunderstanding or over looking something.
>  
> Thanks in advance for your assistance.
>  
> Tomi L.
> 
> _______________________________________________
> 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