[Insight-users] Help-ERROR: VTKImageImport

Luis Ibanez luis.ibanez at kitware.com
Tue Mar 31 20:31:39 EDT 2009


Hi Firat,

The image that you are reading is "double", so you need
to use an appropriate image type for it.

As the error message is pointing out:

      "Input scalar type is double but should be float"

you should be able to fix this by replacing the current;

       typedef itk::Image< float, 2 > InputImageType;

with

       typedef itk::Image< double, 2 > InputImageType;



   Regards,


          Luis


----------------------------------------------------------------------------------
On Wed, Mar 25, 2009 at 8:54 AM,  <firat.sarialtun at boun.edu.tr> wrote:
>
>
> Hi. I am a new user and I have been trying to implement
> GeodesicActiveContourLevelSetImageFilter in
> ITK for the purpose of 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.
>
>
> [frat at orion build]$ ./liver
> /home/frat/Desktop/liverdata/liverDicom/GE-ser002img?00150?.dcm 1 56
> /home/frat/Desktop/outtt.jpg 650 300 5.0 1.0 -0.5 3.0 2.0 250 500
>
> terminate called after throwing an instance of 'itk::ExceptionObject'
>  what():  /usr/local/ITK/ITK/Code/BasicFilters/itkVTKImageImport.txx:251:
> itk::ERROR: VTKImageImport(0xa4206f0): Input scalar type is double but should be
> float
> Aborted
>
>
> my Code is :
>
>
>


More information about the Insight-users mailing list