vtkImageCanvasSource2D->SetImageData()
Adrian Anner
a.anner at medres.ch
Thu Oct 28 04:24:04 EDT 1999
hi
I want to display one slice from a volume in a vtkImageCanvasSource2D.
my code :
// read the volume
vtkVolume16Reader *v16 = vtkVolume16Reader::New();
v16->SetDataDimensions(x,y);
.....
// extract one slice
vtkExtractVOI *ex = vtkExtractVOI::New();
ex->SetInput(v16->GetOutput());
ex->SetVOI(0,511,0,511,25,25);
vtkImageCanvasSource2D * bufferCanvas = vtkImageCanvasSource2D::New();
bufferCanvas->SetScalarType(3);
bufferCanvas->SetExtent( 0, 511, 0, 511, 0, 0);
bufferCanvas->SetImageData((vtkImageData *)ex);
// create imageViewer
vtkImageViewer *m_imageViewer = vtkImageViewer::New();
m_imageViewer->SetInput(bufferCanvas->GetOutput());
then I get a windows error that it couldn't read from the adress
"0x00000004".
what did I wrong ?
thanks Adrian
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
More information about the vtkusers
mailing list