[Insight-developers] Help with Membership API change

Bill Lorensen bill.lorensen at gmail.com
Thu Jul 14 08:39:44 EDT 2011


I was reading the xml. I could not find your page on the wiki.

I guess I was looking for a simple substitution line in the document.

I just posted a gerrit topic that shows what I needed to change in one
of the apps. I have another I need to fix.

On Wed, Jul 13, 2011 at 2:24 PM, Jim Miller <millerjv at ge.com> wrote:
> Hey Bill,
> The MahalanobisDistanceMembershipFunction::MeanType and CovarianceType have
> changed. They used to be defined as vnl_vector<double> and
> vnl_matrix<double>. This was inconsistent with the
> GaussianMembershipFunction which defined them through NumericTraits on the
> measurement vector type.
> For the particular instantiations in this app, you need to use an
> itk::Vector<double, 1> and itk::VariableSizeMatrix<double>. But the
> preferred way to create these types is to use the trait
> MahalanobisDistanceMembershipFunction::MeanVectorType
> and
> MahalanobisDistanceMembershipFunction::CovarianceMatrixType
> Does the second paragraph of the "Description" in the Migration Guide not
> cover this sufficiently?
> Jim
>
>
>
> On Jul 13, 2011, at 1:38 PM, Bill Lorensen wrote:
>
> Jim,
>
> One of the ITKApp's is not compiling since your membership[
> refactoring: http://www.cdash.org/CDash/viewBuildError.php?buildid=1320298
>
> I looked at the migration guide, but I was not clear how to change the
> types. There are in this file:
> http://itk.org/gitweb?p=ITKApps.git;a=blob;f=IBSRValidation/IBSRClassification/Code/GaussianImageClassifierApp.h;h=a1302a30a9013a7bdb1668c85f3b9adae5a02715;hb=HEAD
>
> I realize it is the types for the vnl stuff that must be changed. Now
> sure of the specifics though.
>
> Here is the error I get:
> [100%] Building CXX object
> IBSRValidation/IBSRClassification/CMakeFiles/Gaussian
> IBSRClassificationApp.dir/Code/GaussianClassifierValidationApp.cxx.obj
> In file included from
> C:\lorensen\ProjectsGIT\ITKApps\IBSRValidation\IBSRClassif
> ication\Code\/GaussianImageClassifierApp.h:188:0,
>                 from
> C:\lorensen\ProjectsGIT\ITKApps\IBSRValidation\IBSRClassif
> ication\Code\/GaussianClassifierValidationApp.h:23,
>                 from
> C:\lorensen\ProjectsGIT\ITKApps\IBSRValidation\IBSRClassif
> ication\Code\GaussianClassifierValidationApp.cxx:20:
> C:\lorensen\ProjectsGIT\ITKApps\IBSRValidation\IBSRClassification\Code\/Gaussian
> ImageClassifierApp.txx: In member function 'void
> itk::GaussianImageClassifierApp
> <TVectorInputImage, TMaskImage>::Execute() [with TVectorInputImage =
> itk::Image<
> itk::Vector<short unsigned int, 1u>, 3u>, TMaskImage = itk::Image<unsigned
> char,
> 3u>]':
> C:\lorensen\ProjectsGIT\ITKApps\IBSRValidation\IBSRClassification\Code\/Classifi
> erApplicationBase.txx:70:4:   instantiated from 'void
> itk::ClassifierApplication
> Base<TParser, TClassifier, TOutputGenerator>::Execute() [with TParser =
> itk::Cla
> ssifierValidationInputParser<itk::Image<itk::Vector<short unsigned int, 1u>,
> 3u>
> , itk::Image<unsigned char, 3u> >, TClassifier =
> itk::GaussianImageClassifierApp
> <itk::Image<itk::Vector<short unsigned int, 1u>, 3u>, itk::Image<unsigned
> char,
> 3u> >, TOutputGenerator =
> itk::ClassifierValidationOutput<itk::Image<unsigned ch
> ar, 3u> >]'
> C:\lorensen\ProjectsGIT\ITKApps\IBSRValidation\IBSRClassification\Code\GaussianC
> lassifierValidationApp.cxx:166:20:   instantiated from here
> C:\lorensen\ProjectsGIT\ITKApps\IBSRValidation\IBSRClassification\Code\/Gaussian
> ImageClassifierApp.txx:128:5: error: no matching function for call to
> 'itk::Stat
> istics::MahalanobisDistanceMembershipFunction<itk::Vector<short unsigned
> int, 1u
>
> ::SetMean(vnl_vector<double>)'
>
> C:/lorensen/ProjectsGIT/ITKModular/Modules/Numerics/Statistics/include/itkMahala
> nobisDistanceMembershipFunction.txx:48:1: note: candidate is: void
> itk::Statisti
> cs::MahalanobisDistanceMembershipFunction<TVector>::SetMean(itk::Statistics::Mah
> alanobisDistanceMembershipFunction<TVector>::MeanVectorType&) [with TVector
> = it
> k::Vector<short unsigned int, 1u>,
> itk::Statistics::MahalanobisDistanceMembershi
> pFunction<TVector>::MeanVectorType = itk::Vector<double, 1u>]
> C:\lorensen\ProjectsGIT\ITKApps\IBSRValidation\IBSRClassification\Code\/Gaussian
> ImageClassifierApp.txx:131:5: error: no matching function for call to
> 'itk::Stat
> istics::MahalanobisDistanceMembershipFunction<itk::Vector<short unsigned
> int, 1u
>
> ::SetCovariance(vnl_matrix<double>&)'
>
> C:/lorensen/ProjectsGIT/ITKModular/Modules/Numerics/Statistics/include/itkMahala
> nobisDistanceMembershipFunction.txx:72:1: note: candidate is: void
> itk::Statisti
> cs::MahalanobisDistanceMembershipFunction<TVector>::SetCovariance(const
> itk::Sta
> tistics::MahalanobisDistanceMembershipFunction<TVector>::CovarianceMatrixType&)
> [with TVector = itk::Vector<short unsigned int, 1u>,
> itk::Statistics::Mahalanobi
> sDistanceMembershipFunction<TVector>::CovarianceMatrixType =
> itk::VariableSizeMa
> trix<double>]
> make[2]: ***
> [IBSRValidation/IBSRClassification/CMakeFiles/GaussianIBSRClassific
> ationApp.dir/Code/GaussianClassifierValidationApp.cxx.obj] Error 1
> make[1]: ***
> [IBSRValidation/IBSRClassification/CMakeFiles/GaussianIBSRClassific
> ationApp.dir/all] Error 2
> make: *** [all] Error 2
>
> Jim Miller
> Senior Scientist
> GE Research
> Interventional and Therapy
> GE imagination at work
>


More information about the Insight-developers mailing list