The program I wrote uses itk image to read dicom image, and uses vtk to display it. What transformation should I make to make vtk display correctly? I know to use 0020 0037 tag to correct it. Can anyone tell me the detailed method?
Have you seen this? If it doesn’t help, describe your problem in more detail.
I tested your example, but I didn’t quite understand it. My requirement is this: read the dicom sequence image through itk, convert it to vtk image, and display it in mpr. Then use the vtkBorderWidget to frame the ROI, and use this ROI for the mask during registration.I packaged a tool myself, including three vtkBorderWidgets, which can be displayed in the three views of the mpr, and I can also convert them to index coordinates. But the index coordinates of itk and vtk are not always the same. It seems that it depends on the label 0020 0037. There are a lot of contents involved in it. I am completely confused about the coordinate relationship between itk and vtk.
VTK didn’t have support for image directions until recently. That example was written before, when an actor transform needed to be applied to vtkImageData to give it appropriate orientation. You should use physical coordinates during picking, then to get image index coordinates use ITK’s TransformPhysicalPointToContinuousIndex() and friends.
Ok, I’ll try it tomorrow