![]() |
Computer Assited Medical Intervention Tool Kit
|
A Component represents something that could be included in the explorer view, the interactive 3D viewer, and that could have or not a contextual popup menu (open by a right click in the explorer), a property dialog (to change some properties) Thus, a Component inherits from many abstract classes. More...
#include <Component.h>
Public Types | |
enum | Representation { GEOMETRY, SLICE, NO_REPRESENTATION } |
The different representation that can be implemented to represent this Component in the InteractiveViewer. More... | |
![]() | |
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... | |
![]() | |
enum | PossibleOrientation { AXIAL_ORIENTATION, CORONAL_ORIENTATION, SAGITTAL_ORIENTATION, ARBITRARY_ORIENTATION } |
Common slices orientation: axial, sagittal, coronal or anything else. More... |
Public Member Functions | |
Component top level methods | |
All the methods specific to a data component (but not described in any abstract representation classes) | |
Component (const QString &file, const QString &name, Representation rep=NO_REPRESENTATION) | |
Component constructor for top-level component (please use the other constructor for sub-level components). | |
Component (Component *parentComponent, const QString &name, Representation rep=NO_REPRESENTATION) throw (AbortException) | |
Component constructor for a Component that is a child of another Component You should not use this constructor for a top-level component. | |
virtual | ~Component () |
default destructor | |
Representation | getRepresentation () const |
return the type of representation concretely implemented by this Component in the InteractiveViewer. | |
bool | isTopLevel () const |
return true if this component is a top-level component | |
virtual Component * | getParentComponent () |
get the parent component | |
virtual Component * | getTopLevelComponent () |
get the top-level component | |
virtual void | setModified (bool modified=true) |
set the modified flag | |
virtual bool | getModified () const |
set the modified flag | |
virtual void | setVisibility (Viewer *, bool) |
set the visibility for a viewer | |
virtual bool | getVisibility (Viewer *) const |
get the visibility of a viewer | |
virtual void | refresh () const |
refresh all the viewer that are currently displaying this Component | |
virtual void | refreshInterfaceNode () |
Asks all viewers that are currently displaying this Component to rebuild the representation of the InterfaceNode for this Component. | |
virtual bool | isSelected () const |
Check if this data component is selected. | |
virtual void | setSelected (const bool, const bool recursive=true) |
Update the selection flag. | |
const QString | getFileName () const |
get the file name where the data have to be stored/were stored | |
void | setFileName (const QString &) |
set the file name where the data have to be stored | |
bool | event (QEvent *e) |
Overriden from QObject, this one is only intercepting signal for dynamic property changed (see constructor). | |
QMenu * | getActionAndPopupMenu () |
Get a QMenu that contains all the action that can be applied to this component + the popup menu (if exists). | |
InterfaceProperty | |
All the implemented InterfaceProperty methods | |
QStringList | getHierarchy () |
bool | isInstanceOf (QString className) |
Assert that a Component instance really inherits from a given className. | |
virtual QWidget * | getPropertyWidget (QWidget *parent=0) |
get the property widget to display. | |
virtual QObject * | getPropertyObject () |
get the property object that could be understood by PropertyEditor. | |
void | updateProperty (QString name, QVariant value) |
update property: if you override this method, do not forget to call the superclass method for the property not managed locally in order to properly manage all inherited dynamic properties. | |
InterfaceNode | |
All the implemented InterfaceNode methods | |
virtual void | addChild (InterfaceNode *) |
add a child Component (sub item in the hierarchy), and modify the child's parent to be equal to this instance | |
virtual void | attachChild (InterfaceNode *) |
add a child Component (but leave its parent unchanged) | |
virtual void | removeChild (InterfaceNode *) |
remove from the the sub item vector. | |
virtual void | setParent (InterfaceNode *) |
set the parent Component. This method automatically remove this Component from its previous (if already had one parent Component) | |
virtual void | deleteChildren () |
delete all sub Component, but do not delete the pointer (only the top-level component has the right to do that) | |
virtual QString | getName () const |
get the name to be displayed | |
virtual void | setName (const QString &) |
set the name to be displayed | |
virtual const ComponentList & | getChildren () |
get the list of the InterfaceNode children (sub items in the hierarchy) | |
virtual bool | doubleClicked () |
this method is called each time the InterfaceNode is double clicked by the user. | |
virtual InterfaceNode * | getParent () |
get the parent Component | |
virtual QPixmap | getIcon () |
Get the pixmap that will be displayed for this node. | |
virtual bool | inItalic () const |
A component name is not displayed in italic by default. | |
virtual QMenu * | getPopupMenu (QWidget *parent=0) |
get the popup menu to display (always return NULL, overwrite this method if you want to give here you own popup) | |
InterfaceGeometry | |
All the implemented InterfaceGeometry methods (delegated or not, see also Component.cpp) | |
const QString | getLabel () const |
void | setLabel (QString newName) |
set the string used to display the label, do the same as setName | |
virtual vtkSmartPointer < vtkPointSet > | getPointSet () |
virtual void | setPointSet (vtkSmartPointer< vtkPointSet > param) |
set the low-level data set. | |
virtual void | setPointData (vtkSmartPointer< vtkDataArray > param) |
set the point data (may contains a lookup table). | |
virtual vtkSmartPointer < vtkAlgorithmOutput > | getDataPort () const |
get the custom algorithm pipeline input. | |
virtual void | setDataConnection (vtkSmartPointer< vtkAlgorithmOutput > param) |
Set/reset the connection for the InterfaceGeometry internal algorithm. | |
virtual vtkSmartPointer< vtkActor > | getActor (const RenderingModes param) |
Return the actor for the representation mode, NULL if the actor doesn't exist. | |
virtual vtkSmartPointer< vtkProp > | getProp (const QString ¶m) |
Return the vtkProp (actors, volumes and annotations) corresponding to the given name. | |
virtual unsigned int | getNumberOfProp () const |
return the number of additional prop | |
virtual vtkSmartPointer< vtkProp > | getProp (unsigned int index) |
return an additional prop by its index | |
virtual bool | addProp (const QString &name, vtkSmartPointer< vtkProp > prop) |
insert an additional prop, defining it by its name (default visibility = false) | |
virtual bool | removeProp (const QString &name) |
remove a given additional prop. | |
virtual void | pointPicked (vtkIdType, bool) |
an inherited class can redefine this method something specific. | |
virtual void | cellPicked (vtkIdType, bool) |
an inherited class can redefine this method something specific. | |
virtual void | getBounds (double bounds[6]) |
compute the object's bounding box [xmin,xmax, ymin,ymax, zmin,zmax], see Component.cpp | |
virtual double | getBoundingRadius () |
compute the object's bounding sphere radius, | |
virtual void | setPointPosition (const unsigned int param1, const double param2, const double param3, const double param4) |
set a given point position | |
virtual void | setRenderingModes (const RenderingModes param) |
virtual const RenderingModes | getRenderingModes () const |
see Component.cpp | |
virtual void | setEnhancedModes (const EnhancedModes param) |
set the enhanced mode | |
virtual const EnhancedModes | getEnhancedModes () const |
get the current enhanced mode | |
virtual void | setActorColor (const RenderingModes param1, double param2[4]) |
Set the color of given representation modes. | |
virtual void | setActorColor (const RenderingModes param1, const double param2, const double param3, const double param4) |
Set the color of given representation modes. | |
virtual void | getActorColor (const RenderingModes, double[4]) |
see Component.cpp | |
virtual void | setColor (const double param1, const double param2, const double param3) |
Set an (r,g,b) color to all representation modes, without changing the opacity. | |
virtual void | setColor (const double param1, const double param2, const double param3, const double param4) |
Set an (r,g,b,a) color to all representation modes. | |
virtual void | setActorOpacity (const RenderingModes param1, const double param2) |
Set the opacity of this representation modes. WARNING color field (surfaceColor, ...) are not modified! | |
virtual double | getActorOpacity (const RenderingModes param) const |
Return the opacity of a given renderng mode. | |
virtual void | setOpacity (const double param) |
Set the opacity of this object. WARNING color field (surfaceColor, ...) are not modified! | |
virtual void | setTexture (vtkSmartPointer< vtkTexture > param) |
Set a texture to this object. | |
virtual void | setGlyphType (const GlyphTypes type, const double size=0.0) |
Set the glyph type (a glyph is a geometric representation attached to every point in the input dataset). | |
virtual void | setLinesAsTubes (bool param) |
set the lines as tubes (works only for vtkDataSet representation that contains lines) | |
InterfaceBitMap | |
All the implemented InterfaceBitMap methods | |
virtual vtkSmartPointer < vtkImageData > | getImageData () const |
Return the displayed images as a vtkImageData. | |
virtual void | setOriginalVolume (vtkSmartPointer< vtkImageData > param) |
set the original volume image data (the source vtkImageData before any reslice) and refresh the vtk pipeline | |
virtual vtkSmartPointer < vtkImageActor > | get2DImageActor () const |
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 2D. | |
virtual vtkSmartPointer < vtkImageActor > | get3DImageActor () const |
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 2D. | |
virtual vtkSmartPointer< vtkActor > | getPickPlaneActor () const |
Return the vtkActor used to pick pixels in the slices. | |
virtual vtkSmartPointer< vtkActor > | getPixelActor () |
Return the vtkActor used to pick pixels in the slices. | |
virtual void | pixelPicked (double param1, double param2, double param3) |
This method is called when the associated plane has been picked in the InteractiveViewer, the given coordinates is position where the plane was picked. | |
virtual void | updatePickPlane () |
virtual void | setSlice (int param) |
Set the current slice index. | |
virtual void | setSlice (double param1, double param2, double param3) |
Set the slice corresponding to the given world coordinates. | |
virtual void | setRotationX (double param) |
Set the current angle to the arbitrary slice. | |
virtual void | setRotationY (double param) |
virtual void | setRotationZ (double param) |
virtual int | getNumberOfColors () const |
Return the number of colors in the images. | |
virtual void | setPixelRealPosition (double param1, double param2, double param3) |
move the pixel selection green indicator (pixelActor) to the given real position | |
virtual double | getRotationX () const |
see Component.cpp | |
virtual double | getRotationY () const |
see Component.cpp | |
virtual double | getRotationZ () const |
see Component.cpp | |
virtual int | getNumberOfSlices () const |
see Component.cpp | |
virtual int | getSlice () const |
see Component.cpp | |
![]() | |
virtual | ~InterfaceProperty () |
empty virtual destructor, to avoid memory leak | |
![]() | |
virtual | ~InterfaceNode () |
empty virtual destructor, to avoid memory leak | |
![]() | |
virtual | ~InterfaceGeometry () |
empty virtual destructor, to avoid memory leak | |
![]() | |
virtual | ~InterfaceBitMap () |
virtual destructor |
Protected Attributes | |
ComponentList | childrenComponent |
The explorer sub items. | |
bool | isSelectedFlag |
tells if this particular Component is selected or not | |
bool | modifiedFlag |
the modificatio flag (could be extended to manage a undo/redo list) | |
QString | myFileName |
the file name from which the Component is loaded | |
InterfaceGeometry * | myGeometry |
myGeometry is the 3d representation of this Component, the Component delegates all InterfaceGeometry activity to myGeometry (delegation pattern) | |
InterfaceNode * | myParentNode |
who is the boss? The Component! | |
InterfaceBitMap * | mySlice |
mySlice is the slice representation of this data component, the Component delegates all InterfaceBitMap activity to mySlice (delegation pattern) |
Static Private Attributes | |
Static members | |
All the static member (manage the application-wide list of Component + the application-wide current selection + viewers) | |
static QSet< Viewer * > | allViewers |
Instance members | |
Representation | myService |
the service implemented to be represented in the InteractiveViewer | |
QString | myName |
my name | |
QMap< Viewer *, bool > | myViewers |
Where is this Component currently viewed. | |
QMenu * | actionsMenu |
the action menu for this component | |
void | init () |
method called in constructors for general initialization | |
virtual void | initRepresentation ()=0 |
Instanciate the concrete representation (either InterfaceGeometry or InterfaceBitMap) if needed. |
Additional Inherited Members | |
![]() | |
QMap< QString, vtkSmartPointer < vtkProp > > | extraProp |
The additional map for prop (include at least "label" and "glyph". |
A Component represents something that could be included in the explorer view, the interactive 3D viewer, and that could have or not a contextual popup menu (open by a right click in the explorer), a property dialog (to change some properties) Thus, a Component inherits from many abstract classes.
A Component can only have one implemented representation.
For CAMITK core developers: This class uses the Object Adapter Design Pattern (aka delegate pattern) to delegates all InterfaceGeometry and InterfaceBitMap to respectively myGeometry:Geometry and mySlice:InterfaceBitMap It handles the InterfaceNode without delegation. Considering this Design Pattern, Component is the Adaptor and Geometry and InterfaceBitMap are the Adaptee classes.
This class has some static member to manage all the currently instanciated Components as well as the currently selected Components.
Actions generally use setPointSet() (for InterfaceGeometry) and setOriginalVolume (for InterfaceBitMap) to do some data processing and directly modify the low-level Vtk data. It is thus very important to rewrite these methods in your Component subclass to takes the actions' modification into account in your low-level data.
Dynamic properties: if your Component defines some dynamic property, you might want to override updateProperty() in order to update the internal state of your object when a dynamic property has been changed.
It is extensively using Qt Meta-Object system (concepts and implementation). see http://doc.qt.nokia.com/latest/metaobjects.html
The different representation that can be implemented to represent this Component in the InteractiveViewer.
use getRepresentation() to get the information about a specific Component.
camitk::Component::Component | ( | const QString & | file, |
const QString & | name, | ||
Representation | rep = NO_REPRESENTATION |
||
) |
Component constructor for top-level component (please use the other constructor for sub-level components).
parentComponent is set to NULL (=> isTopLevel() will return true).
file | the file to get the data from |
name | the Component name |
rep | the representation concretely implemented by this Component (default=NO_REPRESENTATION) |
References init().
camitk::Component::Component | ( | Component * | parentComponent, |
const QString & | name, | ||
Representation | rep = NO_REPRESENTATION |
||
) | throw (AbortException) |
Component constructor for a Component that is a child of another Component You should not use this constructor for a top-level component.
parentComponent | the parent Component |
name | the Component name |
rep | the representation implemented by this Component (default=NO_REPRESENTATION) |
AbortException | if parentComponent is NULL. |
References CAMITK_ERROR.
|
virtual |
default destructor
References deleteChildren(), isSelectedFlag, myGeometry, mySlice, myViewers, camitk::Application::removeComponent(), and setSelected().
|
virtual |
add a child Component (sub item in the hierarchy), and modify the child's parent to be equal to this instance
Implements camitk::InterfaceNode.
Reimplemented in StructuralComponentDC, and MultiComponentDC.
References attachChild(), and camitk::InterfaceNode::setParent().
Referenced by MMLComponent::connectPml().
|
inlinevirtual |
insert an additional prop, defining it by its name (default visibility = false)
Implements camitk::InterfaceBitMap.
Referenced by RenderingOption::apply(), VolumeRenderingAction::process(), AnyDecoration::show(), and AtomDecoration::show().
|
virtual |
add a child Component (but leave its parent unchanged)
Implements camitk::InterfaceNode.
References childrenComponent.
Referenced by addChild(), MultiComponentDC::addSubMC(), MultiComponentDC::addSubSC(), and StructuralComponentDC::StructuralComponentDC().
|
inlinevirtual |
an inherited class can redefine this method something specific.
Default behaviour: do nothing.
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC, camitk::MeshComponent, and VtkMeshComponent.
Referenced by camitk::InteractiveViewer::actorPicked().
|
virtual |
delete all sub Component, but do not delete the pointer (only the top-level component has the right to do that)
Implements camitk::InterfaceNode.
Reimplemented in ComponentDC.
References childrenComponent, and camitk::Application::isAlive().
Referenced by MMLComponent::connectPml(), camitk::ImageComponent::replaceImageData(), and ~Component().
|
inlinevirtual |
this method is called each time the InterfaceNode is double clicked by the user.
Implements camitk::InterfaceNode.
Reimplemented in AtomDC.
Referenced by camitk::Explorer::doubleClicked().
bool camitk::Component::event | ( | QEvent * | e | ) |
Overriden from QObject, this one is only intercepting signal for dynamic property changed (see constructor).
References updateProperty().
|
inlinevirtual |
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 2D.
Implements camitk::InterfaceBitMap.
Referenced by camitk::InteractiveViewer::refresh(), and camitk::InteractiveViewer::toggleInterpolation().
|
inlinevirtual |
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 2D.
Implements camitk::InterfaceBitMap.
Referenced by camitk::InteractiveViewer::refresh(), and camitk::InteractiveViewer::toggleInterpolation().
QMenu * camitk::Component::getActionAndPopupMenu | ( | ) |
Get a QMenu that contains all the action that can be applied to this component + the popup menu (if exists).
This method will be soon obsolete and be replaced by getPopupMenu, which will not be maintain in its current version). You are encourage to build Action not getPopupMenu() anymore.
References camitk::actionLessThan(), actionsMenu, camitk::Application::getActions(), camitk::Action::getFamily(), getPopupMenu(), and camitk::Action::getQAction().
Referenced by camitk::Explorer::rightButtonPressed(), and ImpMainWindow::updateActionStates().
|
inlinevirtual |
Return the actor for the representation mode, NULL if the actor doesn't exist.
Implements camitk::InterfaceGeometry.
Referenced by VtkMeshComponentProperties::getAmbient(), VtkMeshComponentProperties::getDiffuse(), VtkMeshComponentProperties::getOpacity(), VtkMeshComponentProperties::getSpecular(), VtkMeshComponentProperties::getSpecularColor(), VtkMeshComponentProperties::getSpecularPower(), camitk::InteractiveViewer::refresh(), VtkMeshComponentProperties::setAmbient(), VtkMeshComponentProperties::setDiffuse(), VtkMeshComponentProperties::setOpacity(), VtkMeshComponentProperties::setSpecular(), VtkMeshComponentProperties::setSpecularColor(), and VtkMeshComponentProperties::setSpecularPower().
|
virtual |
see Component.cpp
Implements camitk::InterfaceGeometry.
References childrenComponent, camitk::InterfaceGeometry::getActorColor(), and myGeometry.
Referenced by StructuralComponentDC::setActorColor().
|
inlinevirtual |
Return the opacity of a given renderng mode.
Implements camitk::InterfaceGeometry.
|
virtual |
compute the object's bounding sphere radius,
Implements camitk::InterfaceGeometry.
Reimplemented in PMManagerDC.
References childrenComponent, camitk::InterfaceGeometry::getBoundingRadius(), getBoundingRadius(), and myGeometry.
Referenced by RenderingOption::apply(), and getBoundingRadius().
|
virtual |
compute the object's bounding box [xmin,xmax, ymin,ymax, zmin,zmax], see Component.cpp
Implements camitk::InterfaceGeometry.
Reimplemented in PMManagerDC.
References childrenComponent, getBounds(), invoke1, and myGeometry.
Referenced by getBounds(), and camitk::InteractiveViewer::getBoundsOfSelected().
|
inlinevirtual |
get the list of the InterfaceNode children (sub items in the hierarchy)
Implements camitk::InterfaceNode.
Referenced by camitk::Explorer::add(), StructuralComponentDC::cellsToGeometry(), PMManagerDC::createPointData(), PMManagerDC::destroyPointData(), camitk::Explorer::getNewItem(), camitk::ImageComponent::pixelPicked(), camitk::ImageComponent::setSelected(), and StructuralComponentDC::updateAtoms().
|
inlinevirtual |
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:
Implements camitk::InterfaceGeometry.
Referenced by CenterMesh::apply(), MeshQuality::apply(), RigidTransform::getWidget(), and VtkMeshComponentPopup::loadTransformationFile().
|
inlinevirtual |
const QString camitk::Component::getFileName | ( | ) | const |
get the file name where the data have to be stored/were stored
References myFileName.
Referenced by SaveAsAction::apply(), VtkMeshComponentPopup::cleanPolyData(), PMManagerDCPopup::openLoads(), PMManagerDCPopup::openReferencePML(), VtkImageComponentExtension::save(), VtkMeshComponentExtension::save(), PMComponentExtension::save(), VRMLComponentExtension::save(), MshExtension::save(), camitk::ComponentExtension::save(), camitk::Application::save(), PMManagerDCPopup::saveAsLoads(), NiftiImageComponentExtension::saveImage(), ItkImageComponentExtension::saveImage(), MMLComponent::saveMML(), and StructuralComponentDCPopup::saveToCsv().
|
virtual |
Get the inheritance hierachy of this Component instance as a list of QString
Implements camitk::InterfaceProperty.
Referenced by camitk::Application::getActions(), and isInstanceOf().
|
inlinevirtual |
Get the pixmap that will be displayed for this node.
If you want your component to have a nice pixmap displayed in the explorer, for example, you just need to 1. declare a new static member and redefines the getIcon() method (in MyComponent.h): @code
public: virtual QPixmap getIcon(); private: static QPixmap * myPixmap; // declare a ptr here (it is static for optimization)
Implements camitk::InterfaceNode.
Reimplemented in PMManagerDC, StructuralComponentDC, AtomDC, VtkMeshComponent, MultiComponentDC, and CellDC.
Referenced by camitk::Explorer::getNewItem().
|
inlinevirtual |
Return the displayed images as a vtkImageData.
Implements camitk::InterfaceBitMap.
Referenced by camitk::SingleImageComponent::initRepresentation().
|
inlinevirtual |
get the string used to display the label, do the same as getName
Implements camitk::InterfaceGeometry.
|
inlinevirtual |
set the modified flag
Reimplemented in PMManagerDC, and MMLComponent.
Referenced by camitk::Application::close(), MMLComponent::getModified(), and camitk::Action::postProcess().
|
inlinevirtual |
get the name to be displayed
Implements camitk::InterfaceNode.
Referenced by camitk::InteractiveViewer::actorPicked(), MultiComponentDC::addChild(), AnyDecoration::AnyDecoration(), CleanPolyData::apply(), ExtractSurface::apply(), FillWithPoints::apply(), WarpOut::apply(), CreateSC::apply(), Decimation::apply(), CenterMesh::apply(), SaveAsAction::apply(), MeshQuality::apply(), MeshPicking::apply(), StructuralComponentDC::atomsToGeometry(), ImageReconstructionAction::build3DModel(), CellDC::CellDC(), StructuralComponentDC::cellsToGeometry(), VtkMeshComponentPopup::cleanPolyData(), camitk::Application::close(), camitk::ImageComponent::getImageName(), StructuralComponentDCProperties::getName(), CellDCProperties::getName(), camitk::Explorer::getNewItem(), camitk::ActionWidget::getTargetLabel(), ImageReconstructionAction::init(), CellDC::initRepresentation(), camitk::MeshComponent::initRepresentation(), AtomDC::initRepresentation(), PMManagerDC::initRepresentation(), MultiPickingWidget::manuallyModified(), StructuralComponentDC::pointPicked(), ManualThreshold::process(), MedianFilter::process(), MeanFilter::process(), Derivative::process(), LaplacianRecursiveGaussian::process(), LaplacianSharpening::process(), GradientMagnitudeRecursiveGaussian::process(), Laplacian::process(), CannyEdgeDetection::process(), SobelEdgeDetection::process(), GradientMagnitude::process(), OtsuFilter::process(), ConnectedComponents::process(), RegionGrowing::process(), GaussianFilter::process(), AnisotropicDiffusion::process(), MorphologicalOperators::process(), camitk::Explorer::renameItem(), VtkMeshComponentExtension::save(), camitk::ComponentExtension::save(), camitk::Application::save(), and RegionGrowingWidget::updateComponent().
|
inlinevirtual |
Return the number of colors in the images.
If color is coded on 1 byte, the images are on 256 grey level. If color is coded on 2 bytes, the images are on 4096 grey level (not 65536).
Implements camitk::InterfaceBitMap.
Reimplemented in camitk::ImageComponent.
|
inlinevirtual |
return the number of additional prop
Implements camitk::InterfaceBitMap.
Referenced by camitk::InteractiveViewer::refresh().
|
virtual |
see Component.cpp
Implements camitk::InterfaceBitMap.
Reimplemented in camitk::ImageComponent.
References camitk::InterfaceBitMap::getNumberOfSlices(), and mySlice.
Referenced by camitk::ImageComponent::getNumberOfSlices(), and camitk::InteractiveViewer::refresh().
|
inlinevirtual |
get the parent Component
Implements camitk::InterfaceNode.
Referenced by camitk::Explorer::add(), camitk::SingleImageComponent::pixelPicked(), and camitk::SingleImageComponent::setSelected().
|
virtual |
get the parent component
References myParentNode.
Referenced by camitk::Application::addComponent(), SelectLastInstanciatedAction::apply(), RemoveLastInstanciatedAction::apply(), getTopLevelComponent(), and camitk::SingleImageComponent::initRepresentation().
|
inlinevirtual |
Return the vtkActor used to pick pixels in the slices.
Implements camitk::InterfaceBitMap.
Referenced by camitk::InteractiveViewer::refresh().
|
inlinevirtual |
Return the vtkActor used to pick pixels in the slices.
Implements camitk::InterfaceBitMap.
Referenced by camitk::InteractiveViewer::refresh().
|
inlinevirtual |
Implements camitk::InterfaceGeometry.
Referenced by CleanPolyData::apply(), ExtractSurface::apply(), FillWithPoints::apply(), WarpOut::apply(), CenterMesh::apply(), Decimation::apply(), RenderingOption::apply(), MeshPicking::apply(), MeshQuality::apply(), VtkMeshComponentPopup::cleanPolyData(), VtkMeshComponentPopup::getDisplacementFromTransformation(), VtkMeshComponentPopup::loadTransformationFile(), VtkMeshComponentExtension::save(), PMComponentExtension::save(), VRMLComponentExtension::save(), and MshExtension::save().
|
inlinevirtual |
get the popup menu to display (always return NULL, overwrite this method if you want to give here you own popup)
Implements camitk::InterfaceNode.
Reimplemented in StructuralComponentDC, PMManagerDC, AtomDC, MMLComponent, VtkMeshComponent, and MultiComponentDC.
Referenced by getActionAndPopupMenu().
|
inlinevirtual |
Return the vtkProp (actors, volumes and annotations) corresponding to the given name.
Implements camitk::InterfaceBitMap.
Referenced by RenderingOption::apply(), VolumeRenderingAction::process(), camitk::InteractiveViewer::refresh(), camitk::InteractiveViewer::setGlyph(), camitk::InteractiveViewer::setLabel(), AnyDecoration::show(), AtomDecoration::show(), and camitk::InteractiveViewer::updateActions().
|
inlinevirtual |
return an additional prop by its index
Implements camitk::InterfaceBitMap.
|
inlinevirtual |
get the property object that could be understood by PropertyEditor.
Returns this as any Component instance can manage its list of dynamic properties (and Component inherits from InterfaceProperty ). You can also have a separate class to manage your Component properties. In this case, just overide this method and return the corresponding instance.
Implements camitk::InterfaceProperty.
Reimplemented in StructuralComponentDC, AtomDC, ComponentDC, VtkMeshComponent, and CellDC.
|
inlinevirtual |
get the property widget to display.
(always return NULL, overwrite this method if you want to give here you own widget)
Implements camitk::InterfaceProperty.
Reimplemented in AtomDC.
|
virtual |
see Component.cpp
Implements camitk::InterfaceGeometry.
Reimplemented in ComponentDC.
References childrenComponent, camitk::InterfaceGeometry::getRenderingModes(), getRenderingModes(), myGeometry, and camitk::InterfaceGeometry::None.
Referenced by ChangeColor::apply(), getRenderingModes(), camitk::InteractiveViewer::keyPressEvent(), and camitk::InteractiveViewer::updateActions().
Component::Representation camitk::Component::getRepresentation | ( | ) | const |
return the type of representation concretely implemented by this Component in the InteractiveViewer.
References CAMITK_ERROR, GEOMETRY, myGeometry, myService, mySlice, NO_REPRESENTATION, and SLICE.
Referenced by camitk::InteractiveViewer::keyPressEvent(), camitk::InteractiveViewer::refresh(), camitk::InteractiveViewer::setGlyph(), camitk::InteractiveViewer::setLabel(), camitk::InteractiveViewer::toggleInterpolation(), and camitk::InteractiveViewer::updateActions().
|
virtual |
see Component.cpp
Implements camitk::InterfaceBitMap.
References camitk::InterfaceBitMap::getRotationX(), and mySlice.
|
virtual |
see Component.cpp
Implements camitk::InterfaceBitMap.
References camitk::InterfaceBitMap::getRotationY(), and mySlice.
|
virtual |
see Component.cpp
Implements camitk::InterfaceBitMap.
References camitk::InterfaceBitMap::getRotationZ(), and mySlice.
|
virtual |
see Component.cpp
Implements camitk::InterfaceBitMap.
References camitk::InterfaceBitMap::getSlice(), and mySlice.
Referenced by camitk::SingleImageComponent::pixelPicked(), and camitk::InteractiveViewer::refresh().
|
virtual |
get the top-level component
References getParentComponent(), getTopLevelComponent(), and isTopLevel().
Referenced by CloseAction::apply(), SaveAction::apply(), getTopLevelComponent(), StructuralComponentDCPopup::saveToCsv(), AtomDC::setPointSet(), and StructuralComponentDC::setPointSet().
|
virtual |
get the visibility of a viewer
References myViewers.
Referenced by camitk::InteractiveViewer::keyPressEvent(), camitk::InteractiveViewer::refresh(), camitk::InteractiveViewer::setGlyph(), camitk::InteractiveViewer::setLabel(), and camitk::InteractiveViewer::updateActions().
|
private |
method called in constructors for general initialization
References actionsMenu, camitk::Application::addComponent(), childrenComponent, isSelectedFlag, modifiedFlag, myGeometry, and mySlice.
Referenced by Component().
|
inlinevirtual |
A component name is not displayed in italic by default.
You must redefine this method in you inherited Component to change this behaviour.
Implements camitk::InterfaceNode.
Referenced by camitk::Explorer::getNewItem().
|
privatepure virtual |
Instanciate the concrete representation (either InterfaceGeometry or InterfaceBitMap) if needed.
This method have to instanciate Slice (mySlice) or Geometry (myGeometry) that does all the work for this Component, i.e. the adaptee handler. Generally this method should be called in the Component constructor.
Implemented in camitk::SingleImageComponent, MMLComponent, and VRMLComponent.
|
virtual |
Assert that a Component instance really inherits from a given className.
Implements camitk::InterfaceProperty.
References getHierarchy().
Referenced by LoadsManager::addLoad(), ComponentDC::createPointData(), PMManagerDC::createPointData(), ComponentDC::destroyPointData(), PMManagerDC::destroyPointData(), PMManagerDC::getDC(), MultiComponentDC::removeChild(), camitk::Action::setInputComponent(), camitk::Action::setInputComponents(), camitk::Action::trigger(), and StructuralComponentDC::updatePosition().
|
inlinevirtual |
Check if this data component is selected.
Referenced by camitk::InteractiveViewer::getBoundsOfSelected(), camitk::Explorer::refresh(), and camitk::InteractiveViewer::updateSelectionDisplay().
bool camitk::Component::isTopLevel | ( | ) | const |
return true if this component is a top-level component
References myParentNode.
Referenced by SaveAsAction::apply(), and getTopLevelComponent().
|
inlinevirtual |
This method is called when the associated plane has been picked in the InteractiveViewer, the given coordinates is position where the plane was picked.
Implements camitk::InterfaceBitMap.
Reimplemented in camitk::SingleImageComponent.
Referenced by camitk::InteractiveViewer::actorPicked().
|
inlinevirtual |
an inherited class can redefine this method something specific.
Default behaviour: do nothing.
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC, AtomDC, camitk::MeshComponent, and VtkMeshComponent.
Referenced by camitk::InteractiveViewer::actorPicked().
|
virtual |
refresh all the viewer that are currently displaying this Component
Reimplemented in camitk::ImageComponent.
References myViewers.
Referenced by MultiComponentDCPopup::addNewMultiComponent(), MultiComponentDCPopup::addNewStructuralComponent(), MMLComponent::connectPml(), camitk::ImageComponent::refresh(), camitk::Explorer::renameItem(), LoadsManager::setDisplayLoads(), StructuralComponentDCProperties::setName(), CellDCProperties::setName(), AtomDCProperties::setPosition(), camitk::InteractiveViewer::toggleInterpolation(), and AtomDCWidget::usedInTableClicked().
|
virtual |
Asks all viewers that are currently displaying this Component to rebuild the representation of the InterfaceNode for this Component.
It calls the method update(Component *) of the class Viewer. This method does nothing except for the Explorer where it does not only refresh, but remove this and re-load the Component.
References myViewers.
Referenced by CreateSC::apply(), MMLComponent::connectPml(), and camitk::ImageComponent::replaceImageData().
|
virtual |
remove from the the sub item vector.
This method automatically update the parentComponent of (set to NULL).
Implements camitk::InterfaceNode.
Reimplemented in StructuralComponentDC, and MultiComponentDC.
References childrenComponent, and camitk::InterfaceNode::setParent().
Referenced by MMLComponent::connectPml(), and camitk::ImageComponent::replaceImageData().
|
inlinevirtual |
remove a given additional prop.
Implements camitk::InterfaceBitMap.
Referenced by VolumeRenderingAction::process(), AnyDecoration::~AnyDecoration(), and AtomDecoration::~AtomDecoration().
|
inlinevirtual |
Set the color of given representation modes.
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC.
Referenced by ChangeColor::apply().
|
inlinevirtual |
Set the color of given representation modes.
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC.
|
inlinevirtual |
Set the opacity of this representation modes. WARNING color field (surfaceColor, ...) are not modified!
Implements camitk::InterfaceGeometry.
|
inlinevirtual |
Set an (r,g,b) color to all representation modes, without changing the opacity.
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC.
|
inlinevirtual |
Set an (r,g,b,a) color to all representation modes.
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC.
|
inlinevirtual |
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())
Implements camitk::InterfaceGeometry.
Referenced by RigidTransform::close(), RigidTransform::getWidget(), and VtkMeshComponentPopup::loadTransformationFile().
|
inlinevirtual |
set the enhanced mode
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC, and AtomDC.
Referenced by camitk::InteractiveViewer::updateSelectionDisplay().
void camitk::Component::setFileName | ( | const QString & | fName | ) |
set the file name where the data have to be stored
References myFileName.
Referenced by SaveAsAction::apply().
|
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) |
Implements camitk::InterfaceGeometry.
References myGeometry, and camitk::InterfaceGeometry::setGlyphType().
|
inlinevirtual |
set the string used to display the label, do the same as setName
Implements camitk::InterfaceGeometry.
|
inlinevirtual |
set the lines as tubes (works only for vtkDataSet representation that contains lines)
Implements camitk::InterfaceGeometry.
Referenced by camitk::InteractiveViewer::refresh().
|
inlinevirtual |
set the modified flag
Referenced by MultiComponentDCPopup::addNewMultiComponent(), MultiComponentDCPopup::addNewStructuralComponent(), CenterMesh::apply(), RigidTransform::apply(), VtkMeshComponentPopup::loadTransformationFile(), camitk::MeshComponent::MeshComponent(), PMManagerDC::PMManagerDC(), MMLComponentExtension::save(), VtkMeshComponentExtension::save(), PMComponentExtension::save(), StructuralComponentDCProperties::setName(), CellDCProperties::setName(), AtomDC::setPointSet(), StructuralComponentDC::setPointSet(), and AtomDC::updatePosition().
|
inlinevirtual |
set the name to be displayed
Implements camitk::InterfaceNode.
Reimplemented in PMManagerDC, AtomDC, ComponentDC, and CellDC.
Referenced by ItkImageComponent::createComponent(), DicomComponent::createComponent(), NiftiImageComponent::createComponent(), RawImageComponent::createComponent(), camitk::Explorer::renameItem(), camitk::ImageComponent::setImageName(), and ComponentDC::setName().
|
inlinevirtual |
Set the opacity of this object. WARNING color field (surfaceColor, ...) are not modified!
Implements camitk::InterfaceGeometry.
Reimplemented in ComponentDC.
Referenced by ComponentDC::setOpacity().
|
inlinevirtual |
set the original volume image data (the source vtkImageData before any reslice) and refresh the vtk pipeline
Implements camitk::InterfaceBitMap.
Referenced by camitk::ImageComponent::updateImageComponents().
|
virtual |
set the parent Component. This method automatically remove this Component from its previous (if already had one parent Component)
Implements camitk::InterfaceNode.
References camitk::Application::getTopLevelComponentList(), myParentNode, and camitk::InterfaceNode::removeChild().
|
inlinevirtual |
move the pixel selection green indicator (pixelActor) to the given real position
Implements camitk::InterfaceBitMap.
|
inlinevirtual |
set the point data (may contains a lookup table).
Implements camitk::InterfaceGeometry.
Referenced by CellDC::createPointData(), StructuralComponentDC::createPointData(), CellDC::destroyPointData(), and StructuralComponentDC::destroyPointData().
|
inlinevirtual |
set a given point position
Implements camitk::InterfaceGeometry.
|
inlinevirtual |
set the low-level data set.
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC, and AtomDC.
Referenced by CenterMesh::apply(), RigidTransform::apply(), and VtkMeshComponentPopup::loadTransformationFile().
|
inlinevirtual |
Implements camitk::InterfaceGeometry.
Reimplemented in StructuralComponentDC.
Referenced by RenderingOption::apply(), camitk::InteractiveViewer::keyPressEvent(), and camitk::InteractiveViewer::renderingActorsChanged().
|
inlinevirtual |
Set the current angle to the arbitrary slice.
Implements camitk::InterfaceBitMap.
|
inlinevirtual |
Implements camitk::InterfaceBitMap.
|
inlinevirtual |
Implements camitk::InterfaceBitMap.
|
virtual |
Update the selection flag.
b | the value of the flag (true means "is selected") |
recursive | if true (default), also updates the children Component selection flags. |
Reimplemented in camitk::ImageComponent, StructuralComponentDC, AtomDC, camitk::SingleImageComponent, and CellDC.
References childrenComponent, isSelectedFlag, and setSelected().
Referenced by SelectLastInstanciatedAction::apply(), camitk::Application::clearSelectedComponents(), camitk::Viewer::selectionChanged(), setSelected(), AtomDCWidget::usedInTableClicked(), and ~Component().
|
inlinevirtual |
Set the current slice index.
If the slice index is less than the first slice index, the first slice is displayed. If the slice index is more than the last slice index, the last slice is displayed.
s | the index of the slice to display (base 0). |
Implements camitk::InterfaceBitMap.
Referenced by camitk::ImageComponent::pixelPicked().
|
inlinevirtual |
Set the slice corresponding to the given world coordinates.
Implements camitk::InterfaceBitMap.
|
inlinevirtual |
Set a texture to this object.
Implements camitk::InterfaceGeometry.
|
virtual |
set the visibility for a viewer
References myViewers.
Referenced by camitk::Explorer::add(), AtomDC::AtomDC(), camitk::SingleImageComponent::initRepresentation(), camitk::MeshComponent::initRepresentation(), PMManagerDC::PMManagerDC(), VolumeRenderingAction::process(), CellDC::setSelected(), camitk::SingleImageComponent::setViewSliceIn3D(), and StructuralComponentDC::StructuralComponentDC().
|
inlinevirtual |
Implements camitk::InterfaceBitMap.
|
virtual |
update property: if you override this method, do not forget to call the superclass method for the property not managed locally in order to properly manage all inherited dynamic properties.
This method is called when a dynamic property has to be udpated
name | the name of the dynamic property |
value | the new value to take into account |
Implements camitk::InterfaceProperty.
Reimplemented in ComponentDC, and ObjComponent.
References CAMITK_INFO.
Referenced by event(), and ObjComponent::updateProperty().
|
private |
the action menu for this component
Referenced by getActionAndPopupMenu(), and init().
|
staticprivate |
set of used viewers
|
protected |
The explorer sub items.
Referenced by StructuralComponentDC::atomsToGeometry(), attachChild(), StructuralComponentDC::cellPicked(), StructuralComponentDC::cellsToGeometry(), CellDC::createPointData(), ComponentDC::createPointData(), deleteChildren(), CellDC::destroyPointData(), ComponentDC::destroyPointData(), getActorColor(), getBoundingRadius(), getBounds(), ComponentDC::getEnhancedModes(), ComponentDC::getRenderingModes(), getRenderingModes(), init(), CellDC::initRepresentation(), StructuralComponentDC::pointPicked(), camitk::ImageComponent::refresh(), StructuralComponentDC::removeChild(), removeChild(), ComponentDC::setOpacity(), StructuralComponentDC::setPointSet(), setSelected(), and StructuralComponentDC::updateAtoms().
|
protected |
tells if this particular Component is selected or not
Referenced by init(), AtomDC::initRepresentation(), AtomDC::setSelected(), setSelected(), and ~Component().
|
protected |
the modificatio flag (could be extended to manage a undo/redo list)
Referenced by PMManagerDC::getModified(), and init().
|
protected |
the file name from which the Component is loaded
Referenced by getFileName(), and setFileName().
|
protected |
myGeometry is the 3d representation of this Component, the Component delegates all InterfaceGeometry activity to myGeometry (delegation pattern)
Referenced by getActorColor(), getBoundingRadius(), getBounds(), ComponentDC::getEnhancedModes(), ComponentDC::getRenderingModes(), getRenderingModes(), getRepresentation(), init(), CellDC::initRepresentation(), camitk::MeshComponent::initRepresentation(), AtomDC::initRepresentation(), StructuralComponentDC::initRepresentation(), PMManagerDC::initRepresentation(), setGlyphType(), ComponentDC::setOpacity(), StructuralComponentDC::setPointSet(), CellDC::setSelected(), AtomDC::setSelected(), AtomDC::updatePosition(), StructuralComponentDC::updatePosition(), and ~Component().
|
private |
my name
|
protected |
who is the boss? The Component!
Referenced by camitk::SingleImageComponent::getMyParentComponent(), getParentComponent(), isTopLevel(), and setParent().
|
private |
the service implemented to be represented in the InteractiveViewer
Referenced by getRepresentation().
|
protected |
mySlice is the slice representation of this data component, the Component delegates all InterfaceBitMap activity to mySlice (delegation pattern)
Referenced by getNumberOfSlices(), getRepresentation(), getRotationX(), getRotationY(), getRotationZ(), getSlice(), init(), camitk::SingleImageComponent::initRepresentation(), camitk::SingleImageComponent::pixelPicked(), and ~Component().
|
private |
Where is this Component currently viewed.
Referenced by getVisibility(), refresh(), refreshInterfaceNode(), setVisibility(), and ~Component().