[Insight-developers] Help With a Warning

Niels Dekker niels-xtk at xs4all.nl
Fri Jul 18 08:09:32 EDT 2008


Bill Lorensen wrote:
> I have looked at this warning on and off for the last 6 months. It is
> beyond my c++ expertise. Any ideas?
> http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=125951

[which says: itkDiffusionTensor3D.txx:77: warning: invalid conversion 
from `const float*' to `float*']

Hmmm.. very strange!  Does it only occur on DarwinG5-g++?  Maybe it 
would help to change the signature of those constructors of 
DiffusionTensor3D and SymmetricSecondRankTensor a little bit.

itkSymmetricSecondRankTensor.h(115) says:
  SymmetricSecondRankTensor(const ComponentArrayType r)

DiffusionTensor3D.h(107) says:
  DiffusionTensor3D(const ComponentArrayType r);

What about passing those arrays by reference?  As follows:

  SymmetricSecondRankTensor(const ComponentArrayType & r)
  DiffusionTensor3D(const ComponentArrayType & r);

Note that the original code (const ComponentArrayType r) just passes a 
pointer to the first array element (equivalent to const ComponentType * 
r).


HTH,
--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center 



More information about the Insight-developers mailing list