[Insight-users] [VtkEdge] Itk filter problem with vtkEdge paintbrush

Karthik Krishnan karthik.krishnan at kitware.com
Fri Nov 13 03:45:22 EST 2009


Yes. It has to match the datatype of the "output" drawing data, which
probably is UCHAR

--
karthik

On Fri, Nov 13, 2009 at 3:40 AM, Michael Xanadu <
xanadu.michael at googlemail.com> wrote:

> 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
>>
>
>
> _______________________________________________
> VtkEdge mailing list
> VtkEdge at vtkedge.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091113/f5224851/attachment.htm>


More information about the Insight-users mailing list