[Insight-users] Itk filter problem with vtkEdge paintbrush

Michael Xanadu xanadu.michael at googlemail.com
Fri Nov 13 03:40:03 EST 2009


Hi, finally I found the solution. The ITK filter needs to be set to unsigned
char. Short type leads to crashes:

vtkImageData *output = vtkImageData::New();
m_paintbrushRepresentation2D->GetPaintbrushDrawing()->GetPaintbrushData()->GetPaintbrushDataAsImageData(output);

typedef itk::Image<unsigned char,3> UC3DType;
typedef itk::VTKImageToImageFilter<UC3DType> VtkToItkType;
VtkToItkType::Pointer filter = VtkToItkType::New();
filter->SetInput(output);

filter->Update();





> 1. Let's take this step by step. Verify if the image is fine, before taking
> it all the way to ITK. Something like...
>
>
>
> m_paintbrushRepresentation2D->GetPaintbrushDrawing()->GetPaintbrushData()->GetPaintbrushDataAsImageData(output);
>
> vtkMetaImageWriter *writer = vtkMetaImageWriter::New();
> writer->SetInput(output);
> writer->SetFileName("image.mha");
> writer->Write();
>
>
> 2. The message "There is no source code available for the current
> location." perhaps points to the fact that you aren't building all your
> libraries for the debug mode. There must be some point in the stack trace
> where there is source code. What is the last such point.
>
> karthi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091113/bba6de27/attachment.htm>


More information about the Insight-users mailing list