[Insight-users] Compilation error when using Insight header files and gcc4.5

Bill Lorensen bill.lorensen at gmail.com
Tue May 11 10:33:10 EDT 2010


The error says that you are violating one of the concepts required by
this filter. IN your case, the output pixel type is probably declared
as float. The connected component image filter requires an integral
outpu data type.

That said, your vtkITK code is probably trying to instantiate the
filter over the range of types that VTK supports. These types include
float and double, which are not integral.

Did you get vtkITKIslandMath.cxx from Slicer3. In the version of that
code that I have, I do not see and float or double instantiations.
Perhaps you are using an old or modified version of that code?


On Tue, May 11, 2010 at 3:52 AM, Rafael Palomar
<rafaelpalomaravalos at gmail.com> wrote:
> Hi all,
>
> I am trying to compile a software that uses Insight header files and I get
> the output below.
>
> It seems that there exist non-allowed conversions in ItkConceptChecking.h.
> Does anyone have more information on how to deal with this problem? I'm
> using the head revision of Insight in the repository.
>
> Thank you very much.
>
> Regards,
> Rafa.
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> In file included from
> /usr/local/include/InsightToolkit/Common/itkMath.h:28:0,
>                  from
> /usr/local/include/InsightToolkit/Common/itkIndex.h:24,
>                  from
> /usr/local/include/InsightToolkit/Common/itkImageRegion.h:25,
>                  from
> /usr/local/include/InsightToolkit/Common/itkImageBase.h:25,
>                  from
> /usr/local/include/InsightToolkit/Common/itkImage.h:20,
>                  from
> /home/rafa/scath/NaviAPI/libs/vtkITK/vtkITKIslandMath.cxx:23:
> /usr/local/include/InsightToolkit/Common/itkConceptChecking.h: In member
> function 'void itk::Concept::IsInteger<T>::Constraints::constraints() [with
> T = double]':
> /usr/local/include/InsightToolkit/Common/itkConceptChecking.h:686:3:
> instantiated from 'itk::Concept::IsInteger<double>'
> /usr/local/include/InsightToolkit/BasicFilters/itkConnectedComponentImageFilter.h:140:3:
> instantiated from 'itk::ConnectedComponentImageFilter<itk::Image<double,
> 3u>, itk::Image<double, 3u>, itk::Image<double, 3u> >'
> /home/rafa/scath/NaviAPI/libs/vtkITK/vtkITKIslandMath.cxx:108:44:
> instantiated from 'void vtkITKIslandMathExecute(vtkITKIslandMath*,
> vtkImageData*, vtkImageData*, T*, T*) [with T = double]'
> /home/rafa/scath/NaviAPI/libs/vtkITK/vtkITKIslandMath.cxx:171:7:
> instantiated from here
> /usr/local/include/InsightToolkit/Common/itkConceptChecking.h:681:27: error:
> conversion from 'itk::Concept::IsInteger<double>::Constraints::TrueT' to
> non-scalar type 'itk::Concept::IsInteger<double>::Constraints::IntegralT'
> requested
> /usr/local/include/InsightToolkit/Common/itkConceptChecking.h: In member
> function 'void itk::Concept::IsInteger<T>::Constraints::constraints() [with
> T = float]':
> /usr/local/include/InsightToolkit/Common/itkConceptChecking.h:686:3:
> instantiated from 'itk::Concept::IsInteger<float>'
> /usr/local/include/InsightToolkit/BasicFilters/itkConnectedComponentImageFilter.h:140:3:
> instantiated from 'itk::ConnectedComponentImageFilter<itk::Image<float, 3u>,
> itk::Image<float, 3u>, itk::Image<float, 3u> >'
> /home/rafa/scath/NaviAPI/libs/vtkITK/vtkITKIslandMath.cxx:108:44:
> instantiated from 'void vtkITKIslandMathExecute(vtkITKIslandMath*,
> vtkImageData*, vtkImageData*, T*, T*) [with T = float]'
> /home/rafa/scath/NaviAPI/libs/vtkITK/vtkITKIslandMath.cxx:172:7:
> instantiated from here
> /usr/local/include/InsightToolkit/Common/itkConceptChecking.h:681:27: error:
> conversion from 'itk::Concept::IsInteger<float>::Constraints::TrueT' to
> non-scalar type 'itk::Concept::IsInteger<float>::Constraints::IntegralT'
> requested
> make[2]: *** [libs/vtkITK/CMakeFiles/vtkITK.dir/vtkITKIslandMath.o] Error 1
> make[1]: *** [libs/vtkITK/CMakeFiles/vtkITK.dir/all] Error 2
> make: *** [all] Error 2
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list