This class describes what are the methods to implement for a Geometry (rendering parameters, input/output, filters, picking parameters...). More...
#include <InterfaceGeometry.h>
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 | ~InterfaceGeometry ()=default |
| empty virtual destructor, to avoid memory leak | |
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. | |
| virtual void | setPointData (vtkSmartPointer< vtkDataArray >)=0 |
| set the point data (may contains a lookup table). | |
| virtual void | setMeshWorldTransform (vtkSmartPointer< vtkTransform >)=0 |
| set the transformation for 3D representation | |
| virtual vtkSmartPointer< vtkAlgorithmOutput > | getDataPort () const =0 |
| get the custom algorithm pipeline input. | |
| virtual void | setDataConnection (vtkSmartPointer< vtkAlgorithmOutput >)=0 |
| Set/reset the connection for the InterfaceGeometry internal algorithm. | |
| virtual void | setTexture (vtkSmartPointer< vtkTexture >)=0 |
| Set a texture to this object. | |
| virtual void | pointPicked (vtkIdType pointId, bool pickingIsSelecting)=0 |
| This method is called when a vtkPoint included in the vtk representation was picked. | |
| virtual void | cellPicked (vtkIdType cellId, bool pickingIsSelecting)=0 |
| This method is called when a vtkCell included in the vtk representation was picked. | |
| virtual vtkSmartPointer< vtkActor > | getActor (const RenderingModes)=0 |
| Return the actor for the representation mode, nullptr if the actor doesn't exist. | |
manage extra prop associated with an InterfaceGeometry | |
TODO
| |
| virtual vtkSmartPointer< vtkProp > | getProp (const QString &)=0 |
| Return the vtkProp (actors, volumes and annotations) corresponding to the given name. | |
| virtual unsigned int | getNumberOfProp () const =0 |
| return the number of additional prop | |
| virtual vtkSmartPointer< vtkProp > | getProp (unsigned int)=0 |
| return an additional prop by its index | |
| virtual bool | removeProp (const QString &)=0 |
| remove a given additional prop. | |
| virtual bool | addProp (const QString &, vtkSmartPointer< vtkProp >)=0 |
| insert an additional prop, defining it by its name (default visibility = false). | |
| virtual void | updateLabel (const QString &label)=0 |
| update position and text of the label prop | |
Helpers methods | |
| virtual void | getBounds (double *bounds)=0 |
| compute the object's bounding box [xmin,xmax, ymin,ymax, zmin,zmax] | |
| virtual double | getBoundingRadius ()=0 |
| compute the object's bounding sphere radius | |
| virtual void | setPointPosition (const unsigned int orderNumber, const double x, const double y, const double z)=0 |
| set a given point position | |
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. | |
| virtual void | setEnhancedModes (const EnhancedModes)=0 |
| set the enhanced mode | |
| virtual const EnhancedModes | getEnhancedModes () const =0 |
| get the current enhanced mode | |
| virtual void | setActorColor (const RenderingModes, double *color)=0 |
| Set the color of given representation modes. | |
| virtual void | setActorColor (const RenderingModes, const double, const double, const double)=0 |
| Set the color of given representation modes. | |
| virtual void | getActorColor (const RenderingModes mode, double *color, bool ignoreEnhancedModes=false) const =0 |
| Get the color of given representation modes in the second parameter. | |
| virtual void | setColor (const double, const double, const double)=0 |
| Set an (r,g,b) color to all representation modes, without changing the opacity. | |
| virtual void | setColor (const double, const double, const double, const double)=0 |
| Set an (r,g,b,a) color to all representation modes. | |
| virtual void | setActorOpacity (const RenderingModes, const double)=0 |
| Set the opacity of this representation modes. WARNING color field (surfaceColor, ...) are not modified! | |
| virtual double | getActorOpacity (const RenderingModes) const =0 |
| Return the opacity of a given renderng mode. | |
| virtual void | setOpacity (const double)=0 |
| Set the opacity of this object. WARNING color field (surfaceColor, ...) are not modified! | |
| virtual void | setMapperScalarRange (double min, double max)=0 |
| Set the mapper scalar range. | |
| 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). | |
| virtual void | setLinesAsTubes (bool isTubes=true, bool radiusFromLength=true, double radiusFactor=1.0/40.0, int numberOfSides=5)=0 |
| Set the lines as tubes (works only for vtkDataSet representation that contains lines). | |
| virtual void | setColorMode (int vtkColorMode=VTK_COLOR_MODE_DEFAULT)=0 |
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.
References addProp().
Referenced by addProp().
|
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.
References cellPicked().
Referenced by cellPicked().
|
pure virtual |
Return the actor for the representation mode, nullptr if the actor doesn't exist.
Implemented in camitk::Geometry.
References getActor().
Referenced by getActor().
|
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. |
| ignoreEnhancedModes | Return the color without considering the changes that may be due to enhanced modes (highlight) |
Implemented in camitk::Geometry.
References getActorColor().
Referenced by getActorColor().
|
pure virtual |
Return the opacity of a given renderng mode.
Implemented in camitk::Geometry.
References getActorOpacity().
Referenced by getActorOpacity().
|
pure virtual |
compute the object's bounding sphere radius
Implemented in camitk::Component, and camitk::Geometry.
References getBoundingRadius().
Referenced by 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.
References getBounds().
Referenced by getBounds().
|
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.
References getDataPort().
Referenced by getDataPort().
|
pure virtual |
get the current enhanced mode
Implemented in camitk::Geometry.
References getEnhancedModes().
Referenced by camitk::Component::delegateAndInvokeChildren1(), and getEnhancedModes().
|
pure virtual |
return the number of additional prop
Implemented in camitk::Component, and camitk::Geometry.
References getNumberOfProp().
Referenced by getNumberOfProp().
|
pure virtual |
Implemented in camitk::Geometry.
References getPointSet().
Referenced by AppendMeshes::apply(), CleanPolyData::apply(), Decimation::apply(), ExtractEdges::apply(), ExtractSelection::apply(), ExtractSurface::apply(), FillWithPoints::apply(), ICPRegistration::apply(), MergeMeshes::apply(), MeshPicking::apply(), WarpOut::apply(), camitk::Component::delegateGet0(), camitk::MeshComponent::getFieldData(), camitk::MeshComponent::getNumberOfDataArray(), getPointSet(), camitk::MeshComponent::initDynamicProperties(), PMLComponent::refreshDisplay(), MshExtension::save(), PMLComponentExtension::save(), CenterMesh::updateMeshBarycenter(), 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.
References getProp().
|
pure virtual |
return an additional prop by its index
Implemented in camitk::Component, and camitk::Geometry.
References getProp().
|
pure virtual |
Return if the actor associated to a rendering mode is currently visible or not.
Implemented in camitk::Component, and camitk::Geometry.
References getRenderingModes().
Referenced by 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.
References pointPicked().
Referenced by pointPicked().
|
pure virtual |
remove a given additional prop.
Implemented in camitk::Component, and camitk::Geometry.
References removeProp().
Referenced by removeProp().
|
pure virtual |
Set the color of given representation modes.
Implemented in camitk::Geometry.
References setActorColor().
|
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.
References setActorColor().
Referenced by setActorColor(), and setActorColor().
|
pure virtual |
Set the opacity of this representation modes. WARNING color field (surfaceColor, ...) are not modified!
Implemented in camitk::Geometry.
References setActorOpacity().
Referenced by camitk::Component::delegateAndInvokeChildren2(), camitk::MeshComponent::fromVariant(), and setActorOpacity().
|
pure virtual |
Set an (r,g,b) color to all representation modes, without changing the opacity.
Implemented in camitk::Geometry.
References setColor().
Referenced by setColor(), and setColor().
|
pure virtual |
Set an (r,g,b,a) color to all representation modes.
Implemented in camitk::Geometry.
References setColor().
|
pure virtual |
Implemented in camitk::Geometry.
References setColorMode().
Referenced by camitk::Component::delegate1(), setColorMode(), and camitk::MeshComponent::setDataRepresentationVisibility().
|
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(nullptr) or theAbstractGeometry->setDataConnection(theAbstractGeometry->getDataPort())
Implemented in camitk::Geometry.
References setDataConnection().
Referenced by LoadTransformation::apply(), camitk::Component::delegate1(), and setDataConnection().
|
pure virtual |
set the enhanced mode
Implemented in camitk::Geometry.
References setEnhancedModes().
Referenced by camitk::Component::delegateAndInvokeChildren1(), setEnhancedModes(), 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.
References setGlyphType().
Referenced by setGlyphType().
|
pure virtual |
Set the lines as tubes (works only for vtkDataSet representation that contains lines).
| isTubes | activate tube representation of lines |
| radiusFromLength | radius of tubes is computed as a proportion of line length |
| radiusFactor | radius of tubes will be : radiusFactor*lineLength if radiusFromLength is true, radiusFactor if it is false |
| numberOfSides | Number of sides of the tubes |
Implemented in camitk::Component, and camitk::Geometry.
References setLinesAsTubes().
Referenced by setLinesAsTubes().
|
pure virtual |
Set the mapper scalar range.
Implemented in camitk::Geometry.
References setMapperScalarRange().
Referenced by setMapperScalarRange().
|
pure virtual |
set the transformation for 3D representation
Implemented in camitk::Geometry.
References setMeshWorldTransform().
Referenced by setMeshWorldTransform().
|
pure virtual |
Set the opacity of this object. WARNING color field (surfaceColor, ...) are not modified!
Implemented in camitk::Geometry.
References setOpacity().
Referenced by camitk::Component::delegateAndInvokeChildren1(), and setOpacity().
|
pure virtual |
set the point data (may contains a lookup table).
Implemented in camitk::Geometry.
References setPointData().
Referenced by camitk::Component::delegate1(), and setPointData().
|
pure virtual |
set a given point position
Implemented in camitk::Geometry.
References setPointPosition().
Referenced by camitk::Component::delegate4(), and setPointPosition().
|
pure virtual |
set the low-level data set.
Implemented in camitk::Geometry.
References setPointSet().
Referenced by setPointSet().
|
pure virtual |
|
pure virtual |
Set a texture to this object.
Implemented in camitk::Geometry.
References setTexture().
Referenced by camitk::Component::delegate1(), and setTexture().
|
pure virtual |
update position and text of the label prop
Implemented in camitk::Geometry.
References updateLabel().
Referenced by updateLabel().