|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
26 #ifndef MESHCOMPONENT_H
27 #define MESHCOMPONENT_H
29 #include "Component.h"
36 class vtkSelectionNode;
45 class MeshSelectionView;
106 MeshComponent(vtkSmartPointer<vtkPointSet> aPointSet,
const QString& name);
122 void pointPicked(vtkIdType pointId,
bool)
override;
125 void cellPicked(vtkIdType cellId,
bool)
override;
128 vtkIdType getPickedPointId();
131 vtkIdType getPickedCellId();
137 unsigned int getNumberOfPropertyWidget()
override;
140 QWidget* getPropertyWidgetAt(
unsigned int i = 0)
override;
143 QPixmap getIcon()
override;
170 QList< vtkSmartPointer<vtkSelectionNode> >& getSelections();
177 unsigned int getNumberOfSelections()
const;
184 vtkSmartPointer<vtkSelection> getActiveSelection()
const;
194 vtkSmartPointer<vtkSelectionNode> getSelection(
const QString& name)
const;
204 vtkSmartPointer<vtkSelectionNode> getSelectionAt(
unsigned int index)
const;
212 int getSelectionIndex(
const QString& name)
const;
260 int getNumberOfDataArray(
int fieldFlag = POINTS | CELLS);
270 vtkSmartPointer<vtkDataArray> getDataArray(FieldType fieldType,
const QString& arrayName);
280 vtkSmartPointer<vtkDataArray> getDataArray(FieldType fieldType,
int index);
289 void addDataArray(FieldType fieldType,
const QString& name, vtkSmartPointer<vtkDataArray> data);
297 void removeDataArray(FieldType fieldType,
const QString& name);
305 void addPointData(
const QString& name, vtkSmartPointer<vtkDataArray> data);
313 void addCellData(
const QString& name, vtkSmartPointer<vtkDataArray> data);
319 vtkSmartPointer<vtkFieldData> getFieldData(FieldType);
322 bool getDataRepresentationVisibility(FieldType,
const QString&) ;
325 void setDataRepresentationVisibility(FieldType,
const QString&,
bool);
328 void setDataRepresentationOff(
int dataType = SCALARS | VECTORS | TENSORS);
331 void setVectorRepresentation(VectorRepresentation);
337 static const QMap< int, QString >& getFieldNames();
341 static const QString getFieldName(
const FieldType);
344 static const QMap< int, QString >& getDataTypeNames();
347 static const QString getDataTypeName(
const DataType);
350 static const DataType getDataType(vtkSmartPointer<vtkDataArray>);
356 static const QString getDataTypeName(vtkSmartPointer<vtkDataArray>);
359 static const QString getSpecificRepresentationName(
const SpecificRepresentation);
368 void initRepresentation(vtkSmartPointer<vtkPointSet>);
371 void initSelection();
377 void initDynamicProperties();
382 void changeSelectedSelection(
const QItemSelection& selected,
const QItemSelection& deselected);
385 void removeSelectedSelections();
388 void removeSelectedData();
391 void displayTypePolicyChanged(
int);
394 void vectorRepresentationPolicyChanged(
int);
470 const QString getDataPropName(
FieldType,
const QString&);
473 void setScalarDataRepresentationOn(vtkSmartPointer<vtkDataArray>);
476 static QMap< int, QString > initFieldNames();
479 static QMap< int, QString > initDataNames();
491 #endif // MESHCOMPONENT_H
SpecificRepresentation
Definition: MeshComponent.h:73
#define CAMITK_WARNING(MSG)
Log for warning verbosity (the most common one) Will appear by default.
Definition: Log.h:266
QWidget * dataWidget
selection widget
Definition: MeshComponent.h:444
@ FIRST_COMPONENT
Use only the value of the first component.
Definition: MeshComponent.h:76
Qt model for mesh data. This class use the Qt model/view design.
Definition: MeshDataModel.h:68
QAction * removeData
action to remove data
Definition: MeshComponent.h:482
QMap< QString, vtkSmartPointer< vtkDataArray > > specific3DDataRepresentation
map of specific 3D Data representations.
Definition: MeshComponent.h:455
void setColorScaleTitle(QString t)
set the color scale title.
Definition: InteractiveViewer.cpp:1769
InsertionPolicy
Definition: MeshSelectionModel.h:50
vtkIdType pickedPointId
the last picked point
Definition: MeshComponent.h:405
void updateProperty(QString, QVariant) override
update property: no specific properties to manage, this is needed to avoid console warnings.
Definition: MeshComponent.h:134
void setIndexOfPropertyExplorerTab(unsigned int index) override final
Set the index of the tab in the ProperlyExplorer to select for display.
Definition: sdk/libraries/core/component/Component.h:492
@ SECOND_COMPONENT
Use only the value of the second component.
Definition: MeshComponent.h:77
Qt view for mesh selection.
Definition: MeshSelectionView.h:63
QComboBox * displayTypePolicyBox
combo box to select how to display vector data (data with 3 components)
Definition: MeshComponent.h:447
vtkIdType pickedCellId
the last picked cell
Definition: MeshComponent.h:408
InteractiveViewer is used to view 3D objects and slices (anything that provides either a InterfaceBit...
Definition: InteractiveViewer.h:112
@ REPLACE
Definition: MeshSelectionModel.h:51
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:303
DataType
Definition: MeshComponent.h:58
MeshDataModel * dataModel
data model (model as the M in Qt MVC design pattern)
Definition: MeshComponent.h:438
QAction * removeSelections
action to remove selections
Definition: MeshComponent.h:426
QAction * mergeSelection
action to merge selections
Definition: MeshComponent.h:429
MeshComponent(const QString &file)
Creates a top-level MeshComponent from a file.
Definition: MeshComponent.cpp:97
MeshSelectionModel * selectionModel
selection model (model as the M in Qt MVC design pattern)
Definition: MeshComponent.h:417
@ NORM
3D data are represented in 1D using the norm of the three components
Definition: MeshComponent.h:75
@ ARROW
3D data are represented with 3D arrows (nicer hedge hog)
Definition: MeshComponent.h:85
QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding)
void setColorScale(bool)
Definition: InteractiveViewer.cpp:1759
QMap< vtkSmartPointer< vtkDataArray >, bool > dataRepresentationVisibility
map of visibility status of data
Definition: MeshComponent.h:461
QAction * inspectSelection
action to inspect selection
Definition: MeshComponent.h:432
unsigned int numberOfCellDataSpecificRepresentation
number of specific 3D representation for cell data
Definition: MeshComponent.h:458
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
@ HEDGE_HOG
3D data are represented with hedge hog (simple lines starting from the point or center of the cell)
Definition: MeshComponent.h:84
vtkSmartPointer< vtkSelection > currentSelection
manages current selection using vtk
Definition: MeshComponent.h:411
QWidget * selectionWidget
selection widget
Definition: MeshComponent.h:423
Qt view for mesh data.
Definition: MeshDataView.h:63
void removeProp(vtkSmartPointer< vtkProp > p, bool refresh=false)
remove the given vtkProp (e.g.
QList< vtkSmartPointer< vtkSelectionNode > > selectionList
list of selections
Definition: MeshComponent.h:414
QComboBox * vectorRepresentationPolicyBox
combo box to select how the vector are represented in 3D
Definition: MeshComponent.h:450
Qt model for mesh selection This class use the Qt model/view design.
Definition: MeshSelectionModel.h:44
void setReadOnly(bool)
set this property as read-only
Definition: Property.cpp:82
QStringList vectorActors
list of all vector data 3D actors' names (needed for cleaning up)
Definition: MeshComponent.h:464
@ VECTOR_3D
3D data are represented with 3D arrows or hedge hog (simple lines starting from the point or center o...
Definition: MeshComponent.h:74
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:53
void refresh()
refresh the display
MeshSelectionView * selectionView
selection GUI View (view as the V in Qt MVC design pattern)
Definition: MeshComponent.h:420
MeshDataView * dataView
data GUI View (view as the V in Qt MVC design pattern)
Definition: MeshComponent.h:441
QAction * inspectData
action to inspect data
Definition: MeshComponent.h:485
FieldType
Definition: MeshComponent.h:66
void initRepresentation() override final
the concrete building of the 3D objects (Slice/Geometry): none in this case, everything is done by in...
Definition: MeshComponent.h:399
VectorRepresentation
Definition: MeshComponent.h:83
QComboBox * insertionPolicyBox
combo box to select the selection insertion policy
Definition: MeshComponent.h:435
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:302
#define CAMITK_API
Definition: CamiTKAPI.h:49
Definition: Action.cpp:35