FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Member Functions | Public Attributes | List of all members
Fiber::RegularCoordinateSlice Struct Reference

Helper class to select a slice from a regular grid. More...

#include <RegularCoordinateSlice.hpp>

Inheritance diagram for Fiber::RegularCoordinateSlice:
Fiber::SliceConstructor< Converter > Fiber::SlicerBase Fiber::RangedFloatSlicer Fiber::Slicer< Converter, InputTypes >

Public Member Functions

void setup (int orient)
 
 RegularCoordinateSlice (int o)
 
MultiIndex< 3 > getIndex (index_t x, index_t y, index_t z) const
 
double getComponent (const Eagle::FixedArray< double, 3 > &P) const
 
bool getRectilinearIndex (double CoordinateValue, const MemCore::RefPtr< MemBase > &CoordValues, double &CoordinateIndex)
 Given a dataset of three-dimensional coordinate values, either uniform or rectilinear, and a coordinate value for this slice selection, compute the coordinate index that corresponds to this coordinate.
 
bool getRectilinearIndex (double SliceCoordinateValue, const RefPtr< Field > &Coords, const RefPtr< FragmentID > &fid, double &CoordinateIndex)
 
bool getSliceCornerIndex (MultiIndex< 3 > &I, const MultiIndex< 3 > &DataDims, int CornerX, int CornerY, index_t sliceIndex) const
 Given the dimensions of a three-dimensional array, compute the 3D indices of a slice.
 
MemCore::RefPtr< MemBasegetCoordinates (index_t sliceIndex, const MultiIndex< 3 > &DataDims, const RefPtr< Field > &Coords, const RefPtr< FragmentID > &fid)
 
template<class Dest , class Source , class Converter >
void extractData (MultiArray< 2, Dest > &DestArray, const MultiArray< 3, Source > &SrcArray, const index_t &SliceNumber, const Converter &C, const MultiIndex< 3 > &SourceOffset=MIndex(0, 0, 0))
 Extract data slice from the source array to a 2D destination array, whereby the destination array must be larger than or equal to the source array.
 
bool validDestinationSize (const MultiIndex< 3 > &Dst, index_t DestSliceNumber, const MultiIndex< 3 > &Src)
 
template<class Dest , class Source , class Converter >
bool extractDataToOriented3D (MultiArray< 3, Dest > &DestArray, index_t DestSliceNumber, const MultiArray< 3, Source > &SrcArray, index_t SliceNumber, const Converter &C)
 Extract data slice from the source array to the destination array, whereby the destination array must be larger than or equal to the source array.
 

Public Attributes

int X
 
int Y
 
int Z
 

Detailed Description

Helper class to select a slice from a regular grid.

Member Function Documentation

◆ extractDataToOriented3D()

template<class Dest , class Source , class Converter >
bool Fiber::RegularCoordinateSlice::extractDataToOriented3D ( MultiArray< 3, Dest > &  DestArray,
index_t  DestSliceNumber,
const MultiArray< 3, Source > &  SrcArray,
index_t  SliceNumber,
const Converter C 
)
inline

Extract data slice from the source array to the destination array, whereby the destination array must be larger than or equal to the source array.

Note
The converter is constant in this version; maybe some converters should be modifiable to perform counting or range computation during extraction.

References Fiber::HyperslabParameters::count().

◆ getCoordinates()

MemCore::RefPtr< MemBase > Fiber::RegularCoordinateSlice::getCoordinates ( index_t  sliceIndex,
const MultiIndex< 3 > &  DataDims,
const RefPtr< Field > &  Coords,
const RefPtr< FragmentID > &  fid 
)
Parameters
DataDimsThe dimensions of a field's fragment
fidThe fragment ID of the field's fragment
CoordsThe (full) coordinate field of the representation where the data field resides
sliceIndexThe index within the DataDims that is to be selected.

Referenced by Fiber::FragmentSlicer< Converter, InputTypes >::apply().

◆ getRectilinearIndex()

bool Fiber::RegularCoordinateSlice::getRectilinearIndex ( double  CoordinateValue,
const MemCore::RefPtr< MemBase > &  CoordValues,
double CoordinateIndex 
)

Given a dataset of three-dimensional coordinate values, either uniform or rectilinear, and a coordinate value for this slice selection, compute the coordinate index that corresponds to this coordinate.

Parameters
CoordinateIndexThe (floating point) index of the coordinate, if found.
AllowedCoordinateMinThe minimally allowed coordinate to yield a valid index.
AllowedCoordinateMaxThe maximally allowed coordinate to yield a valid index.

Referenced by Fiber::FragmentSlicer< Converter, InputTypes >::apply().

◆ getSliceCornerIndex()

bool Fiber::RegularCoordinateSlice::getSliceCornerIndex ( MultiIndex< 3 > &  I,
const MultiIndex< 3 > &  DataDims,
int  CornerX,
int  CornerY,
index_t  sliceIndex 
) const
inline

Given the dimensions of a three-dimensional array, compute the 3D indices of a slice.

Parameters
IThe return value, the given slice index.
const MultiIndex<3>&DataDims;
getSliceIndex(P00, DataDims, 0,0, sliceIndex);
getSliceIndex(P01, DataDims, 0,1, sliceIndex);
getSliceIndex(P10, DataDims, 1,0, sliceIndex);
getSliceIndex(P11, DataDims, 1,1, sliceIndex);
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34