FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Member Functions | Public Attributes | List of all members
Fiber::Slicer< Converter, InputTypes > Struct Template Reference

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

#include <Slicer.hpp>

Inheritance diagram for Fiber::Slicer< Converter, InputTypes >:
Fiber::SlicerBase MemCore::ReferenceBase< SlicerBase > Fiber::RegularCoordinateSlice

Public Member Functions

 Slicer (int o, double theCoordinateValue, const Converter &theConverter)
 
void addSlices (const RefPtr< Field > &InputCoordinates, const RefPtr< Field > &InputData) override
 Expand the coordinate and data fields by slices as retrieved from the input coordinates and input data.
 
- Public Member Functions inherited from Fiber::SlicerBase
 SlicerBase (int o, double theCoordinateValue)
 
void setFragmentSelector (const RefPtr< FragmentSelector > &theFragmentSelector)
 
- Public Member Functions inherited from MemCore::ReferenceBase< SlicerBase >
auto getObjectCountID () const noexcept
 
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
 
void mkAutoDestructive ()
 
refcount_t refcount () const noexcept
 
 ReferenceBase (Object *that) noexcept
 
const auto & self () const
 
refcount_t wrefcount () const noexcept
 
- Public Member Functions inherited from Fiber::RegularCoordinateSlice
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

Converter myConverter
 
- Public Attributes inherited from Fiber::SlicerBase
const double myCoordinateValue
 
RefPtr< FieldOutputCoordinates
 The output coordinates of the 2D slice.
 
RefPtr< FieldOutputData
 The output coordinates of the 2D slice.
 
RefPtr< FragmentSelectormyFragmentSelector
 
- Public Attributes inherited from Fiber::RegularCoordinateSlice
int X
 
int Y
 
int Z
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< SlicerBase >
typedef Object reference_domain_t
 
typedef WeakPtr< Object, Object > SelfPtr_t
 
- Protected Member Functions inherited from MemCore::ReferenceBase< SlicerBase >
virtual void extremeUnction ()
 
ReferenceBaseoperator= (const ReferenceBase &R)
 
void suicide ()
 

Detailed Description

template<class Converter, class InputTypes>
struct Fiber::Slicer< Converter, InputTypes >

Helper class to select a slice from a regular grid.

struct CopyConverter
{
typedef double input_type;
typedef double output_type;
template <class Src, class Dst>
void copy(Src&src, const Dst&dst) const
{
src = dst;
}
};
typedef Slicer<CopyConverter, LIST<double, LIST<float> > > MySlicer;
constexpr _OI copy(_II __first, _II __last, _OI __result)
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34

Member Function Documentation

◆ addSlices()

template<class Converter , class InputTypes >
void Fiber::Slicer< Converter, InputTypes >::addSlices ( const RefPtr< Field > &  InputCoordinates,
const RefPtr< Field > &  InputData 
)
inlineoverridevirtual

Expand the coordinate and data fields by slices as retrieved from the input coordinates and input data.

This function accumulates slices from all the fragments in the input data.

Implements Fiber::SlicerBase.

References Fiber::SlicerBase::OutputCoordinates, and Fiber::SlicerBase::OutputData.