[Insight-users] VTK Display Error- Need Help

Luis Ibanez luis.ibanez at kitware.com
Wed Apr 8 12:19:35 EDT 2009


Hi Firat,

The problem is probably caused by the line:

   fastMarching->SetOutputSize(
        reader->GetOutput()->GetBufferedRegion().GetSize() );

Please make sure that you call

              reader->Update()

*before* you use the size of the image produced
as output from the reader.


Regards,


     Luis


--------------------------------------
firat.sarialtun at boun.edu.tr wrote:
> 
> 
> Hi Everyone . I have been trying to implement
> GeodesicActiveContourLevelSetImageFilter in ITK for 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. my code can display the image in VTK in all steps (ITK to VTK
> conversion works well in these steps) but it gives error for the output of Fast
> marching algorithm which is needed for the initial level set for the algorithm.
> As a result when I want to display the final segmented image, it gives
> Segmentation fault. the error for the fast marching output and my code is
> below. I'd appreciate your help.
> 
> Thanks
> Firat
> 
> Error: 
> 
> ERROR: In /usr/local/VTK/VTK/Filtering/vtkStreamingDemandDrivenPipeline.cxx,
> line 698
> vtkStreamingDemandDrivenPipeline (0x91a8a88): The update extent specified in the
> information for output port 0 on algorithm vtkImageMapToColors(0x91a85c8) is 0
> 511 0 511 0 0, which is outside the whole extent 0 -1 0 -1 0 0.
> 
> ERROR: In /usr/local/VTK/VTK/Filtering/vtkImageData.cxx, line 1473
> vtkImageData (0x91a6c18): GetScalarPointer: Pixel (0, 256, 0) not in memory.
>  Current extent= (0, -1, 0, -1, 0, 0)
> 
> ERROR: In /usr/local/VTK/VTK/Filtering/vtkImageData.cxx, line 1473
> vtkImageData (0x91a6c18): GetScalarPointer: Pixel (0, 0, 0) not in memory.
>  Current extent= (0, -1, 0, -1, 0, 0)
> 
> Segmentation fault
> 
> 
> 
> 


More information about the Insight-users mailing list