35 #include <vtkImageData.h>
42 Image(uid, source->getVtkImageData(), name),
43 mSliceProxy(sliceProxy)
51 static double computeEffectiveOffset(
double offset,
double size)
71 double offsetX = computeEffectiveOffset( mToolPositionX, size[0] );
72 double offsetY = computeEffectiveOffset( mToolPositionY, size[1] );
75 return mSliceProxy->get_sMr().inv() * Flip * T;
86 double scalefactorX =(viewport[1]-viewport[0])/(
double)size[0];
87 double scalefactorY = (viewport[3]-viewport[2])/(
double)size[1];
88 return std::min(scalefactorX, scalefactorY);
91 void NavigatedVideoImage::newFrame()
95 if (spacing[0] != mSpacing[0] || spacing[1] != mSpacing[1] ||
96 spacing[2] != mSpacing[2] )
101 mSpacing[0] = spacing[0];
102 mSpacing[1] = spacing[1];
103 mSpacing[2] = spacing[2];
114 mToolPositionX = positionX;
115 mToolPositionY = positionY;
virtual void setToolPosition(double, double)
Set the position of the tool point in the video image.
Transform3D createTransformScale(const Vector3D &scale_)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
void transformChanged()
emitted when transform is changed
NavigatedVideoImage(QString uid, VideoSourcePtr source, SliceProxyPtr sliceProxy, QString name="")
virtual double computeFullViewZoomFactor(DoubleBoundingBox3D viewport) const
Compute the largest zoom factor that will still fit the entire video image in the given viewport...
boost::shared_ptr< class VideoSource > VideoSourcePtr
Transform3D createTransformTranslate(const Vector3D &translation)
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
void vtkImageDataChanged()
emitted when the vktimagedata are invalidated and must be retrieved anew.
virtual Transform3D get_rMd() const
vtkImageDataPtr mBaseImageData
image data in data space
void newFrame()
emitted when a new frame has arrived (getVtkImageData() returns something new). info/status/name/vali...
virtual ImageLUT2DPtr getLookupTable2D()