[Insight-users] Itk filter problem with vtkEdge paintbrush

Karthik Krishnan karthik.krishnan at kitware.com
Wed Nov 11 08:11:11 EST 2009


On Wed, Nov 11, 2009 at 7:00 AM, Michael Xanadu <
xanadu.michael at googlemail.com> wrote:

> Hi,
>
> I want to convert a vtkImageData, delivered by vtkKWEPaintbrushWidget
> respectively it's vtkKWEPaintbrushRepresentation2D, to an itk::Image:
>
>
> vtkImageData *output = vtkImageData::New();
>
> m_paintbrushRepresentation2D->GetPaintbrushDrawing()->GetPaintbrushData()->GetPaintbrushDataAsImageData(output);
>
> typedef itk::VTKImageToImageFilter<Short3DType> VtkToItkType;
> VtkToItkType::Pointer filter = VtkToItkType::New();
> filter->SetInput(output);
>
> filter->Update();
>
>
> The problem is, that the applications crashes if I call filter->Update()
> and following message is shown: "There is no source code available for the
> current location." It seems that something is wrong with the output data of
> the paintbrush. Whether the paintbrush delivers an correct image I can look
> at with a vtkImageViewer (all looks fine), the indent of that image says,
> that there's currently no image!? I guess that's the reason why the filter
> can't process the data. Does anybody know a solution?
>


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.


> Regards, Michael
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.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
>
>
--
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091111/2cb3030e/attachment-0001.htm>


More information about the Insight-users mailing list