vapor.renderer module#

class vapor.renderer.BarbRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::BarbParams Class that supports drawing Barbs based on 2D or 3D vector field.

GetGrid#
const vector<long> VAPoR::BarbParams::GetGrid()

Determine the size of the discrete grid E.g. the grid on which barbs are placed.

Returns

vector<long> grid

GetLengthScale#
double VAPoR::BarbParams::GetLengthScale()

Get the length scaling factor

Returns

double scale factor

GetLineThickness#
double VAPoR::BarbParams::GetLineThickness()

Query line thickness as a multiplier that’s applied to the default value.

Returns

double line thickness.

GetXBarbsCount() int#

Number of barbs displayed on X axis.

GetYBarbsCount() int#

Number of barbs displayed on Y axis.

GetZBarbsCount() int#

Number of barbs displayed on Z axis.

SetGrid#
void VAPoR::BarbParams::SetGrid(const int grid[3])

Specify the size of a discrete grid E.g. the grid on which barbs are placed.

Parameters

int array of size 3 - Specifies the barb distribution on the X, Y, and Z axes.

SetLengthScale#

void VAPoR::BarbParams::SetLengthScale(double val)

SetLineThickness#
void VAPoR::BarbParams::SetLineThickness(double val)

Set line thickness as a multiplier that’s applied to the default value.

Parameters

double - Line thickness.

SetXBarbsCount(value: int)#

Number of barbs displayed on X axis.

SetYBarbsCount(value: int)#

Number of barbs displayed on Y axis.

SetZBarbsCount(value: int)#

Number of barbs displayed on Z axis.

VaporName = b'Barb'#
class vapor.renderer.BoundingBox(toWrap: Box)#

Bases: object

GetExtents()#

Returns a tuple (min, max) containing the respective region bounds

SetExtents(min, max)#

Sets the region extents. min and max can be 2 or 3-element vectors depending on the dimension of the region.

vapor.renderer.Class#

alias of ImageRenderer

class vapor.renderer.ContourRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::ContourParams Class that supports drawing Contours based on 2D or 3D vector field.

GetIsoValues() list[float]#
SetIsoValues(values: list[float])#
VaporName = b'Contour'#
class vapor.renderer.FlowRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::FlowParams

class FlowDir#

Bases: int

Enum with the following options:

FORWARD BACKWARD BI_DIR

BACKWARD = (VAPoR::FlowDir::BACKWARD) : (int) 1#
BI_DIR = (VAPoR::FlowDir::BI_DIR) : (int) 2#
FORWARD = (VAPoR::FlowDir::FORWARD) : (int) 0#
class FlowSeedMode#

Bases: int

Enum with the following options:

UNIFORM RANDOM RANDOM_BIAS LIST

LIST = (VAPoR::FlowSeedMode::LIST) : (int) 3#
RANDOM = (VAPoR::FlowSeedMode::RANDOM) : (int) 1#
RANDOM_BIAS = (VAPoR::FlowSeedMode::RANDOM_BIAS) : (int) 2#
UNIFORM = (VAPoR::FlowSeedMode::UNIFORM) : (int) 0#
GetFlowDirection#
int VAPoR::FlowParams::GetFlowDirection()

Get the current flow renderer’s advection direction.

Returns

int - The advection direction for the current flow renderer. (0 = forward, 1 = backward, 2 = bi-directional)

GetFlowOutputMoreVariables#
std::vector<std::string> VAPoR::FlowParams::GetFlowOutputMoreVariables()

If more than one variable is being sampled along flowlines and is being written to an output file, this returns those variables.

Returns

std::vector<std::string> - A vector containing the variables being written to the specified output file name.

GetFlowlineOutputFilename#
std::string VAPoR::FlowParams::GetFlowlineOutputFilename()

This will return the file path to the text file that data will be written to when outputing flow lines.

Returns

string - The file path of the data file that contains sample values along streamlines/pathlines.

GetGridNumOfSeeds#
std::vector<long> VAPoR::FlowParams::GetGridNumOfSeeds()

Returns the number of seed points on the X, Y, and Z axes if the seeding distribution is Gridded, as determined by GetSeedGenMode()

Returns

std::vector<long> - Number of seeds distributed on the X, Y, and Z axes.

GetIntegrationRegion() BoundingBox#
GetIsSteady#
bool VAPoR::FlowParams::GetIsSteady()

Gets the type of flow rendering algorithm being used. Sets the type of flow rendering algorithm being used. Steady flow (streamlines) renders time-invariant trajectories that follow a vector field at a single timestep. Unsteady flow (pathlines) render time-variant trajectories that advect through the timeseries of a loaded dataset.

Parameters

bool - Steady/streamlines = true, Unsteady/pathlines = false

Returns

bool - Steady/streamlines = true, Unsteady/pathlines = false

GetPeriodic#
std::vector<bool> VAPoR::FlowParams::GetPeriodic()

Inquires whether the current flow advection scheme is periodic. IE - Do pathlines or streamlines continue on the opposite side of the domain when the exit it? Similar to when PAC-MAN exits the right side of the screen, and re-enters on the left. Note: this result vector could be of size 2 or 3.

Returns

std::vector<bool> - A vector consisting of booleans that indicate periodicity on the X, Y, and Z axes. (false = non-periodic, true = periodic)

GetPhongAmbient() float#

Specifies the Phong Ambient lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model ). Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

GetPhongDiffuse() float#

Specifies the Phong Diffuse lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model ). Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

GetPhongShininess() float#

Specifies the Phong Shininess lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model ). Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

GetPhongSpecular() float#

Specifies the Phong Specular lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model ). Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

GetRakeBiasStrength#
long VAPoR::FlowParams::GetRakeBiasStrength()

When randomly seeding flowlines with bias towards along a chosen variable’s distribution, this returns the bias strength. Negative bias will place seeds at locations where the bias value has low values. Positive bias will place seeds where the bias variable has high values.

Returns

int - The bias of the seed distribution.

GetRakeBiasVariable#
std::string VAPoR::FlowParams::GetRakeBiasVariable()

Returns the bias variable that randomly seeded flow-lines are distributed towards if the seed generation mode is “Random w/ Bias.”

Returns

string - The variable that seeds are biased distributed for.

GetRakeRegion() BoundingBox#
GetRandomNumOfSeeds#
long VAPoR::FlowParams::GetRandomNumOfSeeds()

Returns the number of seed points randomly generated if the seeding distribution is randomly generated, as determined by GetSeedGenMode()

Returns

long - Number of seeds randomly distributed within the seeding rake region.

GetRenderDensityFalloff() float#

Falloff parameter for the flow density rendering mode as specified in https://www.researchgate.net/publication/261329939_Trajectory_Density_Projection_for_Vector_Field_Visualization Applies data of type: double. Typical values: 0.5 to 10.0. Valid values: DBL_MIN to DBL_MAX.

GetRenderDensityToneMapping() float#

ToneMapping parameter for the flow density rendering mode as specified in https://www.researchgate.net/publication/261329939_Trajectory_Density_Projection_for_Vector_Field_Visualization Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

GetRenderFadeTail() bool#

Applies transparency to the tails of pathlines and streamlines. Applies data of type: bool. Valid values: 0 = off, 1 = on.

GetRenderFadeTailLength() int#

Specifies the length of a faded flow line when animating steady flow. Applies data of type: int. Typical values: 1 to 100. Valid values: INT_MIN to INT_MAX.

GetRenderFadeTailStart() int#

Specifies the starting integration step for fading a flow line’s tail. Applies data of type: int. Typical values: 1 to 100. Valid values: INT_MIN to INT_MAX.

GetRenderFadeTailStop() int#

Specifies the stopping integration step for fading a flow line’s tail. Applies data of type: int. Typical values: 1 to 100. Valid values: INT_MIN to INT_MAX.

GetRenderGeom3D() bool#

Toggles between rendering 2d glyphs and 3d geometry of the render type. Applies data of type: bool. Valid values: 0 = off, 1 = on.

GetRenderGlyphOnlyLeading() bool#

When rendering samples, only draw the leading sample in a path. Applies data of type: bool. Valid values: 0 = off, 1 = on.

GetRenderGlyphStride() int#

When rendering samples, draw every N samples. Applies data of type: int. Typical values: 1 to 20. Valid values: INT_MIN to INT_MAX.

GetRenderGlyphType() int#

When rendering samples, determines whether samples are rendered as circles or arrows. Applies data of type: long. Valid values: 0 = FloatParams::GlyphTypeSphere, 1 = FloatParams::GlyphTypeArrow.

GetRenderRadiusScalar() float#

Scales the radius of the flow tube rendering. Applies data of type: double. Typical values: 0.1 to 5.0. Valid values: DBL_MIN to DBL_MAX.

GetRenderShowStreamDir() bool#

Draws the direction of the flow stream. Applies data of type: bool. Valid values: 0 = off, 1 = on.

GetRenderType() int#

The rendering type that represents the flow paths. See RenderType enum class.

GetSeedGenMode#
int VAPoR::FlowParams::GetSeedGenMode()

Get the mode for generating seeds (points of origin) for the flow renderer.

Returns

int - The current seed generation mode for the flow renderer. 0 = Gridded, 1 = Random, 2 = Random with bias, 3 = List of seeds

GetSeedInjInterval#
int VAPoR::FlowParams::GetSeedInjInterval()

Returns the interval that new pathlines are injected into the scene.

Returns

int - The seed injection interval.

GetSeedInputFilename#
std::string VAPoR::FlowParams::GetSeedInputFilename()

Get the file name/path to a file containing a list of seed points to advect from. See https://vapor.readthedocs.io/en/readthedocs/usage/flowRenderer.html#seed-distribution-settings

Returns

string - A file path containing a defined list of seed points to advect from

GetSteadyNumOfSteps#
long VAPoR::FlowParams::GetSteadyNumOfSteps()

Get the target number of steps to advect a steady flow line (aka a streamline). Set the target number of steps to advect a steady flow line (aka a streamline). Note 1: Advection can terminate before hitting the specified target number of steps. Common reasons are 1) it travels out of the volume, and 2) it enters a “sink” where velocity is zero and no longer travels. Note 2: The advection step size is adjusted internally based on the current curvature, so even with the same steps being advected, the lengths of advected trajectories can still differ.

Parameters

long - The number of steps a steady flow line targets to advect.

Returns

long - The number of steps a steady flow line targets to advect.

GetVelocityMultiplier#
double VAPoR::FlowParams::GetVelocityMultiplier()

Get the multiplier being applied to the flow advection algorithm. If there happens to be a mismatch between the units of your data’s domain and the units of a variable such as wind speed, you can scale the wind field with this parameter. IE - If your data’s domain is written in kilometers but your wind vectors are in meters, you can apply a velocity multiplyer of 0.001 to correct the mismatch.

Returns

double - Velocity field multiplier for flow rendering

class GlpyhType#

Bases: int

Enum with the following options:

GlpyhTypeSphere GlpyhTypeArrow

GlpyhTypeArrow = (VAPoR::FlowParams::GlpyhType::GlpyhTypeArrow) : (unsigned int) 1#
GlpyhTypeSphere = (VAPoR::FlowParams::GlpyhType::GlpyhTypeSphere) : (unsigned int) 0#
class RenderType#

Bases: int

Enum with the following options:

RenderTypeStream RenderTypeSamples RenderTypeDensity

RenderTypeDensity = (VAPoR::FlowParams::RenderType::RenderTypeDensity) : (unsigned int) 2#
RenderTypeSamples = (VAPoR::FlowParams::RenderType::RenderTypeSamples) : (unsigned int) 1#
RenderTypeStream = (VAPoR::FlowParams::RenderType::RenderTypeStream) : (unsigned int) 0#
SetFlowDirection#
void VAPoR::FlowParams::SetFlowDirection(int)

Set the current flow renderer’s advection direction.

Parameters

int - The advection direction for the current flow renderer. (0 = forward, 1 = backward, 2 = bi-directional)

SetFlowlineOutputFilename#
void VAPoR::FlowParams::SetFlowlineOutputFilename(const std::string &)

Sets the file path to the text file that flowline output will be written to.

Parameters

string - The file path of the data file that contains sample data along streamlines/pathlines.

SetGridNumOfSeeds#
void VAPoR::FlowParams::SetGridNumOfSeeds(const std::vector< long > &)

Sets the number of seed points on the X, Y, and Z axes if the seeding distribution is Gridded, as determined by GetSeedGenMode()

Returns

std::vector<long> - Number of seeds distributed on the X, Y, and Z axes.

SetIsSteady#
void VAPoR::FlowParams::SetIsSteady(bool steady)

Sets the type of flow rendering algorithm being used. Steady flow (streamlines) renders time-invariant trajectories that follow a vector field at a single timestep. Unsteady flow (pathlines) render time-variant trajectories that advect through the timeseries of a loaded dataset.

Parameters

bool - Steady/streamlines = true, Unsteady/pathlines = false

SetPeriodic#
void VAPoR::FlowParams::SetPeriodic(const std::vector< bool > &)

Gets whether the current flow advection scheme is periodic. Inquires whether the current flow advection scheme is periodic. IE - Do pathlines or streamlines continue on the opposite side of the domain when the exit it? Similar to when PAC-MAN exits the right side of the screen, and re-enters on the left. Note: this result vector could be of size 2 or 3.

Parameters

std::vector<bool> - A vector consisting of booleans that indicate periodicity on the X, Y, and Z axes. (false = non-periodic, true = periodic)

Returns

std::vector<bool> - A vector consisting of booleans that indicate periodicity on the X, Y, and Z axes. (false = non-periodic, true = periodic)

SetPhongAmbient(value: float)#

Specifies the Phong Ambient lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model ). Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

SetPhongDiffuse(value: float)#

Specifies the Phong Diffuse lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model ). Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

SetPhongShininess(value: float)#

Specifies the Phong Shininess lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model ). Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

SetPhongSpecular(value: float)#

Specifies the Phong Specular lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model ). Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

SetRakeBiasStrength#
void VAPoR::FlowParams::SetRakeBiasStrength(long)

When randomly seeding flowlines with bias towards along a chosen variable’s distribution, this sets the bias strength.

Parameters

long - The bias of the seed distribution.

SetRakeBiasVariable#
void VAPoR::FlowParams::SetRakeBiasVariable(const std::string &)

Sets the bias variable that randomly seeded flow-lines are distributed towards if the seed generation mode is “Random w/ Bias.”

Returns

string - The variable that seeds are biased distributed for.

SetRandomNumOfSeeds#
void VAPoR::FlowParams::SetRandomNumOfSeeds(long)

Sets the number of seed points randomly generated if the seeding distribution is randomly generated, as determined by GetSeedGenMode()

Parameters

long - Number of seeds randomly distributed within the seeding rake region.

SetRenderDensityFalloff(value: float)#

Falloff parameter for the flow density rendering mode as specified in https://www.researchgate.net/publication/261329939_Trajectory_Density_Projection_for_Vector_Field_Visualization Applies data of type: double. Typical values: 0.5 to 10.0. Valid values: DBL_MIN to DBL_MAX.

SetRenderDensityToneMapping(value: float)#

ToneMapping parameter for the flow density rendering mode as specified in https://www.researchgate.net/publication/261329939_Trajectory_Density_Projection_for_Vector_Field_Visualization Applies data of type: double. Typical values: 0.0 to 1.0. Valid values: DBL_MIN to DBL_MAX.

SetRenderFadeTail(value: bool)#

Applies transparency to the tails of pathlines and streamlines. Applies data of type: bool. Valid values: 0 = off, 1 = on.

SetRenderFadeTailLength(value: int)#

Specifies the length of a faded flow line when animating steady flow. Applies data of type: int. Typical values: 1 to 100. Valid values: INT_MIN to INT_MAX.

SetRenderFadeTailStart(value: int)#

Specifies the starting integration step for fading a flow line’s tail. Applies data of type: int. Typical values: 1 to 100. Valid values: INT_MIN to INT_MAX.

SetRenderFadeTailStop(value: int)#

Specifies the stopping integration step for fading a flow line’s tail. Applies data of type: int. Typical values: 1 to 100. Valid values: INT_MIN to INT_MAX.

SetRenderGeom3D(value: bool)#

Toggles between rendering 2d glyphs and 3d geometry of the render type. Applies data of type: bool. Valid values: 0 = off, 1 = on.

SetRenderGlyphOnlyLeading(value: bool)#

When rendering samples, only draw the leading sample in a path. Applies data of type: bool. Valid values: 0 = off, 1 = on.

SetRenderGlyphStride(value: int)#

When rendering samples, draw every N samples. Applies data of type: int. Typical values: 1 to 20. Valid values: INT_MIN to INT_MAX.

SetRenderGlyphType(value: int)#

When rendering samples, determines whether samples are rendered as circles or arrows. Applies data of type: long. Valid values: 0 = FloatParams::GlyphTypeSphere, 1 = FloatParams::GlyphTypeArrow.

SetRenderRadiusScalar(value: float)#

Scales the radius of the flow tube rendering. Applies data of type: double. Typical values: 0.1 to 5.0. Valid values: DBL_MIN to DBL_MAX.

SetRenderShowStreamDir(value: bool)#

Draws the direction of the flow stream. Applies data of type: bool. Valid values: 0 = off, 1 = on.

SetRenderType(value: int)#

The rendering type that represents the flow paths. See RenderType enum class.

SetSeedGenMode#
void VAPoR::FlowParams::SetSeedGenMode(int)

Set the mode for generating seeds (points of origin) for the flow renderer.

Parameters

int - The current seed generation mode for the flow renderer. 0 = Gridded, 1 = Random, 2 = Random with bias, 3 = List of seeds

SetSeedInjInterval#
void VAPoR::FlowParams::SetSeedInjInterval(int)

Sets the interval w.r.t. the time steps that new pathlines are injected into the scene. For example, 1 means that seeds are injected at every time step, and 2 means that seeds are injected at every other time step. Note “time step” refers to the data set time step, not the integration time step

Parameters

int - The seed injection interval.

SetSeedInputFilename#
void VAPoR::FlowParams::SetSeedInputFilename(const std::string &)

Set the file name/path to a file containing a list of seed points to advect from. Get the file name/path to a file containing a list of seed points to advect from. See https://vapor.readthedocs.io/en/readthedocs/usage/flowRenderer.html#seed-distribution-settings

Parameters

string - A file path containing a defined list of seed points to advect from

Returns

string - A file path containing a defined list of seed points to advect from

SetSteadyNumOfSteps#
void VAPoR::FlowParams::SetSteadyNumOfSteps(long)

Set the target number of steps to advect a steady flow line (aka a streamline). Note 1: Advection can terminate before hitting the specified target number of steps. Common reasons are 1) it travels out of the volume, and 2) it enters a “sink” where velocity is zero and no longer travels. Note 2: The advection step size is adjusted internally based on the current curvature, so even with the same steps being advected, the lengths of advected trajectories can still differ.

Parameters

long - The number of steps a steady flow line targets to advect.

SetVelocityMultiplier#
void VAPoR::FlowParams::SetVelocityMultiplier(double)

Set the multiplier being applied to the flow advection algorithm. Get the multiplier being applied to the flow advection algorithm. If there happens to be a mismatch between the units of your data’s domain and the units of a variable such as wind speed, you can scale the wind field with this parameter. IE - If your data’s domain is written in kilometers but your wind vectors are in meters, you can apply a velocity multiplyer of 0.001 to correct the mismatch.

Parameters

double - Velocity field multiplier for flow rendering

Returns

double - Velocity field multiplier for flow rendering

VaporName = b'Flow'#
class vapor.renderer.ImageRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::ImageParams

GetIgnoreTransparency#
bool VAPoR::ImageParams::GetIgnoreTransparency()

Get whether transparency is being ignored regarding the currently selected image Valid values: 0 = transparency is being honored, 1 = transparency is being ignored

Returns

bool - State whether transparency is being ignored

GetImagePath#
std::string VAPoR::ImageParams::GetImagePath()

Set image file path

Returns

string - Path to image file

GetIsGeoRef#
bool VAPoR::ImageParams::GetIsGeoRef()

Inquire whether the currently selected image is georeferenced Valid values: 0 = do not use georeference information, 1 = use georeference information

Returns

bool - State indicating whether current image is georeferenced

ListBuiltinMaps() list[str]#
SetBuiltinMap(name: str)#
SetIgnoreTransparency#
void VAPoR::ImageParams::SetIgnoreTransparency(bool val)

Set whether transparency is being ignored regarding the currently selected image Valid values: 0 = transparency is being honored, 1 = transparency is being ignored

Parameters

bool - State whether transparency is being ignored

SetImagePath#
void VAPoR::ImageParams::SetImagePath(std::string file)

Set file path for the image to be read and displayed.

Parameters

string - Path to image file

SetIsGeoRef#
void VAPoR::ImageParams::SetIsGeoRef(bool val)

If the raster image contained in the path returned by GetImagePath() has georeference information (e.g. the file is a GeoTIFF) this boolean determines whether or not the georeference information is honored Valid values: 0 = do not use georeference information, 1 = use georeference information

Parameters

bool - State indicating whether current image is georeferenced

VaporName = b'Image'#
class vapor.renderer.ModelRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::ModelParams

GetFile() str#

Path to a 3D model file or Vapor vms scene file. 3D models can be in formats supported by the ASSIMP library. A description of the Vapor vms scene format can be found at https://vapor.readthedocs.io/en/readthedocs/usage/modelRenderer.html Applies to data of type: string

SetFile(value: str)#

Path to a 3D model file or Vapor vms scene file. 3D models can be in formats supported by the ASSIMP library. A description of the Vapor vms scene format can be found at https://vapor.readthedocs.io/en/readthedocs/usage/modelRenderer.html Applies to data of type: string

class SlicePlaneOrientationMode#

Bases: int

Normal = (VAPoR::RenderParams::SlicePlaneOrientationMode::Normal) : (int) 1#
Rotation = (VAPoR::RenderParams::SlicePlaneOrientationMode::Rotation) : (int) 0#
VaporName = b'Model'#
class vapor.renderer.Renderer(renderParams: RenderParams, id: str)#

Bases: ParamsWrapper

Wraps VAPoR::RenderParams A Params subclass for managing parameters used by Renderers.

GetAuxVariableNames#
vector<string> VAPoR::RenderParams::GetAuxVariableNames()

Get the auxiliary variable names, e.g. “position along flow” The default is a vector of length containing the empty string.

Returns

vector<string> variable name

GetColorMapVariableName#
string VAPoR::RenderParams::GetColorMapVariableName()

Get the color mapping variable name if any

Returns

string variable name

GetColorbarAnnotation() ColorbarAnnotation#
GetCompressionLevel#
int VAPoR::RenderParams::GetCompressionLevel()

virtual method indicates current Compression level.

Returns

integer compression level, 0 is most compressed

GetFieldVariableNames#
vector<string> VAPoR::RenderParams::GetFieldVariableNames()

Get the field variable names, e.g. used in flow integration.

Returns

vector<string> variable names. A vector of length 3 containing variable names. The default is 3 empty variable names.

GetHeightVariableName#
string VAPoR::RenderParams::GetHeightVariableName()

Determine variable name being used for terrain height (above or below sea level)

Returns

const string& variable name

GetPrimaryTransferFunction() TransferFunction#

Returns the transfer function for the primary rendered variable. This is usually the variable that is being colormapped and would be represented by the colorbar.

GetRefinementLevel#
int VAPoR::RenderParams::GetRefinementLevel()

Virtual method indicates current number of refinements of this Params.

Returns

integer number of refinements

GetRenderRegion() BoundingBox#
GetTransferFunction(varname: str) TransferFunction#
GetTransform#

Transform* VAPoR::RenderParams::GetTransform()

GetVariableName#
string VAPoR::RenderParams::GetVariableName()

Get the primary variable name, e.g. used in color mapping or rendering. The default is the empty string, which indicates a no variable.

Returns

string variable name

GetXFieldVariableName#
std::string VAPoR::RenderParams::GetXFieldVariableName()

Get the X field variable name, e.g. used in flow integration.

Returns

std::string X field variable name.

GetYFieldVariableName#
std::string VAPoR::RenderParams::GetYFieldVariableName()

Get the Y field variable name, e.g. used in flow integration.

Returns

std::string Y field variable name.

GetZFieldVariableName#
std::string VAPoR::RenderParams::GetZFieldVariableName()

Get the Z field variable name, e.g. used in flow integration.

Returns

std::string Z field variable name.

IsEnabled#
bool VAPoR::RenderParams::IsEnabled()

Determine if this params has been enabled for rendering Default is false.

Returns

bool true if enabled

ResetUserExtentsToDataExents#

int VAPoR::RenderParams::ResetUserExtentsToDataExents(string var=””)

SetAuxVariableNames#
void VAPoR::RenderParams::SetAuxVariableNames(vector< string > varName)

Specify auxiliary variable name; e.g. “Position along Flow” The default is a vector of length containing the empty string.

Parameters

string varNames. If any element is “0” the element will be quietly set to the empty string, “”.

SetColorMapVariableName#
void VAPoR::RenderParams::SetColorMapVariableName(string varname)

Specify the variable being used for color mapping

Parameters

string varName. If any varName is “0” it will be quietly set to the empty string, “”.

SetCompressionLevel#
void VAPoR::RenderParams::SetCompressionLevel(int val)

Virtual method sets current Compression level.

Parameters

val compression level, 0 is most compressed

SetDimensions(dim: int)#
SetEnabled#
void VAPoR::RenderParams::SetEnabled(bool val)

Enable or disable this params for rendering This should be executed between start and end capture which provides the appropriate undo/redo support Accordingly this will not make an entry in the undo/redo queue. Default is false.

Parameters

bool true to enable, false to disable.

SetFieldVariableNames#
void VAPoR::RenderParams::SetFieldVariableNames(vector< string > varNames)

Specify field variable names; e.g. used in flow integration can be 0 or 3 strings

Parameters

string varNames. If any element is “0” the element will be quietly set to the empty string, “”.

SetHeightVariableName#
void VAPoR::RenderParams::SetHeightVariableName(string varname)

Specify the variable being used for height Overrides method on RenderParams

Parameters

string varName. If any varName is “0” it will be quietly set to the empty string, “”.

Returns

int 0 if successful;

SetRefinementLevel#
void VAPoR::RenderParams::SetRefinementLevel(int numrefinements)

Virtual method sets current number of refinements of this Params.

Parameters

int refinements

SetUseSingleColor#
void VAPoR::RenderParams::SetUseSingleColor(bool val)

Turn on or off the use of single constant color (versus color map)

Parameters

val true will enable constant color

SetVariableName(name: str)#
SetXFieldVariableName#
void VAPoR::RenderParams::SetXFieldVariableName(std::string varName)

Set the X field variable name, e.g. used in flow integration.

Parameters

std::string varName for X field

SetYFieldVariableName#
void VAPoR::RenderParams::SetYFieldVariableName(std::string varName)

Set the Y field variable name, e.g. used in flow integration.

Parameters

std::string varName for Y field

SetZFieldVariableName#
void VAPoR::RenderParams::SetZFieldVariableName(std::string varName)

Set the Z field variable name, e.g. used in flow integration.

Parameters

std::string varName for Z field

UseSingleColor#

bool VAPoR::RenderParams::UseSingleColor() Indicate if a single (constant) color is being used

VaporName = None#
class vapor.renderer.SliceRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::SliceParams Class that supports drawing Barbs based on 2D or 3D vector field.

GetSampleRate() float#

If a renderer samples data points through a plane (IE - Slice and Contour), this tag identifies the parameter for how many samples to take along that vector. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: long Valid values: 0 to LONG_MAX

GetSliceOffset() float#

If a renderer can be offset from a point of origin (IE - Slice and Contour), this tag identifies the parameter for offsetting the renderer from that point. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: DBL_MIN to DBL_MAX

GetSlicePlaneNormal#
vector<double> VAPoR::RenderParams::GetSlicePlaneNormal()

Return the renderer’s 3 axis normal for creating ArbitrarilyOrientedRegularGrids.

Returns

vector<double> - Slice’s rotation on X, Y, and Z axes, specified in the data’s coordinate system Valid values - -1.0 to 1.0 for each axis component

GetSlicePlaneNormalX() float#

If a renderer can be oriented orthogonally to a normal vector (IE - Slice and Contour), this tag identifies the normal’s X component. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Typical values: -1.0 to 1.0 Valid values: DBL_MIN to DBL_MAX

GetSlicePlaneNormalY() float#

If a renderer can be oriented orthogonally to a normal vector (IE - Slice and Contour), this tag identifies the normal’s Y component. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Typical values: -1.0 to 1.0 Valid values: DBL_MIN to DBL_MAX

GetSlicePlaneNormalZ() float#

If a renderer can be oriented orthogonally to a normal vector (IE - Slice and Contour), this tag identifies the normal’s Z component. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Typical values: -1.0 to 1.0 Valid values: DBL_MIN to DBL_MAX

GetSlicePlaneOrientationMode() int#

If a renderer can be oriented according to 1) a set of rotationis on the XYZ axes, or 2) according to the orthoganality of a specified normal (IE - Slice and Contour), this tag determines which method is being used to orient the the renderer. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: long Valid values: 0 = SlicePlaneOrientationMode::Rotation , 1 = SlicePlaneOrientationMode::Normal

GetSlicePlaneOrigin#
vector<double> VAPoR::RenderParams::GetSlicePlaneOrigin()

Return the renderer’s 3 axis origin for creating ArbitrarilyOrientedRegularGrids.

Returns

vector<double> - Slice’s origin on X, Y, and Z axes, specified in the data’s coordinate system Valid values - A point within the data domain

GetSlicePlaneRotation#
vector<double> VAPoR::RenderParams::GetSlicePlaneRotation()

Return the renderer’s 3 axis rotation for creating ArbitrarilyOrientedRegularGrids.

Returns

vector<double> - Slice’s rotation on X, Y, and Z axes Valid values - -90.0 to 90.0 for each axis component

GetXSlicePlaneOrigin() float#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates

GetXSlicePlaneRotation() float#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the rotation about the X axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: -90.0 to 90.0

GetYSlicePlaneOrigin() float#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the Y axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: A point within the data domain’s Y axis coordinates

GetYSlicePlaneRotation() float#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the rotation about the Y axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: -90.0 to 90.0

GetZSlicePlaneOrigin() float#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the Z axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: A point within the data domain’s Z axis coordinates

GetZSlicePlaneRotation() float#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the rotation about the Z axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: -90.0 to 90.0

SetSampleRate(value: float)#

If a renderer samples data points through a plane (IE - Slice and Contour), this tag identifies the parameter for how many samples to take along that vector. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: long Valid values: 0 to LONG_MAX

SetSliceOffset(value: float)#

If a renderer can be offset from a point of origin (IE - Slice and Contour), this tag identifies the parameter for offsetting the renderer from that point. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: DBL_MIN to DBL_MAX

SetSlicePlaneNormalX(value: float)#

If a renderer can be oriented orthogonally to a normal vector (IE - Slice and Contour), this tag identifies the normal’s X component. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Typical values: -1.0 to 1.0 Valid values: DBL_MIN to DBL_MAX

SetSlicePlaneNormalY(value: float)#

If a renderer can be oriented orthogonally to a normal vector (IE - Slice and Contour), this tag identifies the normal’s Y component. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Typical values: -1.0 to 1.0 Valid values: DBL_MIN to DBL_MAX

SetSlicePlaneNormalZ(value: float)#

If a renderer can be oriented orthogonally to a normal vector (IE - Slice and Contour), this tag identifies the normal’s Z component. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Typical values: -1.0 to 1.0 Valid values: DBL_MIN to DBL_MAX

SetSlicePlaneOrientationMode(value: int)#

If a renderer can be oriented according to 1) a set of rotationis on the XYZ axes, or 2) according to the orthoganality of a specified normal (IE - Slice and Contour), this tag determines which method is being used to orient the the renderer. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: long Valid values: 0 = SlicePlaneOrientationMode::Rotation , 1 = SlicePlaneOrientationMode::Normal

SetXSlicePlaneOrigin(value: float)#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates

SetXSlicePlaneRotation(value: float)#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the rotation about the X axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: -90.0 to 90.0

SetYSlicePlaneOrigin(value: float)#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the Y axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: A point within the data domain’s Y axis coordinates

SetYSlicePlaneRotation(value: float)#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the rotation about the Y axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: -90.0 to 90.0

SetZSlicePlaneOrigin(value: float)#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the Z axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: A point within the data domain’s Z axis coordinates

SetZSlicePlaneRotation(value: float)#

If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the rotation about the Z axis. If a renderer supports rotation about a point of origin (IE - Slice and Contour), this tag identifies the parameter for the origin’s location on the X axis. This tag only applies when 3D data are sliced for contouring or pseudo-coloring slices Applies to data of type: double Valid values: A point within the data domain’s X axis coordinates Applies to data of type: double Valid values: -90.0 to 90.0

class SlicePlaneOrientationMode#

Bases: int

Normal = (VAPoR::RenderParams::SlicePlaneOrientationMode::Normal) : (int) 1#
Rotation = (VAPoR::RenderParams::SlicePlaneOrientationMode::Rotation) : (int) 0#
VaporName = b'Slice'#
class vapor.renderer.TwoDDataRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::TwoDDataParams Class that supports drawing Barbs based on 2D or 3D vector field.

VaporName = b'TwoDData'#
class vapor.renderer.VolumeIsoRenderer(renderParams: RenderParams, id: str)#

Bases: VolumeRenderer

Wraps VAPoR::VolumeIsoParams

GetAlgorithmNames()#
GetIsoValues() list[float]#
SetIsoValues(values: list[float])#

Supports at most 4 simultaneous iso-surfaces per renderer

VaporName = b'IsoSurface'#
class vapor.renderer.VolumeRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::VolumeParams

GetAlgorithm#
std::string VAPoR::VolumeParams::GetAlgorithm()

Get the current raycasting algorithm

Returns

string - Current raycasting algorithm (Regular, Curvilinear, or Ospray)

GetAlgorithmNames(types=(VAPoR::VolumeParams::Type::DVR) : (int) 1)#
GetLightingEnabled#
bool VAPoR::VolumeParams::GetLightingEnabled()

Get the state for whether lighting is enabled or disabled

Returns

bool - State for enabled lighting (1/true) or disabled lighting (0/false)

GetPhongAmbient#
float VAPoR::VolumeParams::GetPhongAmbient()

Get the Phong Ambient lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model )

Parameters

float - Phong ambient lighting coefficient

GetPhongDiffuse#
float VAPoR::VolumeParams::GetPhongDiffuse()

Get the Phong Diffuse lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model )

Parameters

float - Phong diffuse lighting coefficient

GetPhongShininess#
float VAPoR::VolumeParams::GetPhongShininess()

Get the Phong Diffuse lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model )

Parameters

float - Phong shininess lighting coefficient

GetPhongSpecular#
float VAPoR::VolumeParams::GetPhongSpecular()

Get the Phong Specular lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model )

Parameters

float - Phong specular lighting coefficient

GetSamplingMultiplier#
long VAPoR::VolumeParams::GetSamplingMultiplier()

Get the sampling rate multiplier used with the current raycasting algorithm

Returns

long - Sampling rate multiplier

GetUseColormapVariable() bool#

If this is enabled, the volume opacity will be controlled by the main variable while the colormapping will be determined by the colormap variable.

GetVolumeDensity() float#

The VolumeDensityTag applies an opacity factor to the entirety of the volume rendering in addition to the opacity applied in the Transfer Function. Values range between 0.0 (completely transparent) and 1.0 (completely opaque).

SetAlgorithm#
void VAPoR::VolumeParams::SetAlgorithm(std::string algorithm)

Set the current raycasting algorithm

Parameters

string - Raycasting algorithm (Regular, Curvilinear, or Ospray)

SetLightingEnabled#
void VAPoR::VolumeParams::SetLightingEnabled(bool v)

Enable or disable lighting from the position of the camera

Parameters

bool - Enable lighting (1/true) or disable lighting (0/false)

SetPhongAmbient#
void VAPoR::VolumeParams::SetPhongAmbient(float v)

Set the Phong Ambient lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model )

Parameters

float - Phong ambient lighting coefficient

SetPhongDiffuse#
void VAPoR::VolumeParams::SetPhongDiffuse(float v)

Set the Phong Diffuse lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model )

Parameters

float - Phong diffuse lighting coefficient

SetPhongShininess#
void VAPoR::VolumeParams::SetPhongShininess(float v)

Set the Phong Shininess lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model )

Parameters

float - Phong shininess lighting coefficient

SetPhongSpecular#
void VAPoR::VolumeParams::SetPhongSpecular(float v)

Set the Phong Specular lighting coefficient ( https://en.wikipedia.org/wiki/Phong_reflection_model )

Parameters

float - Phong specular lighting coefficient

SetSamplingMultiplier#
void VAPoR::VolumeParams::SetSamplingMultiplier(long d)

Set the sampling rate multiplier used with the current raycasting algorithm

Parameters

long - Sampling rate multiplier

SetUseColormapVariable(value: bool)#

If this is enabled, the volume opacity will be controlled by the main variable while the colormapping will be determined by the colormap variable.

SetVolumeDensity(value: float)#

The VolumeDensityTag applies an opacity factor to the entirety of the volume rendering in addition to the opacity applied in the Transfer Function. Values range between 0.0 (completely transparent) and 1.0 (completely opaque).

VaporName = b'Volume'#
class vapor.renderer.WireFrameRenderer(renderParams: RenderParams, id: str)#

Bases: Renderer

Wraps VAPoR::WireFrameParams Class that supports drawing Barbs based on 2D or 3D vector field.

VaporName = b'WireFrame'#