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 < [email protected]> 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 > [email protected] > http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge > >
_______________________________________________ VtkEdge mailing list [email protected] http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge
