IGSTK
|
An abstract base class for all the igstk representation objects. More...
#include <igstkObjectRepresentation.h>
Public Types | |
typedef double | OpacityType |
Type for representing the opacity of the object. | |
![]() | |
typedef Object | Self |
General Typedefs. | |
typedef ::itk::Object | Superclass |
typedef ::itk::SmartPointer< Self > | Pointer |
typedef ::itk::SmartPointer < const Self > | ConstPointer |
typedef igstk::Logger | LoggerType |
Public Member Functions | |
void | SetColor (ColorScalarType r, ColorScalarType g, ColorScalarType b) |
Set the color. | |
ColorScalarType | GetRed () const |
Get each color component. | |
ColorScalarType | GetGreen () const |
ColorScalarType | GetBlue () const |
virtual void | SetOpacity (OpacityType alpha) |
Set/Get the opacity. | |
virtual OpacityType | GetOpacity () |
virtual void | CreateActors ()=0 |
Create the vtkActors. | |
virtual ActorsListType | GetActors () |
Get the VTK actors. | |
virtual void | RequestUpdateRepresentation (const TimeStamp &time, const CoordinateSystem *cs) |
Update the visual representation with changes in the geometry. | |
![]() | |
virtual const char * | GetNameOfClass () const |
void | SetLogger (LoggerType *logger) |
Connect the Logger for this class. | |
void | RemoveObserver (unsigned long tag) const |
Public Attributes | |
igstkStandardAbstractClassTraitsMacro(ObjectRepresentation, Object) public typedef double | ColorScalarType |
Macro with standard traits declarations. |
Protected Member Functions | |
ObjectRepresentation (void) | |
~ObjectRepresentation (void) | |
void | AddActor (vtkProp *) |
Add an actor to the list. | |
virtual void | DeleteActors () |
Empty the list of actors. | |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const |
Print the object informations in a stream. | |
void | RequestSetSpatialObject (const SpatialObject *spatialObject) |
Request the state machine to set a Spatial Object. | |
virtual bool | VerifyTimeStamp () const |
Verify the time stamp. | |
TimeStamp | GetRenderTimeStamp () const |
Get Time stamp for the time at which the next rendering will take place. | |
![]() | |
LoggerType * | GetLogger () const |
Object (void) | |
Constructor is protected in order to enforce the use of the New() operator. | |
virtual | ~Object (void) |
void | RegisterObservedObject (const ::igstk::Object *object, unsigned long tag) |
Register observed objects in an internal array so that they can be disconnected upon destruction. | |
void | RemoveFromObservedObjects () |
Remove observers that this object may have connected to other objects. |
Protected Attributes | |
ActorsListType | m_Actors |
OpacityType | m_Opacity |
Additional Inherited Members | |
![]() | |
static Pointer | New (void) |
An abstract base class for all the igstk representation objects.
This class serves as the base class for all the representation objects that will provide a VTK visualization of the Spatial Objects that are composing a given scene.
Due to the critical nature of IGSTK applications, it is important to ensure that when we display objects in the surgical scene, we have confidence on the validity of their current location and orientation in space. In IGSTK we do this by managing Transforms with a finite validity time. In this way, when an object stops receiving fresh updated transforms, its old transforms are going to expire and the ObjectRepresentation class will then know that at this moment we can not trust the information of the transform. Objects whose transforms have expired are not displayed in the Views. This functionality is implemented in this current class by providing states of Visibility and Invisibility in an auxiliary state machine.
The validity of the SpatialObject transform is checked at every call of the RequestUpdateRepresentation() method. If the transform turns out to be invalid, then this class goes into the Invisible state, and remains there until subsequent calls to RequestUpdateRepresentation() reveal that a valid transform has been provided to the SpatialObject.
"Object Representation State Machine Diagram" "Object Representation State Machine Diagram"
Definition at line 72 of file igstkObjectRepresentation.h.
typedef double igstk::ObjectRepresentation::OpacityType |
Type for representing the opacity of the object.
Definition at line 97 of file igstkObjectRepresentation.h.
|
protected |
|
protected |
void igstk::ObjectRepresentation::SetColor | ( | ColorScalarType | r, |
ColorScalarType | g, | ||
ColorScalarType | b | ||
) |
Set the color.
ColorScalarType igstk::ObjectRepresentation::GetRed | ( | ) | const |
Get each color component.
ColorScalarType igstk::ObjectRepresentation::GetGreen | ( | ) | const |
ColorScalarType igstk::ObjectRepresentation::GetBlue | ( | ) | const |
|
virtual |
Set/Get the opacity.
|
virtual |
|
pure virtual |
Create the vtkActors.
Implemented in igstk::ImageResliceObjectRepresentation< TImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< TImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< PETImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< USImageObject >, igstk::ImageSpatialObjectRepresentation< MRImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< CTImageSpatialObject >, igstk::MeshResliceObjectRepresentation, igstk::ToolProjectionObjectRepresentation, igstk::UltrasoundProbeObjectRepresentation, igstk::CrossHairObjectRepresentation, igstk::ConeObjectRepresentation, igstk::BoxObjectRepresentation, igstk::AxesObjectRepresentation, igstk::CylinderObjectRepresentation, igstk::VideoFrameRepresentation< TVideoFrameSpatialObject >, igstk::MeshObjectRepresentation, igstk::EllipsoidObjectRepresentation, and igstk::TubeObjectRepresentation.
|
virtual |
Get the VTK actors.
|
virtual |
Update the visual representation with changes in the geometry.
|
protected |
Add an actor to the list.
|
protectedvirtual |
Empty the list of actors.
Reimplemented in igstk::ImageResliceObjectRepresentation< TImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< TImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< PETImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< USImageObject >, igstk::ImageSpatialObjectRepresentation< MRImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< CTImageSpatialObject >, and igstk::VideoFrameRepresentation< TVideoFrameSpatialObject >.
|
protectedvirtual |
Print the object informations in a stream.
Reimplemented from igstk::Object.
Reimplemented in igstk::ImageResliceObjectRepresentation< TImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< TImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< PETImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< USImageObject >, igstk::ImageSpatialObjectRepresentation< MRImageSpatialObject >, igstk::ImageSpatialObjectRepresentation< CTImageSpatialObject >, igstk::ToolProjectionObjectRepresentation, igstk::MeshResliceObjectRepresentation, igstk::UltrasoundProbeObjectRepresentation, igstk::CrossHairObjectRepresentation, igstk::ConeObjectRepresentation, igstk::BoxObjectRepresentation, igstk::AxesObjectRepresentation, igstk::CylinderObjectRepresentation, igstk::EllipsoidObjectRepresentation, igstk::TubeObjectRepresentation, igstk::MeshObjectRepresentation, igstk::CTImageSpatialObjectRepresentation, igstk::PETImageSpatialObjectRepresentation, igstk::USImageObjectRepresentation, and igstk::MRImageSpatialObjectRepresentation.
|
protected |
Request the state machine to set a Spatial Object.
|
protectedvirtual |
Verify the time stamp.
A default implementation is provided that checks if the spatial object transform is within the Rendering time period. This method could be overridden in derived classes that can use other criteria to verify the time stamp.
Reimplemented in igstk::ImageResliceObjectRepresentation< TImageSpatialObject >, igstk::MeshResliceObjectRepresentation, igstk::ToolProjectionObjectRepresentation, igstk::CrossHairObjectRepresentation, and igstk::VideoFrameRepresentation< TVideoFrameSpatialObject >.
|
protected |
Get Time stamp for the time at which the next rendering will take place.
igstkStandardAbstractClassTraitsMacro ( ObjectRepresentation, Object ) public typedef double igstk::ObjectRepresentation::ColorScalarType |
Macro with standard traits declarations.
Type for representing the color components
Definition at line 79 of file igstkObjectRepresentation.h.
|
protected |
Definition at line 119 of file igstkObjectRepresentation.h.
|
protected |
Definition at line 121 of file igstkObjectRepresentation.h.