VTKFIG
0.25.0
Easy VTK based in situ visualization
|
Base class for all figures. More...
Public Member Functions | |
void | SetBackground (double r, double g, double b) |
Set background color;. More... | |
void | SetData (std::shared_ptr< DataSet > data, const std::string name="") |
Add Dataset to figure. More... | |
void | SetMaskedData (std::shared_ptr< DataSet > data, const std::string name, const std::string maskname) |
Add Dataset with mask to figure. More... | |
void | SetContourRGBTable (RGBTable &tab, int lutsize) |
Set contour RGB table from RGBtable. More... | |
void | SetTitle (std::string xtitle) |
Set figure title. More... | |
void | SetViewVolume (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) |
Set view volume (e.g. to zoom in to a part) More... | |
void | SetViewVolumeToDataSetBounds () |
Set view volume to dataset bounds (to overview the full dataset) More... | |
void | SetValueRange (double vmin, double vmax) |
Set Range of values. More... | |
void | SetAccumulateRange (bool b) |
Accumulate value ranges during run. More... | |
void | SetXYAspect (double a) |
Set fixed xy aspect ratio. More... | |
void | KeepXYAspect (bool b) |
Keep aspect ratio. More... | |
void | SetTransformDirty () |
InvalidateTransform. More... | |
void | ShowDomainAxes (bool b) |
Toggle rendering of domain axes. More... | |
void | ShowDomainBox (bool b) |
Toggle rendering of domain bounding box. More... | |
void | ShowDomainOutline (bool b) |
Toggle rendering of domain boundary as transparent surface. More... | |
void | AddContextActor (vtkSmartPointer< vtkContextActor > prop) |
Add vtk Actor to renderer showing figure. More... | |
void | AddActor (vtkSmartPointer< vtkActor > prop) |
Add vtk Actor to renderer showing figure. More... | |
void | AddActor2D (vtkSmartPointer< vtkActor2D > prop) |
Add vtk Actor to renderer showing figure. More... | |
void | Message (std::string msg) |
Show string in message field. More... | |
void | AddAnnotations () |
Add annotations. More... | |
void | RTAddContextActor (vtkSmartPointer< vtkContextActor > prop) |
Add vtk Actor to renderer showing figure. More... | |
void | RTAddActor (vtkSmartPointer< vtkActor > prop) |
Add vtk Actor to renderer showing figure. More... | |
void | RTAddActor2D (vtkSmartPointer< vtkActor2D > prop) |
Add vtk Actor to renderer showing figure. More... | |
void | RTMessage (std::string msg) |
Show string in message field. More... | |
void | RTAddAnnotations () |
Add annotations. More... | |
void | RTInitAnnotations () |
Init annotations. More... | |
void | RTCalcTransform () |
Calculate transformation to unit cube This shall be applied to all data. More... | |
void | SetVMinMax () |
Set minmax values from data. More... | |
void | GenIsolevels () |
Generate isolevels after minmax data known. More... | |
virtual void | RTBuildVTKPipeline () |
Subclasses re-implement this in order to build the vtk rendering pipeline. More... | |
void | RTBuildDomainPipeline (vtkSmartPointer< vtkRenderer > renderer) |
Build domain pipeline for 2D/3D figures (box, suface, axes) More... | |
template<class DATA > | |
void | RTBuildDomainPipeline0 (vtkSmartPointer< vtkRenderer > renderer) |
Duck typing interface allowing to handle different VTK datatypes with the same code. More... | |
virtual void | RTBuildAllVTKPipelines (vtkSmartPointer< vtkRenderer > renderer) |
Default implementation for 2D/3d datasets. More... | |
virtual void | RTPreRender () |
Pre-Render actions. More... | |
virtual void | ServerMPSend (vtkSmartPointer< internals::Communicator > communicator) |
Send subclass data to client. More... | |
virtual void | ClientMPReceive (vtkSmartPointer< internals::Communicator > communicator) |
Receive subclass data from server. More... | |
void | ServerMPSendData (vtkSmartPointer< internals::Communicator > communicator) |
Send data to client. More... | |
void | ClientMPReceiveData (vtkSmartPointer< internals::Communicator > communicator) |
Receive data from server. More... | |
virtual void | RTProcessKey (const std::string key) |
Process keyboard event. More... | |
virtual void | RTProcessMove (int dx, int dy) |
Process mouse event. More... | |
void | RTRefreshState () |
Trigger necessary actions to set state variables. More... | |
int | RTProcessPlaneKey (const std::string plane, int idim, const std::string key, bool &edit, vtkSmartPointer< vtkCutter > planecut) |
Process keyboard and mouse move events for plane section editing. More... | |
int | RTProcessPlaneMove (const std::string plane, int idim, int dx, int dy, bool &edit, vtkSmartPointer< vtkCutter > planecut) |
Process keyboard and mouse move events for plane section editing. More... | |
void | RTShowPlanePos (vtkSmartPointer< vtkCutter > planecut, const std::string plane, int idim) |
Process keyboard and mouse move events for plane section editing. More... | |
int | RTProcessIsoKey (const std::string key, bool &edit) |
Process keyboard and mouse move events for isolevel editing. More... | |
int | RTProcessIsoMove (int dx, int dy, bool &edit) |
Process keyboard and mouse move events for isolevel editing. More... | |
void | RTShowIsolevel () |
Process keyboard and mouse move events for isolevel editing. More... | |
void | RTUpdateIsoSurfaceFilter () |
Process keyboard and mouse move events for isolevel editing. More... | |
int | RTProcessArrowKey (const std::string key, bool &edit) |
Process keyboard events for quiver arrow editing etc. More... | |
int | RTProcessArrowMove (int dx, int dy, bool &edit) |
Process mouse move events for quiver arrow editing etc. More... | |
void | RTShowArrowScale () |
Show arrow scale informtion. More... | |
void | RTShowActive () |
Show figure is active [x]. More... | |
void | RTShowInActive () |
Show figure is inactive [ ]. More... | |
bool | IsEmpty () |
Check if figure is empty (== no actors added) More... | |
virtual std::string | SubClassName () |
Get subclass name (for s-c communication, should be replaced by tag. More... | |
void | RTUpdateActors () |
Update all actors belonging to figure. More... | |
void | SetRange () |
Obtain the data range from the relevant dataset. More... | |
Static Public Member Functions | |
static std::shared_ptr< Figure > | New () |
Construct smartpointer to empty figure. More... | |
static void | MPSendRGBTable (vtkSmartPointer< internals::Communicator > communicator, RGBTable &rgbtab) |
Send rgb table to client. More... | |
static void | MPReceiveRGBTable (vtkSmartPointer< internals::Communicator > communicator, RGBTable &rgbtab) |
Receive rgb table from client. More... | |
Public Attributes | |
vtkSmartPointer< vtkCornerAnnotation > | annot |
Title+message text fields. More... | |
vtkSmartPointer< vtkTransform > | transform =0 |
Transformation. More... | |
vtkSmartPointer< vtkCutter > | planecutX |
Cutter for plane sections. More... | |
vtkSmartPointer< vtkCutter > | planecutY |
Cutter for plane sections. More... | |
vtkSmartPointer< vtkCutter > | planecutZ |
Cutter for plane sections. More... | |
vtkSmartPointer< vtkPlane > | planeX |
Plane equation for plane sections. More... | |
vtkSmartPointer< vtkPlane > | planeY |
Plane equation for plane sections. More... | |
vtkSmartPointer< vtkPlane > | planeZ |
Plane equation for plane sections. More... | |
vtkSmartPointer< vtkGlyphSource2D > | arrow2d |
Arrow glyph source. More... | |
vtkSmartPointer< vtkTransformPolyDataFilter > | arrow3d |
Arrow glyph source. More... | |
vtkSmartPointer< vtkTransform > | arrow3dt |
Arrow glyph source. More... | |
vtkSmartPointer< vtkArrowSource > | arrow3ds |
Arrow glyph source. More... | |
vtkSmartPointer< vtkActor > | isosurface_plot |
Isosurface plot actor. More... | |
vtkSmartPointer< vtkContourFilter > | isosurface_filter |
Isosurface plot filter. More... | |
vtkSmartPointer< vtkActor > | isoline_plot |
Isoline plot actor. More... | |
vtkSmartPointer< vtkContourFilter > | isoline_filter |
Isoline plot filter. More... | |
vtkSmartPointer< vtkActor > | elevation_plot |
Items for elevation plot. More... | |
vtkSmartPointer< vtkActor > | surface_plot |
Items for surface plot. More... | |
vtkSmartPointer< vtkTransform > | warp_transform |
Items for elevation plot. More... | |
vtkSmartPointer< vtkCubeAxesActor2D > | axes |
Axes actor. More... | |
vtkSmartPointer< vtkActor > | box |
Box actor. More... | |
vtkSmartPointer< vtkActor > | outline |
Outline plot actor. More... | |
vtkSmartPointer< vtkTrivialProducer > | data_producer =NULL |
Data producer for grid dataset. More... | |
vtkSmartPointer< vtkTrivialProducer > | boundary_data_producer =NULL |
Data producer for boundary grid dataset. More... | |
double | coordinate_scale_factor |
coordinate scale More... | |
std::string | dataname |
Name of data item in data set. More... | |
vtkSmartPointer< vtkIdList > | celllist =0 |
Cell mask. More... | |
std::string | title |
Title of figure. More... | |
vtkSmartPointer< vtkLookupTable > | surface_lut |
Color lookup table for surface plots. More... | |
RGBTable | surface_rgbtab {{0,0,0,1},{1,1,0,0}} |
Color table for surface plots. More... | |
vtkSmartPointer< vtkLookupTable > | quiver_lut |
Color lookup table for quiver plots. More... | |
RGBTable | quiver_rgbtab {{0,0,0,0},{1,0,0,0}} |
Color table for quiver plots. More... | |
vtkSmartPointer< vtkLookupTable > | stream_lut |
Color lookup table for stream plots. More... | |
RGBTable | stream_rgbtab {{0,0,0,1},{1,1,0,0}} |
Color table for stream plots. More... | |
vtkSmartPointer< vtkLookupTable > | elevation_lut |
Color lookup table for elevation plots. More... | |
RGBTable | elevation_rgbtab {{0.0,0.9,0.9,0.9},{1.0,0.9,0.9,0.9}} |
Color table for elevation plots. More... | |
vtkSmartPointer< vtkLookupTable > | cell_lut |
Color lookup table for grid plot cell colors. More... | |
RGBTable | cell_rgbtab |
Color table for grid plot cell colors. More... | |
vtkSmartPointer< vtkLookupTable > | bface_lut |
Color lookup table for grid plot boundary colors. More... | |
RGBTable | bface_rgbtab |
Color table for grid plot boundary colors. More... | |
vtkSmartPointer< vtkScalarBarActor > | cbar =NULL |
Cell color bar for grid plots. More... | |
vtkSmartPointer< vtkScalarBarActor > | bcbar =NULL |
Boundary color bar for grid plots. More... | |
struct { | |
double vmin_set =1.0e100 | |
min/max set through api More... | |
double real_vmin =0 | |
min/max generated from api and data More... | |
double data_vmin =0 | |
min/max calculated from data More... | |
double xmin =1.0 | |
View volume data. More... | |
} | state |
figure state More... | |
struct { | |
} | edit |
edit state More... | |
std::vector< vtkSmartPointer< vtkContextActor > > | ctxactors |
The different actor lists. More... | |
double | bgcolor [3] ={1,1,1} |
default background color More... | |
int | framepos =0 |
position in its respective frame More... | |
Friends | |
class | Frame |
!!protected: More... | |
Base class for all figures.
It justs consists of a set of instances of vtkActor which contains the data used by vtk. In order to ease coding (?), derived class data are defined here as well
Derived classes just should fill these actors by calling Figure::AddActor
In this way, any vtk rendering pipeline can be used.
All methods prefixed with "RT" shall be called only from render thread. All methods prefixed with "MP" shall be called from multiprocessing rendering client.
|
static |
Construct smartpointer to empty figure.
|
inline |
Set background color;.
void vtkfig::Figure::SetData | ( | std::shared_ptr< DataSet > | data, |
const std::string | name = "" |
||
) |
Add Dataset to figure.
name | Name of scalar or vector to be shown |
void vtkfig::Figure::SetMaskedData | ( | std::shared_ptr< DataSet > | data, |
const std::string | name, | ||
const std::string | maskname | ||
) |
Add Dataset with mask to figure.
name | Name of scalar or vector to be shown |
void vtkfig::Figure::SetContourRGBTable | ( | RGBTable & | tab, |
int | lutsize | ||
) |
Set contour RGB table from RGBtable.
tab | RGB table containg data. |
lutsize | Size of lookup table created. |
|
inline |
Set figure title.
|
inline |
Set view volume (e.g. to zoom in to a part)
|
inline |
Set view volume to dataset bounds (to overview the full dataset)
|
inline |
Set Range of values.
|
inline |
Accumulate value ranges during run.
|
inline |
Set fixed xy aspect ratio.
|
inline |
Keep aspect ratio.
void vtkfig::Figure::SetTransformDirty | ( | ) |
InvalidateTransform.
|
inline |
Toggle rendering of domain axes.
|
inline |
Toggle rendering of domain bounding box.
|
inline |
Toggle rendering of domain boundary as transparent surface.
|
inline |
Add vtk Actor to renderer showing figure.
Intended for custom pipeline.
|
inline |
Add vtk Actor to renderer showing figure.
Intended for custom pipeline.
|
inline |
Add vtk Actor to renderer showing figure.
Intended for custom pipeline.
|
inline |
Show string in message field.
Intended for custom pipeline.
|
inline |
Add annotations.
Intended for custom pipeline.
void vtkfig::Figure::RTAddContextActor | ( | vtkSmartPointer< vtkContextActor > | prop | ) |
Add vtk Actor to renderer showing figure.
Usually, this is called from the render thread, it can however be useful in custom pipelines
void vtkfig::Figure::RTAddActor | ( | vtkSmartPointer< vtkActor > | prop | ) |
Add vtk Actor to renderer showing figure.
Usually, this is called from the render thread, it can however be useful in custom pipelines
void vtkfig::Figure::RTAddActor2D | ( | vtkSmartPointer< vtkActor2D > | prop | ) |
Add vtk Actor to renderer showing figure.
Usually, this is called from the render thread, it can however be useful in custom pipelines
void vtkfig::Figure::RTMessage | ( | std::string | msg | ) |
Show string in message field.
Usually, this is called from the render thread, it can however be useful in custom pipelines
void vtkfig::Figure::RTAddAnnotations | ( | ) |
Add annotations.
Usually, this is called from the render thread, it can however be useful in custom pipelines
void vtkfig::Figure::RTInitAnnotations | ( | ) |
Init annotations.
Called by RTAddAnnotations() or RTMessage()
|
static |
Send rgb table to client.
|
static |
Receive rgb table from client.
void vtkfig::Figure::RTCalcTransform | ( | ) |
Calculate transformation to unit cube This shall be applied to all data.
Camera is fixed.
void vtkfig::Figure::SetVMinMax | ( | ) |
Set minmax values from data.
void vtkfig::Figure::GenIsolevels | ( | ) |
Generate isolevels after minmax data known.
|
inlinevirtual |
Subclasses re-implement this in order to build the vtk rendering pipeline.
void vtkfig::Figure::RTBuildDomainPipeline | ( | vtkSmartPointer< vtkRenderer > | renderer | ) |
Build domain pipeline for 2D/3D figures (box, suface, axes)
void vtkfig::Figure::RTBuildDomainPipeline0 | ( | vtkSmartPointer< vtkRenderer > | renderer | ) |
Duck typing interface allowing to handle different VTK datatypes with the same code.
|
inlinevirtual |
Default implementation for 2D/3d datasets.
|
inlinevirtual |
Pre-Render actions.
|
inlinevirtual |
|
inlinevirtual |
Receive subclass data from server.
Reimplemented in vtkfig::Surf2D.
void vtkfig::Figure::ServerMPSendData | ( | vtkSmartPointer< internals::Communicator > | communicator | ) |
Send data to client.
Called from rendering thread.
void vtkfig::Figure::ClientMPReceiveData | ( | vtkSmartPointer< internals::Communicator > | communicator | ) |
Receive data from server.
|
virtual |
Process keyboard event.
|
virtual |
Process mouse event.
void vtkfig::Figure::RTRefreshState | ( | ) |
Trigger necessary actions to set state variables.
int vtkfig::Figure::RTProcessPlaneKey | ( | const std::string | plane, |
int | idim, | ||
const std::string | key, | ||
bool & | edit, | ||
vtkSmartPointer< vtkCutter > | planecut | ||
) |
Process keyboard and mouse move events for plane section editing.
int vtkfig::Figure::RTProcessPlaneMove | ( | const std::string | plane, |
int | idim, | ||
int | dx, | ||
int | dy, | ||
bool & | edit, | ||
vtkSmartPointer< vtkCutter > | planecut | ||
) |
Process keyboard and mouse move events for plane section editing.
void vtkfig::Figure::RTShowPlanePos | ( | vtkSmartPointer< vtkCutter > | planecut, |
const std::string | plane, | ||
int | idim | ||
) |
Process keyboard and mouse move events for plane section editing.
int vtkfig::Figure::RTProcessIsoKey | ( | const std::string | key, |
bool & | edit | ||
) |
Process keyboard and mouse move events for isolevel editing.
int vtkfig::Figure::RTProcessIsoMove | ( | int | dx, |
int | dy, | ||
bool & | edit | ||
) |
Process keyboard and mouse move events for isolevel editing.
void vtkfig::Figure::RTShowIsolevel | ( | ) |
Process keyboard and mouse move events for isolevel editing.
void vtkfig::Figure::RTUpdateIsoSurfaceFilter | ( | ) |
Process keyboard and mouse move events for isolevel editing.
int vtkfig::Figure::RTProcessArrowKey | ( | const std::string | key, |
bool & | edit | ||
) |
Process keyboard events for quiver arrow editing etc.
int vtkfig::Figure::RTProcessArrowMove | ( | int | dx, |
int | dy, | ||
bool & | edit | ||
) |
Process mouse move events for quiver arrow editing etc.
void vtkfig::Figure::RTShowArrowScale | ( | ) |
Show arrow scale informtion.
void vtkfig::Figure::RTShowActive | ( | ) |
Show figure is active [x].
void vtkfig::Figure::RTShowInActive | ( | ) |
Show figure is inactive [ ].
bool vtkfig::Figure::IsEmpty | ( | ) |
Check if figure is empty (== no actors added)
|
inlinevirtual |
Get subclass name (for s-c communication, should be replaced by tag.
Reimplemented in vtkfig::GridView, vtkfig::XYPlot, vtkfig::ScalarView, vtkfig::VectorView, vtkfig::ChartXY, and vtkfig::Surf2D.
void vtkfig::Figure::RTUpdateActors | ( | ) |
Update all actors belonging to figure.
void vtkfig::Figure::SetRange | ( | ) |
Obtain the data range from the relevant dataset.
|
friend |
!!protected:
vtkSmartPointer<vtkCornerAnnotation> vtkfig::Figure::annot |
Title+message text fields.
vtkSmartPointer<vtkTransform> vtkfig::Figure::transform =0 |
Transformation.
vtkSmartPointer<vtkCutter> vtkfig::Figure::planecutX |
Cutter for plane sections.
vtkSmartPointer<vtkCutter> vtkfig::Figure::planecutY |
Cutter for plane sections.
vtkSmartPointer<vtkCutter> vtkfig::Figure::planecutZ |
Cutter for plane sections.
vtkSmartPointer<vtkPlane> vtkfig::Figure::planeX |
Plane equation for plane sections.
vtkSmartPointer<vtkPlane> vtkfig::Figure::planeY |
Plane equation for plane sections.
vtkSmartPointer<vtkPlane> vtkfig::Figure::planeZ |
Plane equation for plane sections.
vtkSmartPointer<vtkGlyphSource2D> vtkfig::Figure::arrow2d |
Arrow glyph source.
vtkSmartPointer<vtkTransformPolyDataFilter> vtkfig::Figure::arrow3d |
Arrow glyph source.
vtkSmartPointer<vtkTransform> vtkfig::Figure::arrow3dt |
Arrow glyph source.
vtkSmartPointer<vtkArrowSource> vtkfig::Figure::arrow3ds |
Arrow glyph source.
vtkSmartPointer<vtkActor> vtkfig::Figure::isosurface_plot |
Isosurface plot actor.
vtkSmartPointer<vtkContourFilter> vtkfig::Figure::isosurface_filter |
Isosurface plot filter.
vtkSmartPointer<vtkActor> vtkfig::Figure::isoline_plot |
Isoline plot actor.
vtkSmartPointer<vtkContourFilter> vtkfig::Figure::isoline_filter |
Isoline plot filter.
vtkSmartPointer<vtkActor> vtkfig::Figure::elevation_plot |
Items for elevation plot.
vtkSmartPointer<vtkActor> vtkfig::Figure::surface_plot |
Items for surface plot.
vtkSmartPointer<vtkTransform> vtkfig::Figure::warp_transform |
Items for elevation plot.
vtkSmartPointer<vtkCubeAxesActor2D> vtkfig::Figure::axes |
Axes actor.
vtkSmartPointer<vtkActor> vtkfig::Figure::box |
Box actor.
vtkSmartPointer<vtkActor> vtkfig::Figure::outline |
Outline plot actor.
vtkSmartPointer<vtkTrivialProducer> vtkfig::Figure::data_producer =NULL |
Data producer for grid dataset.
vtkSmartPointer<vtkTrivialProducer> vtkfig::Figure::boundary_data_producer =NULL |
Data producer for boundary grid dataset.
double vtkfig::Figure::coordinate_scale_factor |
coordinate scale
std::string vtkfig::Figure::dataname |
Name of data item in data set.
vtkSmartPointer<vtkIdList> vtkfig::Figure::celllist =0 |
Cell mask.
std::string vtkfig::Figure::title |
Title of figure.
vtkSmartPointer<vtkLookupTable> vtkfig::Figure::surface_lut |
Color lookup table for surface plots.
RGBTable vtkfig::Figure::surface_rgbtab {{0,0,0,1},{1,1,0,0}} |
Color table for surface plots.
vtkSmartPointer<vtkLookupTable> vtkfig::Figure::quiver_lut |
Color lookup table for quiver plots.
RGBTable vtkfig::Figure::quiver_rgbtab {{0,0,0,0},{1,0,0,0}} |
Color table for quiver plots.
vtkSmartPointer<vtkLookupTable> vtkfig::Figure::stream_lut |
Color lookup table for stream plots.
RGBTable vtkfig::Figure::stream_rgbtab {{0,0,0,1},{1,1,0,0}} |
Color table for stream plots.
vtkSmartPointer<vtkLookupTable> vtkfig::Figure::elevation_lut |
Color lookup table for elevation plots.
RGBTable vtkfig::Figure::elevation_rgbtab {{0.0,0.9,0.9,0.9},{1.0,0.9,0.9,0.9}} |
Color table for elevation plots.
vtkSmartPointer<vtkLookupTable> vtkfig::Figure::cell_lut |
Color lookup table for grid plot cell colors.
RGBTable vtkfig::Figure::cell_rgbtab |
Color table for grid plot cell colors.
vtkSmartPointer<vtkLookupTable> vtkfig::Figure::bface_lut |
Color lookup table for grid plot boundary colors.
RGBTable vtkfig::Figure::bface_rgbtab |
Color table for grid plot boundary colors.
vtkSmartPointer<vtkScalarBarActor> vtkfig::Figure::cbar =NULL |
Cell color bar for grid plots.
vtkSmartPointer<vtkScalarBarActor> vtkfig::Figure::bcbar =NULL |
Boundary color bar for grid plots.
double vtkfig::Figure::vmin_set =1.0e100 |
min/max set through api
double vtkfig::Figure::real_vmin =0 |
min/max generated from api and data
double vtkfig::Figure::data_vmin =0 |
min/max calculated from data
double vtkfig::Figure::xmin =1.0 |
View volume data.
struct { ... } vtkfig::Figure::state |
figure state
struct { ... } vtkfig::Figure::edit |
edit state
std::vector<vtkSmartPointer<vtkContextActor> > vtkfig::Figure::ctxactors |
The different actor lists.
double vtkfig::Figure::bgcolor[3] ={1,1,1} |
default background color
int vtkfig::Figure::framepos =0 |
position in its respective frame