[Insight-users] Error: itkVTKImageImport
Luis Ibanez
luis.ibanez at kitware.com
Sat Mar 21 12:34:27 EDT 2009
Hi Firat,
Well,
the error message is giving you a strong hint:
> Description: itk::ERROR: VTKImageImport(0x948c9e8):
> Input scalar type is double
> but should be float
You probably instantiated the itkVTKImageImport filter using a "float"
pixel type, and at run-time you are passing to it an image whose pixel
type is "double".
So,
you have three choices:
A) Instantiate the itkVTKImageImport filter with an image
of pixel type "double"
or
B) Convert the input image from double to float
(e.g. by using a casting filter)
or
C) Use the classes described in the following
Insight Journal paper:
http://www.insight-journal.org/browse/publication/146
Regards,
Luis
------------------------------------
firat.sarialtun at boun.edu.tr wrote:
>
>
> Hi. I have been trying to implement GeodesicActiveContourLevelSetImageFilter in
> ITK for the purposeof Liver Segmentation. I modified the code in order to take
> a VTK image as input, convert it into ITK image, process it with the filter,
> then reconvert the segmented image into VTK image again. But i have faced with
> the problem below. by the way I use the type float for all input variables.
>
>
> Exception caught !
>
> itk::ExceptionObject (0x94b9fd8)
> Location: "void itk::VTKImageImport<TOutputImage>::GenerateOutputInformation()
> [with TOutputImage = itk::Image<float, 2u>]"
> File: /usr/local/ITK/ITK/Code/BasicFilters/itkVTKImageImport.txx
> Line: 251
> Description: itk::ERROR: VTKImageImport(0x948c9e8): Input scalar type is double
> but should be float
>
>
>
> Max. no. iterations: 800
> Max. RMS error: 0.02
>
> No. elpased iterations: 0
> RMS change: 0
> Done!
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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