[Insight-users] discards qualifiers ...
Luis Ibanez
luis.ibanez at kitware.com
Thu Sep 29 17:49:12 EDT 2005
Hi Lagaffe,
In general in ITK a GetOutput() method returns a "const" object.
The reason is that the results of a filter and of calculators
are allocated and, more importantly, *computed* by the filter
or calculator.
Since they are computed by the provider class, you should not
attempt to change those object on your own.
For example, in this particular case, you are taking the output
of a calculator and setting it to identity !!
This initialization is pointless because it will be lost
as soon as you run the calculator.
What was your intention with calling SetIdentity() here ?
Please let us know,
Thanks
Luis
-------------
Lagaffe wrote:
> Hello,
>
> My old ITK filter (ITK2.0) doesn't compile now
> (ITK2.2) and I have no idea why ...
>
> many thanks for help
> arnaud
>
> ...
> typedef typename
> itk::Statistics::CovarianceCalculator< SampleType >
> CovarianceAlgorithmType;
> typedef typename CovarianceAlgorithmType::Pointer
> CovariancePointerType;
> CovariancePointerType *covarianceAlgorithm =
> new CovariancePointerType[NumberOfRegions];
>
>
> =>
> covarianceAlgorithm[i]->GetOutput()->SetIdentity();
>
> ERROR:
> error: passing 'const
> itk::VariableSizeMatrix<double>' as 'this' argument of
> 'void itk::VariableSizeMatrix<T>::SetIdentity() [with
> T = double]' discards qualifiers
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
> Téléchargez cette version sur http://fr.messenger.yahoo.com
> _______________________________________________
> 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