42 img->GetOutput()->GetPointData()->GetScalars()->GetRange(range);
43 vtkSmartPointer<vtkImageShiftScale> scale =
44 vtkSmartPointer<vtkImageShiftScale>::New();
45 scale->SetInputConnection(img->GetOutputPort());
46 scale->SetShift(-range[0]);
47 scale->SetScale(255.0 / (range[1] - range[0]));
48 scale->SetOutputScalarTypeToUnsignedChar();
51 vtkImageData* imageData = scale->GetOutput();
53 imageData->GetDimensions(dims);
54 vtkTexture* texture = vtkTexture::New();
55 texture->InterpolateOff();
58 texture->SetInputData(imageData);
62 std::pair<float, float>(
static_cast<float>(x0),
static_cast<float>(y0));
65 vtkSmartPointer<vtkPlaneSource> plane =
66 vtkSmartPointer<vtkPlaneSource>::New();
71 this->SetInputConnection(0, plane->GetOutputPort(0));