[Insight-users] Re: [vtkusers] Porting Problem - Please Help!

gcope at engin.umich.edu gcope at engin.umich.edu
Fri, 26 Mar 2004 18:33:17 -0500


Quoting Brad King <brad.king at kitware.com>:

> gcope at engin.umich.edu wrote:
> > Brad,
> > 
> > Thanks a lot for your help. The exact error is as follows:
> > 
> > itkSparseFieldLevelSetImageFilter.txx(479) : error C2668: 'vcl_sqrt' :
> ambiguous
> > call to overloaded function
> >         C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xmemory(61)
> :
> > while compiling class-template member function 'void __thiscall
> > itk::SparseFieldLevelSetImageFilter<class itk::Image<unsigned
> short,3>,class
> > itk::Image<unsigned short,3> >::
> > UpdateActiveLayerValues(double,class itk::SparseFieldLayer<class
> > itk::SparseFieldLevelSetNode<class itk::Index<3> > > *,class
> > itk::SparseFieldLayer<class itk::SparseFieldLevelSetNode<class
> itk::Index<3> >
> > 
> >>*)'
> > 
> > 
> > Itk and Vtk both compiled fine. My program includes both Itk and Vtk
> functions,
> > and the Vtk functions compile correctly on their own.
> > 
> > Let me know if any other info would be helpful.
> 
> It looks like you are instantiating the filter with unsigned short image 
> data.  The line containing the error looks like this in the template 
> instantiation:
> 
> unsigned short v1, v2;
> ...
> vcl_sqrt(v1/v2);
> 
> This will not work very well for unsigned short data.  Given that the 
> filter is doing these kinds of calculations, I suggest you convert the 
> image to float or double for now.  I'll bring up this problem with the 
> developers to see about fixing the implementation to convert to a 
> floating point type for these calculations regardless of the pixel type.
> 
> -Brad
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 

Thanks for the help. I have one more thing that is perplexing me. I have an Itk
ConnectedThresholdImageFilter implemented that, on my original PC setup,
correctly segments a structure out of my data. On the new setup however, it
does nothing. Could this also have something to do with my data type
compatibility problems with Itk 1.4? I don't get any errors with the filter, I
just don't get the output that is found with the exact code on my originally
stated setup.

Any ideas on why this might be or how I might go about troubleshooting it? I'm
kind of at a loss at this point.

Thanks,
Jamie