Commit ca7a994d authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

NEW vector data can be seen as vector or hedge hog

parent 4004b1cc
......@@ -70,12 +70,18 @@ public:
/// @enum SpecificRepresentation 3D data can be represented by 1 value in different ways
enum SpecificRepresentation {
HEDGE_HOG, ///< 3D data are represented as 3D vector (show lines starting from the point or center of the cell)
VECTOR_3D, ///< 3D data are represented with 3D arrows or hedge hog (simple lines starting from the point or center of the cell) depending on current 3D Vector representation)
NORM, ///< 3D data are represented in 1D using the norm of the three components
FIRST_COMPONENT, ///< Use only the value of the first component
SECOND_COMPONENT, ///< Use only the value of the second component
THIRD_COMPONENT ///< Use only the value of the third component
//@TODO COLOR, ///< 3D data are represented as a specific color @TODO need to build a specific color map LUT containing as many colors as there is point/cell
//@TODO COLOR, ///< 3D data are represented as a specific color @TODO need to build a specific color map LUT containing as many colors as there is point/cell
};
///@enum VectorRepresentation how are vector data represented in 3D
enum VectorRepresentation {
HEDGE_HOG, ///< 3D data are represented with hedge hog (simple lines starting from the point or center of the cell)
ARROW ///< 3D data are represented with 3D arrows (nicer hedge hog)
};
/** Creates a top-level MeshComponent from a file.
......@@ -347,19 +353,22 @@ public:
vtkSmartPointer<vtkFieldData> getFieldData(FieldType);
/// get the current visibility status of a given data (identified with its name) of a given field type
bool getDataRepresentationVisibility(FieldType, const QString&, SpecificRepresentation representation = HEDGE_HOG) ;
bool getDataRepresentationVisibility(FieldType, const QString&, SpecificRepresentation representation = VECTOR_3D) ;
/// set the visibility of a given representation for a given data (identified with its name) of a given field type (create it if needed)
void setDataRepresentationVisibility(FieldType, const QString&, bool, SpecificRepresentation representation = HEDGE_HOG);
void setDataRepresentationVisibility(FieldType, const QString&, bool, SpecificRepresentation representation = VECTOR_3D);
/// hide all the data representation of a given data type (hide all by default)
void setDataRepresentationOff(int dataType = SCALARS | VECTORS | TENSORS);
/// set the current mode of visualisation of 3D data vector (default is ARROW)
void setVectorRepresentation(VectorRepresentation);
/**
/**
* @name Enum management and helper methods
* @{
*/
/// static method that returns the FieldType enum as a QString
/// static method that returns the FieldType enum as a QString
static const QMap< int, QString >& getFieldNames();
/// helper method that returns the field type as a string
......@@ -484,11 +493,14 @@ private:
/// number of specific 3D representation for cell data
unsigned int numberOfCellDataSpecificRepresentation;
/// current way of representing 3D vector data
VectorRepresentation vectorRepresentation;
/// map of visibility status of data
QMap<vtkSmartPointer<vtkDataArray>, bool> dataRepresentationVisibility;
/// create the data representation of a given data (identified with its name) of a given field type, default visibility is off
void createDataRepresentation(FieldType, const QString&, SpecificRepresentation representation = HEDGE_HOG) ;
void createDataRepresentation(FieldType, const QString&, SpecificRepresentation representation = VECTOR_3D) ;
// Returns the very specific name used for the additional prop that represent this data
const QString getDataPropName(FieldType , const QString& );
......
......@@ -25,10 +25,13 @@
#include "MeshDataView.h"
#include <QHeaderView>
using namespace camitk;
MeshDataView::MeshDataView ( QWidget* parent ) : QTableView ( parent ) {
horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
//resizeColumnsToContents();
}
void MeshDataView::mousePressEvent ( QMouseEvent* event ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment