[vtkusers] convert own dataset into vtkStructuredPoints

verena kinder verena.kinder at web.de
Wed Apr 6 11:30:18 EDT 2005


Hello!

This is the code :

// Model3D is our own class. This class contains a 3 dim. array of 
// unsigned int values. The model should be convert into vtkstructuredPoints
//data
Model3D * model = readRawSlices(argv[1]);
        int w= model->getWidth();
        int h= model->getHeight();
        int d= model->getDepth();

	vtkUnsignedShortArray *array =vtkUnsignedShortArray::New();
	array->SetArray(model,w*h*d,1);
	vtkStructuredPoints * data =vtkStructuredPoints ::New();
	data->GetPointData()->SetScalars(array);
	data->SetDimensions(w,h,d);
	data->SetScalarType(VTK_UNSIGNED_SHORT);
	data->SetSpacing(1.0,1.0,1.0);
	data->SetOrigin(0.0,0.0,0.0);
.....

I even don't know, if that is the right start!

Thanks
Verena
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193




More information about the vtkusers mailing list