I'm trying to read a DICOM image with ITK reader then convert it into vtkimagedata for rendering.
As I convert ITK image with "itk::ImageToVTKImageFilter" and render it in vtkrenderwindow, the origin of this volume is set at center of this volume. How can I do to set the coordinate of render window same to the DICOM image?
Here's my code:
vtkSmartPointer<vtkImageData> vtkImg = ITKconnectVTK(itkImg);
vtkSmartPointer<vtkImageData> ITKconnectVTK(ImageType::Pointer inputImg)
{
ConnectorType::Pointer connector = ConnectorType::New();
connector->SetInput(inputImg);
connector->Update();
return connector->GetOutput();
}