[vtkusers] vtkTrivialProducer/vtkXMLImageDataReader question

Dean Inglis dean.inglis at camris.ca
Thu Mar 22 12:53:35 EDT 2007


sorry, I accidentally posted this to KWWidgets list, but should
have gone to vtkusers...

-----Original Message-----
Of Dean Inglis
Sent: Thursday, March 22, 2007 11:50 AM
To: kwwidgets at kwwidgets.org
Subject: [KWWidgets] vtkTrivialProducer/vtkXMLImageDataReader question


scenario:

vtkXMLImageDataReader* reader;

vtkImageData* myStandAloneData;

//initialize data and reader, and read in file
// then later: 

reader->ReleaseDataFlagOn();
reader->Update();

myStandAloneData->DeepCopy( reader->GetOutput() );
myStandAloneData->Update();

reader->Delete();
reader = NULL;

At some point down my visualization pipeline,
I am running into an error with the
extents of the image data reported as being 0,-1,0,-1,0,-1:

ERROR: In vtkImageData.cxx line 1460
vtkImageData (071B3F58): GetScalarPointer: Pixel (0, 0, 15) not in memory.
Current extent = (0,-1,0,-1,0,-1)

this error does not happen if I use vtkMetaImageReader as
the reader.  Build is Windows 2000, CMake 2.4, VTK CVS, KWWidgets CVS,
Visual Studio Express 2005, static Release build.
I have tried adding a trivial producer to myStandAloneData
as in producer->SetOutput(myStandAloneData), but this does not
correct the pipeline error.  Any idea what is happening here?
The image actually displays in a vtkImageViewer2 but immediately
after rendering, the app crashes.

Dean
_______________________________________________
KWWidgets mailing list
KWWidgets at kwwidgets.org
http://public.kitware.com/cgi-bin/mailman/listinfo/kwwidgets



More information about the vtkusers mailing list