[vtkusers] ROI on vtkImageViewer2

Leonardo M. Ramé l.rame at griensu.com
Tue Oct 26 15:24:55 EDT 2010


Hi, I'm using vtkImageViewer2 to show 2D dicom images. I load the images
using dcmtk, then convert to vtk using vtkImageData.

Now I get an area (x1,y1,x2,y2) using vtkInteractorStyleRubberBand2D, and
want to obtain the same area in the image I have on vtkImageData, I
mean, on the "real" image.

I ask this because the data I'm getting from
vtkInteractorStyleRubberBand2D is adjusted to the zoom level, that is,
the Display coordinates. I can translate those coordinates using these
functions:

DisplayToNormalizedDisplay(x,y)
NormalizedDisplayToViewport(x,y)
ViewportToNormalizedViewport(x,y)

My question is, how can I know, using the values I got, to which part of
the original image they are related?

P.S.: all I want to do, is to get an ROI on the original image to let
dcmtk calculate bone density on CT images.
-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com



More information about the vtkusers mailing list