14 #include <vtkImageData.h>
21 Image(uid, source->getVtkImageData(), name),
22 mSliceProxy(sliceProxy)
30 static double computeEffectiveOffset(
double offset,
double size)
50 double offsetX = computeEffectiveOffset( mToolPositionX, size[0] );
51 double offsetY = computeEffectiveOffset( mToolPositionY, size[1] );
54 return mSliceProxy->get_sMr().inv() * Flip * T;
65 double scalefactorX =(viewport[1]-viewport[0])/(
double)size[0];
66 double scalefactorY = (viewport[3]-viewport[2])/(
double)size[1];
67 return std::min(scalefactorX, scalefactorY);
70 void NavigatedVideoImage::newFrame()
74 if (spacing[0] != mSpacing[0] || spacing[1] != mSpacing[1] ||
75 spacing[2] != mSpacing[2] )
80 mSpacing[0] = spacing[0];
81 mSpacing[1] = spacing[1];
82 mSpacing[2] = spacing[2];
93 mToolPositionX = positionX;
94 mToolPositionY = positionY;