IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Gr3d.UtilVtk Class Reference

Various VTK utilities that extend functionality of the ActiViz VTK wrappers. More...

Static Public Member Functions

static bool ContainsActor (vtkRenderer renderer, vtkActor actor)
 Returns true if the specified renderer contains the specified actor. More...
 
static vtkActor GetFirstActor (vtkRenderer renderer)
 Returns the first non-null VTK actor contained in the specified vtkRenderer object. More...
 
static int GetNumActors (vtkRenderer renderer)
 Returns number of actors contained on the specified vtkRenderer object. If the specified renderer is null then 0 returned. More...
 
static List< vtkActor > GetActors (vtkRenderer renderer)
 Returns a list of all non-null renderers contained in the specified vtkRenderWindow object. If VTK render window is null then an empty list is returned. More...
 
static vtkActor[] GetActorsArray (vtkRenderer renderer)
 Returns an array of all non-null actors contained in the specified vtkRenderer object. If the specified VTK renderer is null then an empty array is returned. More...
 
static void RemoveAllActors (vtkRenderer renderer)
 Removes all actors form the specified renderer. More...
 
static bool ContainsActor2D (vtkRenderer renderer, vtkActor2D actor2D)
 Returns true if the specified renderer contains the specified actor2D. More...
 
static vtkActor2D GetFirstActor2D (vtkRenderer renderer)
 Returns the first non-null VTK actor2D contained in the specified vtkRenderer object. More...
 
static int GetNumActors2D (vtkRenderer renderer)
 Returns number of actors2D contained on the specified vtkRenderer object. If the specified renderer is null then 0 returned. More...
 
static List< vtkActor2D > GetActors2D (vtkRenderer renderer)
 Returns a list of all non-null renderers contained in the specified vtkRenderWindow object. If VTK render window is null then an empty list is returned. More...
 
static vtkActor2D[] GetActors2DArray (vtkRenderer renderer)
 Returns an array of all non-null actors2D contained in the specified vtkRenderer object. If the specified VTK renderer is null then an empty array is returned. More...
 
static void RemoveAllActors2D (vtkRenderer renderer)
 Removes all actors form the specified renderer. More...
 
static bool ContainsRenderer (vtkRenderWindow window, vtkRenderer renderer)
 Returns true if the specified renderer window contains the specified renderer. More...
 
static vtkRenderer GetFirstRenderer (vtkRenderWindow win)
 Returns the first non-null VTK renderrer contained in the specified vtkRenderWindow object. More...
 
static int GetNumRenderers (vtkRenderWindow win)
 Returns number of renderers contained on the specified vtkRenderWindow object. If VTK render window is null then 0 returned. More...
 
static List< vtkRenderer > GetRenderers (vtkRenderWindow win)
 Returns a list of all non-null renderers contained in the specified vtkRenderWindow object. If VTK render window is null then an empty list is returned. More...
 
static vtkRenderer[] GetRenderersArray (vtkRenderWindow win)
 Returns an array of all non-null renderers contained in the specified vtkRenderWindow object. If the specified VTK render window is null then an empty array is returned. More...
 
static void SetBounds (vtkCubeAxesActor actor, IBoundingBox bounds)
 
static BoundingBox CreateBounds (params vtkRenderer[] renderers)
 Creates and returns the minimal volume bounding box that contains all graphical objects of the specified vtkRenderer. More...
 
static void UpdateBounds (IBoundingBox bounds, params vtkRenderer[] renderers)
 Updates the specified bounding box in such a way that it also contains all graphic primitives of the specified VTK Renderers. More...
 
static void UpdateBounds (ref IBoundingBox bounds, params vtkRenderer[] renderers)
 Updates the specified bounding box in such a way that it also contains all graphic primitives of the specified VTK Renderers. More...
 
static BoundingBox CreateBounds (params vtkActor[] actors)
 Creates and returns the minimal volume bounding box that contains all graphical objects of the specified vtkActor. More...
 
static void UpdateBounds (IBoundingBox bounds, params vtkActor[] actors)
 Updates the specified bounding box in such a way that it also contains all graphic primitives of the specified VTK Actors. More...
 
static void UpdateBounds (ref IBoundingBox bounds, params vtkActor[] actors)
 Updates the specified bounding box in such a way that it also contains all graphic primitives of the specified VTK Actor. More...
 
static bool IsVtkForm (this IVtkFormContainer control)
 Returns a boolean value telling whether the specified object of type IVtkFormContainer actually contains a VTK rendering control (type RenderWindowControl). More...
 
static
Kitware.VTK.RenderWindowControl 
GetVtkRenderWindowControl (this IVtkFormContainer control)
 Returns a VTK rendering control of type Kitware.VTK.RenderWindowControl that is contained in the specified object, or null if such a control is not contained or is null.
Parameters
controlControl (or more generally control container) whose rendering control is attempted to be returned.
More...
 
static Kitware.VTK.vtkRenderWindow GetVtkRenderWindow (this IVtkFormContainer control)
 Returns a VTK rendering window of type Kitware.VTK.vtkRenderWindow that is contained in the specified object, or null if such a control is not contained or is null.
Parameters
controlControl (or more generally control container) whose rendering window is attempted to be returned.
More...
 
static Kitware.VTK.vtkRenderer GetVtkRenderer (this IVtkFormContainer control)
 Returns a VTK renderer of type Kitware.VTK.vtkRenderer that is contained in the specified object, or null if such a VTK render control is not contained or its renderer is null.
Parameters
controlControl (or more generally control container) whose VTK renderer is attempted to be returned.
More...
 
static Kitware.VTK.vtkCamera GetVtkCamera (this IVtkFormContainer control)
 Returns the active VTK camera of type Kitware.VTK.vtkCamera that is contained in the specified object, or null if VTK render control is not contained or its camera is null.
Parameters
controlControl (or more generally control container) whose VTK camera is attempted to be returned.
More...
 
static void LookUpTableRange (ColorScale scalarBarColorScale, int numValues, ref vtkLookupTable ScalarBarLookUpTable)
 Transform colorScale range to LookUpTable range directly. More...
 
static void LookUpTableRange (ColorScale scalarBarColorScale, int numValues, double minRangeLT, double maxRangeLT, ref vtkLookupTable ScalarBarLookUpTable)
 Transform colorScale range to LookUpTable range. Ranges are different. More...
 

Detailed Description

Various VTK utilities that extend functionality of the ActiViz VTK wrappers.

$A Igor Sep11;

Member Function Documentation

static bool IG.Gr3d.UtilVtk.ContainsActor ( vtkRenderer  renderer,
vtkActor  actor 
)
inlinestatic

Returns true if the specified renderer contains the specified actor.

Parameters
rendererVtk renderer that is queried for containing the specified actor.
actorActor for which we querry whether it is contained.

Referenced by IG.Gr3d.VtkPlotter.AddActor(), and IG.Gr3d.VtkPlotter.RemoveActor().

static vtkActor IG.Gr3d.UtilVtk.GetFirstActor ( vtkRenderer  renderer)
inlinestatic

Returns the first non-null VTK actor contained in the specified vtkRenderer object.

Parameters
rendererVTK renderer window (type) vtkRenderWindow for which a contained renderer is returned.
static int IG.Gr3d.UtilVtk.GetNumActors ( vtkRenderer  renderer)
inlinestatic

Returns number of actors contained on the specified vtkRenderer object. If the specified renderer is null then 0 returned.

Parameters
winVTK renderer (type vtkRenderer) for which the number of contained actors is returned.
static List<vtkActor> IG.Gr3d.UtilVtk.GetActors ( vtkRenderer  renderer)
inlinestatic

Returns a list of all non-null renderers contained in the specified vtkRenderWindow object. If VTK render window is null then an empty list is returned.

Parameters
winVTK renderer window (type) vtkRenderWindow for which a list of contained renderers is returned.
static vtkActor [] IG.Gr3d.UtilVtk.GetActorsArray ( vtkRenderer  renderer)
inlinestatic

Returns an array of all non-null actors contained in the specified vtkRenderer object. If the specified VTK renderer is null then an empty array is returned.

Parameters
rendererVTK renderer (type vtkRenderer) for which an array of contained renderers is returned.
static void IG.Gr3d.UtilVtk.RemoveAllActors ( vtkRenderer  renderer)
inlinestatic

Removes all actors form the specified renderer.

Parameters
rendererThe renderer from which all actors are removed.

Referenced by IG.Gr3d.VtkPlotter.RemoveAllActors().

static bool IG.Gr3d.UtilVtk.ContainsActor2D ( vtkRenderer  renderer,
vtkActor2D  actor2D 
)
inlinestatic

Returns true if the specified renderer contains the specified actor2D.

Parameters
rendererVtk renderer that is queried for containing the specified actor2D.
actorActor2D for which we querry whether it is contained.

$A Igor Oct11, Tako78 Dec13;

Referenced by IG.Gr3d.VtkPlotter.AddActor2D(), and IG.Gr3d.VtkPlotter.RemoveActor2D().

static vtkActor2D IG.Gr3d.UtilVtk.GetFirstActor2D ( vtkRenderer  renderer)
inlinestatic

Returns the first non-null VTK actor2D contained in the specified vtkRenderer object.

Parameters
rendererVTK renderer window (type) vtkRenderWindow for which a contained renderer is returned.

$A Igor Oct11, Tako78 Dec13;

static int IG.Gr3d.UtilVtk.GetNumActors2D ( vtkRenderer  renderer)
inlinestatic

Returns number of actors2D contained on the specified vtkRenderer object. If the specified renderer is null then 0 returned.

Parameters
winVTK renderer (type vtkRenderer) for which the number of contained actors2D is returned.

$A Igor Oct11, Tako78 Dec13;

static List<vtkActor2D> IG.Gr3d.UtilVtk.GetActors2D ( vtkRenderer  renderer)
inlinestatic

Returns a list of all non-null renderers contained in the specified vtkRenderWindow object. If VTK render window is null then an empty list is returned.

Parameters
winVTK renderer window (type) vtkRenderWindow for which a list of contained renderers is returned.

$A Igor Oct11, Tako78 Dec13;

static vtkActor2D [] IG.Gr3d.UtilVtk.GetActors2DArray ( vtkRenderer  renderer)
inlinestatic

Returns an array of all non-null actors2D contained in the specified vtkRenderer object. If the specified VTK renderer is null then an empty array is returned.

Parameters
rendererVTK renderer (type vtkRenderer) for which an array of contained renderers is returned.

$A Igor Oct11, Tako78 Dec13;

static void IG.Gr3d.UtilVtk.RemoveAllActors2D ( vtkRenderer  renderer)
inlinestatic

Removes all actors form the specified renderer.

Parameters
rendererThe renderer from which all actors are removed.

Referenced by IG.Gr3d.VtkPlotter.RemoveAllActor2Ds().

static bool IG.Gr3d.UtilVtk.ContainsRenderer ( vtkRenderWindow  window,
vtkRenderer  renderer 
)
inlinestatic

Returns true if the specified renderer window contains the specified renderer.

Parameters
rendererVtk renderer window that is queried for containing the specified renderer.
actorRenderer for which we querry whether it is contained.

Referenced by IG.Gr3d.VtkPlotter.AddRenderer().

static vtkRenderer IG.Gr3d.UtilVtk.GetFirstRenderer ( vtkRenderWindow  win)
inlinestatic

Returns the first non-null VTK renderrer contained in the specified vtkRenderWindow object.

Parameters
winVTK renderer window (type vtkRenderWindow) for which a contained renderer is returned.
Returns
static int IG.Gr3d.UtilVtk.GetNumRenderers ( vtkRenderWindow  win)
inlinestatic

Returns number of renderers contained on the specified vtkRenderWindow object. If VTK render window is null then 0 returned.

Parameters
winVTK renderer window (type vtkRenderWindow) for which the number of contained renderers is returned.

Referenced by IG.Gr3d.VtkPlotter.AddRenderer().

static List<vtkRenderer> IG.Gr3d.UtilVtk.GetRenderers ( vtkRenderWindow  win)
inlinestatic

Returns a list of all non-null renderers contained in the specified vtkRenderWindow object. If VTK render window is null then an empty list is returned.

Parameters
winVTK renderer window (type vtkRenderWindow) for which a list of contained renderers is returned.

Referenced by IG.Gr3d.VtkPlotter.GetRendererIndex(), IG.Gr3d.VtkPlotter.RemoveActor(), IG.Gr3d.VtkPlotter.RemoveActor2D(), IG.Gr3d.VtkPlotter.RemoveAllActor2Ds(), and IG.Gr3d.VtkPlotter.RemoveAllActors().

static vtkRenderer [] IG.Gr3d.UtilVtk.GetRenderersArray ( vtkRenderWindow  win)
inlinestatic

Returns an array of all non-null renderers contained in the specified vtkRenderWindow object. If the specified VTK render window is null then an empty array is returned.

Parameters
winVTK renderer window (type vtkRenderWindow) for which an array of contained renderers is returned.
static void IG.Gr3d.UtilVtk.SetBounds ( vtkCubeAxesActor  actor,
IBoundingBox  bounds 
)
inlinestatic
static BoundingBox IG.Gr3d.UtilVtk.CreateBounds ( params vtkRenderer[]  renderers)
inlinestatic

Creates and returns the minimal volume bounding box that contains all graphical objects of the specified vtkRenderer.

Parameters
actorsvtkRendererobjects for which the bounding box is created. Must not be null or empty array.

Referenced by IG.Gr3d.TestVtkGraphicBase.ExampleAxisHendler(), and IG.Gr3d.TestVtkGraphicBase.ExampleStructuredGrid().

static void IG.Gr3d.UtilVtk.UpdateBounds ( IBoundingBox  bounds,
params vtkRenderer[]  renderers 
)
inlinestatic

Updates the specified bounding box in such a way that it also contains all graphic primitives of the specified VTK Renderers.

Parameters
renderersVTK Renderers for which the bounding box is eventually resized in such a way that the renderers fit in it. All non-null elements must have the same dimension.
boundsBounding box to be updated. It must be allocated and of the same dimension as the VTK actor according to which the bounding box is updated.

Referenced by IG.Gr3d.TestVtkGraphicBase.ExampleQuadCells(), and IG.Gr3d.VtkDecorationHandler.UpdateBoundsInternal().

static void IG.Gr3d.UtilVtk.UpdateBounds ( ref IBoundingBox  bounds,
params vtkRenderer[]  renderers 
)
inlinestatic

Updates the specified bounding box in such a way that it also contains all graphic primitives of the specified VTK Renderers.

Parameters
renderersVTK Renderers for which the bounding box is eventually resized in such a way that the renderers fit in it. All non-null elements must have the same dimension.
boundsBounding box to be updated. It must be allocated and of the same dimension as the VTK actor according to which the bounding box is updated.
static BoundingBox IG.Gr3d.UtilVtk.CreateBounds ( params vtkActor[]  actors)
inlinestatic

Creates and returns the minimal volume bounding box that contains all graphical objects of the specified vtkActor.

Parameters
actorsvtkActorobjects for which the bounding box is created. Must not be null or empty array.
static void IG.Gr3d.UtilVtk.UpdateBounds ( IBoundingBox  bounds,
params vtkActor[]  actors 
)
inlinestatic

Updates the specified bounding box in such a way that it also contains all graphic primitives of the specified VTK Actors.

Parameters
actorsVTK Actors for which the bounding box is eventually resized in such a way that the actor fits in it. If different than null then the first element must not be null. All non-null elements must have the same dimension.
boundsBounding box to be updated. It must be allocated and of the same dimension as the VTK actor according to which the bounding box is updated.

References IG.Num.IBoundingBox.Dimension, and IG.Num.IBoundingBox.Update().

static void IG.Gr3d.UtilVtk.UpdateBounds ( ref IBoundingBox  bounds,
params vtkActor[]  actors 
)
inlinestatic

Updates the specified bounding box in such a way that it also contains all graphic primitives of the specified VTK Actor.

Parameters
actorsVTK Actor for which the bounding box is eventually resized in such a way that the actor fits in it. If null then noting happens.
boundsBounding box to be updated. If allocated then it must be of the same dimension as actors .
Exceptions
ArgumentExceptionWhen bounding box is not of the same dimension than actors and actors is different than 0.
static bool IG.Gr3d.UtilVtk.IsVtkForm ( this IVtkFormContainer  control)
inlinestatic

Returns a boolean value telling whether the specified object of type IVtkFormContainer actually contains a VTK rendering control (type RenderWindowControl).

Parameters
controlControl (or more generally control container) that is checked.

There is a possibility that its appropriate sub-control is of another type such as Panel, and the object just emulates a container of VTK render control. This may be the case because of conditional compilation, which enables manipulation of forms by form designer, since the VTK form is not compatible with the designer.

References IG.Gr3d.IVtkFormContainerGen< VtkControlType >.VtkRenderWindowControl.

static Kitware.VTK.RenderWindowControl IG.Gr3d.UtilVtk.GetVtkRenderWindowControl ( this IVtkFormContainer  control)
inlinestatic

Returns a VTK rendering control of type Kitware.VTK.RenderWindowControl that is contained in the specified object, or null if such a control is not contained or is null.

Parameters
controlControl (or more generally control container) whose rendering control is attempted to be returned.

There is a possibility that its appropriate sub-control is of another type such as Panel, and the object just emulates a container of VTK render control. This may be the case because of conditional compilation, which enables manipulation of forms by form designer, since the VTK form is not compatible with the designer.

References IG.Gr3d.IVtkFormContainerGen< VtkControlType >.VtkRenderWindowControl.

static Kitware.VTK.vtkRenderWindow IG.Gr3d.UtilVtk.GetVtkRenderWindow ( this IVtkFormContainer  control)
inlinestatic

Returns a VTK rendering window of type Kitware.VTK.vtkRenderWindow that is contained in the specified object, or null if such a control is not contained or is null.

Parameters
controlControl (or more generally control container) whose rendering window is attempted to be returned.

There is a possibility that its appropriate sub-control is of another type such as Panel, and the object just emulates a container of VTK render control. This may be the case because of conditional compilation, which enables manipulation of forms by form designer, since the VTK form is not compatible with the designer.

References IG.Gr3d.IVtkFormContainerGen< VtkControlType >.VtkRenderWindowControl.

static Kitware.VTK.vtkRenderer IG.Gr3d.UtilVtk.GetVtkRenderer ( this IVtkFormContainer  control)
inlinestatic

Returns a VTK renderer of type Kitware.VTK.vtkRenderer that is contained in the specified object, or null if such a VTK render control is not contained or its renderer is null.

Parameters
controlControl (or more generally control container) whose VTK renderer is attempted to be returned.

There is a possibility that its appropriate sub-control is of another type such as Panel, and the object just emulates a container of VTK render control. This may be the case because of conditional compilation, which enables manipulation of forms by form designer, since the VTK form is not compatible with the designer.

References IG.Gr3d.IVtkFormContainerGen< VtkControlType >.VtkRenderWindowControl.

static Kitware.VTK.vtkCamera IG.Gr3d.UtilVtk.GetVtkCamera ( this IVtkFormContainer  control)
inlinestatic

Returns the active VTK camera of type Kitware.VTK.vtkCamera that is contained in the specified object, or null if VTK render control is not contained or its camera is null.

Parameters
controlControl (or more generally control container) whose VTK camera is attempted to be returned.

There is a possibility that its appropriate sub-control is of another type such as Panel, and the object just emulates a container of VTK render control. This may be the case because of conditional compilation, which enables manipulation of forms by form designer, since the VTK form is not compatible with the designer.

References IG.Gr3d.IVtkFormContainerGen< VtkControlType >.VtkRenderWindowControl.

static void IG.Gr3d.UtilVtk.LookUpTableRange ( ColorScale  scalarBarColorScale,
int  numValues,
ref vtkLookupTable  ScalarBarLookUpTable 
)
inlinestatic

Transform colorScale range to LookUpTable range directly.

Parameters
scalarBarColorScaleColor scale.
numValuesNumber of cells in ScalarBar.
ScalarBarLookUpTableLookUpTable

Tako78 Dec23;

References IG.Lib.ColorScale.MaxValue, and IG.Lib.ColorScale.MinValue.

static void IG.Gr3d.UtilVtk.LookUpTableRange ( ColorScale  scalarBarColorScale,
int  numValues,
double  minRangeLT,
double  maxRangeLT,
ref vtkLookupTable  ScalarBarLookUpTable 
)
inlinestatic

Transform colorScale range to LookUpTable range. Ranges are different.

Parameters
scalarBarColorScaleColor scale.
numValuesNumber of cells in ScalarBar.
minRangeLTMinimum range in LookUpTable.
maxRangeLTMaximum range in LookUpTable.
ScalarBarLookUpTableLookUpTable

Tako78 Dec23;

References IG.Lib.color.B, IG.Lib.color.G, IG.Lib.ColorScaleBase.GetColor(), IG.Lib.ColorScale.MaxValue, IG.Lib.ColorScale.MinValue, IG.Lib.color.Opacity, and IG.Lib.color.R.


The documentation for this class was generated from the following file: