Computer Assited Medical Intervention Tool Kit  version 4.1
Public Member Functions | List of all members
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>

Inherited by camitk::Component, and camitk::Frame.

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 (Viewer *viewer) 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 (Viewer *viewer, bool visible)=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:

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.

Implemented in camitk::Frame.

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

◆ 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::Component, and camitk::Frame.

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

◆ 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 FrameEditor::displayFrameToggled(), FrameEditor::frameSizeChanged(), camitk::Component::getTransformFromFrame(), and camitk::InteractiveViewer::refresh().

◆ 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::Component, and camitk::Frame.

Referenced by camitk::FrameExplorer::add(), camitk::Component::getFrameName(), camitk::FrameExplorer::getNewItem(), and camitk::Frame::setParentFrame().

◆ getFrameVisibility()

virtual bool camitk::InterfaceFrame::getFrameVisibility ( Viewer viewer) const
pure virtual

Get the Component Frame visibility for a given viewer.

Parameters
viewerthe viewer in which we check the visibility of the current frame.

Implemented in camitk::Frame.

Referenced by camitk::Component::getTransformFromFrame(), FrameEditor::initializeDialogWithCurrentComponent(), and camitk::InteractiveViewer::refresh().

◆ getParentFrame()

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

◆ getTransform()

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

Get the transformation with respect to the parent frame.

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

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

◆ 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::Component, and camitk::Frame.

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

◆ 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::Component, and camitk::Frame.

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

◆ 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().

◆ 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::Frame, and camitk::SingleImageComponent.

◆ 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::Frame, and camitk::SingleImageComponent.

◆ 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::Frame, and camitk::SingleImageComponent.

Referenced by FrameEditor::rotate().

◆ setFrameName()

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

Set the Frame Unique identifyer.

Implemented in camitk::Frame.

◆ setFrameVisibility()

virtual void camitk::InterfaceFrame::setFrameVisibility ( Viewer viewer,
bool  visible 
)
pure virtual

Set the Component Frame visible for a given viewer.

Implemented in camitk::Frame.

Referenced by FrameEditor::displayFrameToggled(), FrameEditor::frameSizeChanged(), and ReorientImage::process().

◆ 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::Component, and camitk::Frame.

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

◆ 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::Frame, and camitk::SingleImageComponent.

Referenced by camitk::Action::applyTargetPosition(), ReorientImage::process(), camitk::ImageComponent::setImageData(), and FrameEditor::setTransformation().

◆ 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::Frame, and camitk::SingleImageComponent.

◆ 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::Frame, and camitk::SingleImageComponent.

Referenced by FrameEditor::setRotation().

◆ 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::Frame, and camitk::SingleImageComponent.

◆ 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::Frame, and camitk::SingleImageComponent.

Referenced by FrameEditor::setTranslation().

◆ 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::Frame, and camitk::SingleImageComponent.

Referenced by FrameEditor::translate().


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