[vtkusers] vtk 6.0 trouble

bnsteel bnsteel at gmail.com
Fri Jul 12 15:08:51 EDT 2013


Hello,

I just migrated my application to vtk 6.0 and was hoping to find a little
help with some problems that did not exist in my code with vtk 5.10.

I load in a vti file as a vtkImageData object:

vtkSmartPointer<vtkXMLImageDataReader> reader =
vtkSmartPointer<vtkXMLImageDataReader>::New();
		reader->SetFileName(_fname);
		reader->Update();
		vtkImageData* imageData=reader->GetOutput();

		if( bufferData == NULL) {
			bufferData=vtkSmartPointer<vtkImageData>::New();
                     #ifdef  _VTK510
			bufferData->SetNumberOfScalarComponents(1);
			bufferData->SetScalarTypeToUnsignedShort();
                    #else // using vtk 6.0
			bufferData->AllocateScalars(VTK_UNSIGNED_SHORT,1);
                     #endif
		}else{
			releaseData();
			bufferData->PrepareForNewData();
		}
	
		bufferData->DeepCopy(imageData);

The resulting volume does not have any data and the render window is
unresponsive.  When I use this same bufferData in an imageViewer2, I can see
a single plane of data, but the imageViewer2 pane is responsive.

Brooke




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtk-6-0-trouble-tp5721937.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list