Computer Assisted Medical Intervention Tool Kit  version 5.2
camitk::InterfaceFrame Class Referenceabstract

This class describes what are the methods to implement in order to manage a Component position in space. More...

#include <InterfaceFrame.h>

+ Inheritance diagram for camitk::InterfaceFrame:
+ Collaboration diagram for camitk::InterfaceFrame:

Public Member Functions

virtual void addFrameChild (InterfaceFrame *frame)=0
 Add the input frame as a child of the current frame. More...
 
virtual vtkSmartPointer< vtkAxesActor > getFrameAxisActor ()=0
 Gives the 3D representation of the frame (based on xyz arrows) More...
 
virtual bool getFrameVisibility (QString) const =0
 Get the Component Frame visibility for a given viewer. More...
 
virtual void removeFrameChild (InterfaceFrame *frame)=0
 Remove the input frame as a child of the current frame. More...
 
virtual void setFrameVisibility (QString, bool)=0
 Set the Component Frame visible for a given viewer. More...
 
virtual ~InterfaceFrame ()=default
 empty virtual destructor, to avoid memory leak More...
 
virtual const QString & getFrameName () const =0
 Hierarchy accessors / Modifyers. More...
 
virtual void setFrameName (QString name)=0
 Set the Frame Unique identifyer. More...
 
virtual InterfaceFramegetParentFrame () const =0
 Get the parent frame. More...
 
virtual void setParentFrame (InterfaceFrame *parent, bool keepTransform=true)=0
 Set the parent frame and update or not its transform during the parent transition. More...
 
virtual const QVector< InterfaceFrame * > & getChildrenFrame () const =0
 Get the Children Frames from the current Frame in the Frame Hierarchy The Frame hierarchy may not be the same as the Component Hierarchy. More...
 
virtual const vtkSmartPointer< vtkTransform > getTransformFromWorld () const =0
 Transforms accessors / Modifyers. More...
 
virtual const vtkSmartPointer< vtkTransform > getTransform () const =0
 Get the transformation with respect to the parent frame. More...
 
virtual const vtkSmartPointer< vtkTransform > getTransformFromFrame (InterfaceFrame *frame) const =0
 Compute the transformation from any other frame to the current frame. More...
 
virtual void setTransform (vtkSmartPointer< vtkTransform > transform)=0
 Set the current input frame position (according to its parent Frame) More...
 
virtual void resetTransform ()=0
 Set the current frame transform to identity. More...
 
virtual void translate (double x, double y, double z)=0
 Apply a translation relative to the current position. More...
 
virtual void rotate (double aroundX, double aroundY, double aroundZ)=0
 Apply rotations relative to the current position in the alphabetical order (X, Y, Z). More...
 
virtual void rotateVTK (double aroundX, double aroundY, double aroundZ)=0
 Apply a rotation relative to the current position, using the VTK rotation order (Z, X, Y) More...
 
virtual void setTransformTranslation (double x, double y, double z)=0
 Set the translation part of the 3D space transformation of the current frame. More...
 
virtual void setTransformTranslationVTK (double x, double y, double z)=0
 Set the translation part of the 3D space transformation of the current frame. More...
 
virtual void setTransformRotation (double aroundX, double aroundY, double aroundZ)=0
 Set the rotation part of the 3D space transformation of the current frame. More...
 
virtual void setTransformRotationVTK (double aroundX, double aroundY, double aroundZ)=0
 Set the rotation part of the 3D space transformation of the current frame. More...
 

Detailed Description

This class describes what are the methods to implement in order to manage a Component position in space.

The Frame hierarchy is inspired from IGSTK hierarchy:

  • Each Frame knows its parent frame
  • Each Frame knows the transormation to its parent frame

For hierachy display convenience, each Frame also knows its children frames.

Ecah Component has a Frame, and each Frame belongs to only one Component. However, the Frame hierarchy may be different from the Component hierarchy (InterfaceNode).

Constructor & Destructor Documentation

◆ ~InterfaceFrame()

virtual camitk::InterfaceFrame::~InterfaceFrame ( )
virtualdefault

empty virtual destructor, to avoid memory leak

Member Function Documentation

◆ addFrameChild()

virtual void camitk::InterfaceFrame::addFrameChild ( InterfaceFrame frame)
pure virtual

Add the input frame as a child of the current frame.

Parameters
frameThe child frame of the current one.

Referenced by camitk::Frame::Frame(), and camitk::Frame::setParentFrame().

+ Here is the caller graph for this function:

◆ getChildrenFrame()

virtual const QVector<InterfaceFrame*>& camitk::InterfaceFrame::getChildrenFrame ( ) const
pure virtual

Get the Children Frames from the current Frame in the Frame Hierarchy The Frame hierarchy may not be the same as the Component Hierarchy.

Implemented in camitk::Frame, and camitk::Component.

Referenced by camitk::Frame::computeDescendants(), and camitk::Component::getChildrenFrame().

+ Here is the caller graph for this function:

◆ getFrameAxisActor()

virtual vtkSmartPointer<vtkAxesActor> camitk::InterfaceFrame::getFrameAxisActor ( )
pure virtual

Gives the 3D representation of the frame (based on xyz arrows)

Implemented in camitk::Frame.

Referenced by camitk::ArbitrarySingleImageComponent::ArbitrarySingleImageComponent(), ShowFrame::event(), ShowFrame::getWidget(), and camitk::InteractiveViewer::refresh().

+ Here is the caller graph for this function:

◆ getFrameName()

virtual const QString& camitk::InterfaceFrame::getFrameName ( ) const
pure virtual

Hierarchy accessors / Modifyers.

Get the Frame Unique identifyer (can be set by user)

Implemented in camitk::Frame, and camitk::Component.

Referenced by camitk::Component::getFrameName(), camitk::Frame::setParentFrame(), and camitk::Component::toVariant().

+ Here is the caller graph for this function:

◆ getFrameVisibility()

virtual bool camitk::InterfaceFrame::getFrameVisibility ( QString  ) const
pure virtual

Get the Component Frame visibility for a given viewer.

Implemented in camitk::Frame.

Referenced by ShowFrame::getQAction(), ShowFrame::getWidget(), and camitk::InteractiveViewer::refresh().

+ Here is the caller graph for this function:

◆ getParentFrame()

virtual InterfaceFrame* camitk::InterfaceFrame::getParentFrame ( ) const
pure virtual

Get the parent frame.

Implemented in camitk::Frame.

Referenced by camitk::Component::toVariant().

+ Here is the caller graph for this function:

◆ getTransform()

virtual const vtkSmartPointer<vtkTransform> camitk::InterfaceFrame::getTransform ( ) const
pure virtual

Get the transformation with respect to the parent frame.

Implemented in camitk::Frame, and camitk::Component.

Referenced by camitk::Component::getTransform().

+ Here is the caller graph for this function:

◆ getTransformFromFrame()

virtual const vtkSmartPointer<vtkTransform> camitk::InterfaceFrame::getTransformFromFrame ( InterfaceFrame frame) const
pure virtual

Compute the transformation from any other frame to the current frame.

Note
A new returned transformed is instancied at each call. Caller takes ownership of the transform and is responsible for its deletion

Implemented in camitk::Frame, and camitk::Component.

Referenced by camitk::Component::getTransformFromFrame().

+ Here is the caller graph for this function:

◆ getTransformFromWorld()

virtual const vtkSmartPointer<vtkTransform> camitk::InterfaceFrame::getTransformFromWorld ( ) const
pure virtual

Transforms accessors / Modifyers.

Get a the transformation with respect to the world frame

Implemented in camitk::Frame, and camitk::Component.

Referenced by camitk::Frame::getTransformFromFrame(), camitk::Component::getTransformFromWorld(), and camitk::Frame::setParentFrame().

+ Here is the caller graph for this function:

◆ removeFrameChild()

virtual void camitk::InterfaceFrame::removeFrameChild ( InterfaceFrame frame)
pure virtual

Remove the input frame as a child of the current frame.

Parameters
framethe input frame to remove from the current frame's children list

Implemented in camitk::Frame.

Referenced by camitk::Frame::setParentFrame(), and camitk::Frame::~Frame().

+ Here is the caller graph for this function:

◆ resetTransform()

virtual void camitk::InterfaceFrame::resetTransform ( )
pure virtual

Set the current frame transform to identity.

In other words, the current frame and its parent share the same 3D location.

Implemented in camitk::ArbitrarySingleImageComponent, camitk::SingleImageComponent, and camitk::Frame.

◆ rotate()

virtual void camitk::InterfaceFrame::rotate ( double  aroundX,
double  aroundY,
double  aroundZ 
)
pure virtual

Apply rotations relative to the current position in the alphabetical order (X, Y, Z).

Note
Prefer using the rotateVTK method if possible, this one involves errors when retrieving rotation angles from a rotation matrix, as we use a VTK method for this.

Implemented in camitk::SingleImageComponent, camitk::ArbitrarySingleImageComponent, and camitk::Frame.

◆ rotateVTK()

virtual void camitk::InterfaceFrame::rotateVTK ( double  aroundX,
double  aroundY,
double  aroundZ 
)
pure virtual

Apply a rotation relative to the current position, using the VTK rotation order (Z, X, Y)

Note
Prefer using this method if you can.

Implemented in camitk::SingleImageComponent, camitk::ArbitrarySingleImageComponent, and camitk::Frame.

Referenced by FrameEditor::rotate().

+ Here is the caller graph for this function:

◆ setFrameName()

virtual void camitk::InterfaceFrame::setFrameName ( QString  name)
pure virtual

Set the Frame Unique identifyer.

Implemented in camitk::Frame.

Referenced by camitk::Component::fromVariant().

+ Here is the caller graph for this function:

◆ setFrameVisibility()

virtual void camitk::InterfaceFrame::setFrameVisibility ( QString  ,
bool   
)
pure virtual

Set the Component Frame visible for a given viewer.

Implemented in camitk::Frame.

Referenced by ShowFrame::event(), and ShowFrame::getWidget().

+ Here is the caller graph for this function:

◆ setParentFrame()

virtual void camitk::InterfaceFrame::setParentFrame ( InterfaceFrame parent,
bool  keepTransform = true 
)
pure virtual

Set the parent frame and update or not its transform during the parent transition.

Parameters
parentthe new parent frame of current interface frame
keepTransformif true keeps the local transform from parent. The current interface frame may move from world coordinates as its local transform is now expressed relatively to the new parent. If false, change the transform from parent to keep the global (world) transform the same as the previous one.

Implemented in camitk::Frame, and camitk::Component.

Referenced by camitk::Component::setParentFrame(), camitk::Frame::setParentFrame(), and camitk::Frame::~Frame().

+ Here is the caller graph for this function:

◆ setTransform()

virtual void camitk::InterfaceFrame::setTransform ( vtkSmartPointer< vtkTransform >  transform)
pure virtual

Set the current input frame position (according to its parent Frame)

Parameters
transformThe 3D transform of the current frame to its parent.

Implemented in camitk::SingleImageComponent, camitk::ArbitrarySingleImageComponent, and camitk::Frame.

Referenced by camitk::Action::applyTargetPosition(), DicomComponent::DicomComponent(), camitk::ImageComponent::setImageData(), camitk::ArbitrarySingleImageComponent::setTransform(), and FrameEditor::setTransformation().

+ Here is the caller graph for this function:

◆ setTransformRotation()

virtual void camitk::InterfaceFrame::setTransformRotation ( double  aroundX,
double  aroundY,
double  aroundZ 
)
pure virtual

Set the rotation part of the 3D space transformation of the current frame.

Note
Reminder: A 3D space transform is a 4x4 matrix, composed of a rotation and a translation.
This method differs from setTransformRotationVTK on the rotation order in the transform matrix Here order is alphabetical X, Y, Z, which involves problems when retrieving angles from the rotation matrix as this is done using VTK. If you can, prefer using setTransformRotationVTK.

Implemented in camitk::ArbitrarySingleImageComponent, camitk::SingleImageComponent, and camitk::Frame.

◆ setTransformRotationVTK()

virtual void camitk::InterfaceFrame::setTransformRotationVTK ( double  aroundX,
double  aroundY,
double  aroundZ 
)
pure virtual

Set the rotation part of the 3D space transformation of the current frame.

Note
Reminder: A 3D space transform is a 4x4 matrix, composed of a rotation and a translation.
This method differs from setTransformRotation on the rotation order in the transform matrix Here order is the one used by VTK: Z, X, Y which guarantees that you can retrieve the correct angles from a rotation matrix. Prefer using this method than setTransformRotation.

Implemented in camitk::SingleImageComponent, camitk::ArbitrarySingleImageComponent, and camitk::Frame.

Referenced by FrameEditor::setRotation().

+ Here is the caller graph for this function:

◆ setTransformTranslation()

virtual void camitk::InterfaceFrame::setTransformTranslation ( double  x,
double  y,
double  z 
)
pure virtual

Set the translation part of the 3D space transformation of the current frame.

Note
Reminder: A 3D space transform is a 4x4 matrix, composed of a rotation and a translation.
This method differs from setTransformTranslationVTK on the rotation order in the transform matrix Here order is alphabetical X, Y, Z, which involves problems when retrieving angles from the rotation matrix as this is done using VTK. If you can, prefer using setTransformTranslationVTK.

Implemented in camitk::ArbitrarySingleImageComponent, camitk::SingleImageComponent, and camitk::Frame.

◆ setTransformTranslationVTK()

virtual void camitk::InterfaceFrame::setTransformTranslationVTK ( double  x,
double  y,
double  z 
)
pure virtual

Set the translation part of the 3D space transformation of the current frame.

This method uses the VTK rotation order (Z, X, Y).

Note
Reminder: A 3D space transform is a 4x4 matrix, composed of a rotation and a translation.
This method differs from setTransformTranslation on the rotation order in the transform matrix Here order is the one used by VTK: Z, X, Y which guarantees that you can retrieve the correct angles from a rotation matrix. Prefer using this method than setTransformTranslation.

Implemented in camitk::SingleImageComponent, camitk::ArbitrarySingleImageComponent, and camitk::Frame.

Referenced by FrameEditor::setTranslation().

+ Here is the caller graph for this function:

◆ translate()

virtual void camitk::InterfaceFrame::translate ( double  x,
double  y,
double  z 
)
pure virtual

Apply a translation relative to the current position.

Implemented in camitk::SingleImageComponent, camitk::ArbitrarySingleImageComponent, and camitk::Frame.

Referenced by FrameEditor::translate().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: