Computer Assited Medical Intervention Tool Kit
version 4.1
|
This class describes what are the methods to implement for a Geometry (rendering parameters, input/output, filters, picking parameters...) More...
#include <InterfaceGeometry.h>
Inherited by camitk::Component, and camitk::Geometry.
Public Types | |
enum | EnhancedMode { Normal = 0x0, Hidden = 0x1, Shaded = 0x2, Highlighted = 0x4 } |
(and QFlags EnhancedModes) handle the way the rendering actors will be enhanced or not (from completely hidden to highlighted) More... | |
enum | GlyphType { NoGlyph = 0x0, Sphere = 0x1 } |
(and QFlags GlyphTypes) is the type of glyph attached to the geometry representation More... | |
enum | RenderingMode { None = 0x0, Surface = 0x1, Wireframe = 0x2, Points = 0x4 } |
(and QFlags RenderingModes) handle actor rendering options (render this InterfaceGeometry as a surface, a wireframe and set of points). More... | |
Public Member Functions | |
virtual const QString | getLabel () const =0 |
get the string used to display the label More... | |
virtual void | setLabel (QString newName)=0 |
set the string used to display the label More... | |
virtual | ~InterfaceGeometry ()=default |
empty virtual destructor, to avoid memory leak More... | |
Vtk related | |
get the low-level vtk data | |
virtual vtkSmartPointer< vtkPointSet > | getPointSet ()=0 |
virtual void | setPointSet (vtkSmartPointer< vtkPointSet >)=0 |
set the low-level data set. More... | |
virtual void | setPointData (vtkSmartPointer< vtkDataArray >)=0 |
set the point data (may contains a lookup table). More... | |
virtual void | setMeshWorldTransform (vtkSmartPointer< vtkTransform >)=0 |
set the transformation for 3D representation More... | |
virtual vtkSmartPointer< vtkAlgorithmOutput > | getDataPort () const =0 |
get the custom algorithm pipeline input. More... | |
virtual void | setDataConnection (vtkSmartPointer< vtkAlgorithmOutput >)=0 |
Set/reset the connection for the InterfaceGeometry internal algorithm. More... | |
virtual vtkSmartPointer< vtkActor > | getActor (const RenderingModes)=0 |
Return the actor for the representation mode, NULL if the actor doesn't exist. More... | |
virtual vtkSmartPointer< vtkProp > | getProp (const QString &)=0 |
Return the vtkProp (actors, volumes and annotations) corresponding to the given name. More... | |
virtual unsigned int | getNumberOfProp () const =0 |
return the number of additional prop More... | |
virtual vtkSmartPointer< vtkProp > | getProp (unsigned int)=0 |
return an additional prop by its index More... | |
virtual bool | removeProp (const QString &)=0 |
remove a given additional prop. More... | |
virtual bool | addProp (const QString &, vtkSmartPointer< vtkProp >)=0 |
insert an additional prop, defining it by its name (default visibility = false). More... | |
virtual void | setTexture (vtkSmartPointer< vtkTexture >)=0 |
Set a texture to this object. More... | |
virtual void | pointPicked (vtkIdType pointId, bool pickingIsSelecting)=0 |
This method is called when a vtkPoint included in the vtk representation was picked. More... | |
virtual void | cellPicked (vtkIdType cellId, bool pickingIsSelecting)=0 |
This method is called when a vtkCell included in the vtk representation was picked. More... | |
Helpers methods | |
virtual void | getBounds (double *bounds)=0 |
compute the object's bounding box [xmin,xmax, ymin,ymax, zmin,zmax] More... | |
virtual double | getBoundingRadius ()=0 |
compute the object's bounding sphere radius More... | |
virtual void | setPointPosition (const unsigned int orderNumber, const double x, const double y, const double z)=0 |
set a given point position More... | |
rendering mode settings | |
Set the actor associated to a rendering mode visible or not. | |
virtual void | setRenderingModes (const RenderingModes)=0 |
virtual const RenderingModes | getRenderingModes () const =0 |
Return if the actor associated to a rendering mode is currently visible or not. More... | |
virtual void | setEnhancedModes (const EnhancedModes)=0 |
set the enhanced mode More... | |
virtual const EnhancedModes | getEnhancedModes () const =0 |
get the current enhanced mode More... | |
virtual void | setActorColor (const RenderingModes, double *color)=0 |
Set the color of given representation modes. More... | |
virtual void | setActorColor (const RenderingModes, const double, const double, const double)=0 |
Set the color of given representation modes. More... | |
virtual void | getActorColor (const RenderingModes, double *color)=0 |
Get the color of given representation modes in the second parameter. More... | |
virtual void | setColor (const double, const double, const double)=0 |
Set an (r,g,b) color to all representation modes, without changing the opacity. More... | |
virtual void | setColor (const double, const double, const double, const double)=0 |
Set an (r,g,b,a) color to all representation modes. More... | |
virtual void | setActorOpacity (const RenderingModes, const double)=0 |
Set the opacity of this representation modes. WARNING color field (surfaceColor, ...) are not modified! More... | |
virtual double | getActorOpacity (const RenderingModes) const =0 |
Return the opacity of a given renderng mode. More... | |
virtual void | setOpacity (const double)=0 |
Set the opacity of this object. WARNING color field (surfaceColor, ...) are not modified! More... | |
virtual void | setMapperScalarRange (double min, double max)=0 |
Set the mapper scalar range. More... | |
virtual void | setGlyphType (const GlyphTypes type, const double size=0.0)=0 |
Set the glyph type (a glyph is a geometric representation attached to every point in the input dataset). More... | |
virtual void | setLinesAsTubes (bool)=0 |
set the lines as tubes (works only for vtkDataSet representation that contains lines) More... | |
This class describes what are the methods to implement for a Geometry (rendering parameters, input/output, filters, picking parameters...)
An InterfaceGeometry is a kind of simplifier/wrapper for vtkPointSet.
This class defines an "interface" (in the OOP/java meaning of the term). See the introduction of GoF: "Program to an interface, not an implementation." To see what Erich Gamma has to say about it: http://www.artima.com/lejava/articles/designprinciplesP.html To see what Bjarne Stroustrup has to say about it: http://www.artima.com/intv/modern.html
(and QFlags RenderingModes) handle actor rendering options (render this InterfaceGeometry as a surface, a wireframe and set of points).
Enumerator | |
---|---|
None | no rendering mode, the InterfaceGeometry is not visible |
Surface | the surface is visible |
Wireframe | the wireframe is visible |
Points | the points are visible |
|
virtualdefault |
empty virtual destructor, to avoid memory leak
|
pure virtual |
insert an additional prop, defining it by its name (default visibility = false).
Implemented in camitk::Component, and camitk::Geometry.
|
pure virtual |
This method is called when a vtkCell included in the vtk representation was picked.
This is the same as method getChildComponentFromVtkPointId, but for CELL_PICKING.
A Component re-implementing this method can manage a specific selection process (or any other suitable action).
cellId | the vtkCell id that was selected by picking |
pickingIsSelecting | indicates if the current picking session is selecting or unselecting |
Implemented in camitk::Component, camitk::Geometry, and camitk::MeshComponent.
|
pure virtual |
Return the actor for the representation mode, NULL if the actor doesn't exist.
Implemented in camitk::Geometry.
|
pure virtual |
Get the color of given representation modes in the second parameter.
color | the 4-sized double tab of color (r,g,b,a) of the actor. |
Implemented in camitk::Geometry.
Referenced by camitk::Component::getActorColor().
|
pure virtual |
Return the opacity of a given renderng mode.
Implemented in camitk::Geometry.
|
pure virtual |
compute the object's bounding sphere radius
Implemented in camitk::Component, and camitk::Geometry.
Referenced by camitk::Component::getBoundingRadius().
|
pure virtual |
compute the object's bounding box [xmin,xmax, ymin,ymax, zmin,zmax]
bounds | the 6-sized double tab of the bounding box (in 3D). |
Implemented in camitk::Component, and camitk::Geometry.
|
pure virtual |
get the custom algorithm pipeline input.
This method returns the unmodified data that you have to use as an input for your filter/algorithm. I.e. if you want to temporarily apply some filter/algorithm to the InterfaceGeometry call this method to get the input of your filter/algorithm pipeline. Typically, your custom filter/algorithm connection should start with:
Implemented in camitk::Geometry.
Referenced by PMLComponent::createAtomSelectionVTKPipeline(), PMLComponent::createCellSelectionVTKPipeline(), camitk::MeshComponent::createDataRepresentation(), and camitk::MeshComponent::initSelection().
|
pure virtual |
get the current enhanced mode
Implemented in camitk::Geometry.
|
pure virtual |
get the string used to display the label
Implemented in camitk::Component, and camitk::Geometry.
|
pure virtual |
return the number of additional prop
Implemented in camitk::Component, and camitk::Geometry.
|
pure virtual |
Implemented in camitk::Geometry.
Referenced by ComputeNormals::apply(), CleanPolyData::apply(), ExtractSelection::apply(), ExtractEdges::apply(), FillWithPoints::apply(), ExtractSurface::apply(), ComputeCurvatures::apply(), WarpOut::apply(), Decimation::apply(), AppendMeshes::apply(), RenderingOption::apply(), CenterMesh::apply(), MeshPicking::apply(), ICPRegistration::apply(), MergeMeshs::apply(), MeshClipping::clipMesh(), PMLExplorerWidget::createAtomPropertyList(), camitk::MeshComponent::createDataRepresentation(), camitk::MeshDataModel::data(), camitk::MeshComponent::getFieldData(), MeshQuality::getInfos(), camitk::MeshComponent::getNumberOfDataArray(), camitk::MeshComponent::initData(), camitk::MeshComponent::initDynamicProperties(), LoadTransformation::loadTransformationFile(), SmoothFilter::process(), InvertMesh::process(), MeshToImageStencil::process(), SaveDisplacementFromTransformation::process(), PMLComponent::refreshDisplay(), ObjExtension::save(), VtkMeshComponentExtension::save(), OffExtension::save(), PMLComponentExtension::save(), MshExtension::save(), VRMLComponentExtension::save(), ExportAsMDL::saveMeshComponentToMDL(), MeshQuality::updateMeshColor(), and camitk::MeshComponent::~MeshComponent().
|
pure virtual |
Return the vtkProp (actors, volumes and annotations) corresponding to the given name.
Implemented in camitk::Component, and camitk::Geometry.
|
pure virtual |
return an additional prop by its index
Implemented in camitk::Component, and camitk::Geometry.
|
pure virtual |
Return if the actor associated to a rendering mode is currently visible or not.
Implemented in camitk::Component, and camitk::Geometry.
Referenced by camitk::Component::getRenderingModes().
|
pure virtual |
This method is called when a vtkPoint included in the vtk representation was picked.
When the picking mode is set in InteractiveViewer to POINT_PICKING the vtk picker can select a specific vtkPoint in the big Geometry.
A Component re-implementing this method can manage a specific selection process (or any other suitable action).
pointId | the vtkPoint id that was selected by picking |
pickingIsSelecting | indicates if the current picking session is selecting or unselecting |
Implemented in camitk::Component, camitk::Geometry, and camitk::MeshComponent.
|
pure virtual |
remove a given additional prop.
Implemented in camitk::Component, and camitk::Geometry.
|
pure virtual |
Set the color of given representation modes.
color | the 4-sized double tab of color (r,g,b,a) of the actor. |
Implemented in camitk::Geometry.
|
pure virtual |
Set the color of given representation modes.
Implemented in camitk::Geometry.
|
pure virtual |
Set the opacity of this representation modes. WARNING color field (surfaceColor, ...) are not modified!
Implemented in camitk::Geometry.
|
pure virtual |
Set an (r,g,b) color to all representation modes, without changing the opacity.
Implemented in camitk::Geometry.
|
pure virtual |
Set an (r,g,b,a) color to all representation modes.
Implemented in camitk::Geometry.
|
pure virtual |
Set/reset the connection for the InterfaceGeometry internal algorithm.
This method sets the input for the InterfaceGeometry mapping/rendering pipeline. Your should call this method to have the correct rendering of your custom filter/algorithm pipelines. Typically, your custom filter/algorithm connection should end with:
To remove your custom pipeline, either call setDataConnection(NULL) or theAbstractGeometry->setDataConnection(theAbstractGeometry->getDataPort())
Implemented in camitk::Geometry.
Referenced by MeshClipping::changeAllComponents(), MeshClipping::clipMesh(), RigidTransform::close(), RigidTransform::getWidget(), LoadTransformation::loadTransformationFile(), and MeshClipping::restoreMeshes().
|
pure virtual |
set the enhanced mode
Implemented in camitk::Geometry.
Referenced by PMLComponent::refreshDisplay(), and camitk::InteractiveViewer::updateSelectionDisplay().
|
pure virtual |
Set the glyph type (a glyph is a geometric representation attached to every point in the input dataset).
The glyph size is needed when the type is not NoGlyph (the size value is used depending on the current GlyphTypes) :
To show the glyph call getProp("glyph")->SetVisibility(true) or getProp("glyph")->VisibilityOn().
type | the glyph type |
size | size of the glyph (default is 0.0) |
Implemented in camitk::Geometry.
Referenced by camitk::Component::deleteChildren().
|
pure virtual |
set the string used to display the label
Implemented in camitk::Component, and camitk::Geometry.
|
pure virtual |
set the lines as tubes (works only for vtkDataSet representation that contains lines)
Implemented in camitk::Geometry.
Referenced by camitk::InteractiveViewer::refresh().
|
pure virtual |
Set the mapper scalar range.
Implemented in camitk::Geometry.
|
pure virtual |
set the transformation for 3D representation
Implemented in camitk::Geometry.
Referenced by camitk::MeshComponent::initRepresentation().
|
pure virtual |
Set the opacity of this object. WARNING color field (surfaceColor, ...) are not modified!
Implemented in camitk::Geometry.
|
pure virtual |
set the point data (may contains a lookup table).
Implemented in camitk::Geometry.
|
pure virtual |
set a given point position
Implemented in camitk::Geometry.
|
pure virtual |
set the low-level data set.
Implemented in camitk::Geometry.
Referenced by camitk::MeshComponent::initRepresentation().
|
pure virtual |
Implemented in camitk::Geometry.
|
pure virtual |
Set a texture to this object.
Implemented in camitk::Geometry.
Referenced by LoadTextureFromBMP::process().