[vtkusers] Create Structured Point Set?

Bryn Lloyd blloyd at vision.ee.ethz.ch
Wed Mar 4 09:24:58 EST 2009


this is a image with all zeros:

vtkImageData *output = vtkImageData::New();
   output->SetScalarTypeToDouble();
   output->SetDimensions(this->Dimensions);
   output->SetOrigin(this->Origin);
   output->SetSpacing(this->Spacing);
   output->AllocateScalars();
   output->GetPointData()->GetScalars()->SetName("scalars");
   output->GetPointData()->GetScalars()->FillComponent(0,0.0);


You could assign the pixel values by whatever method you want. A simple
test case can be generated by using the calculator on above image in
paraview. (write it with a vtkDataSetWriter...)


--Bryn



More information about the vtkusers mailing list