Workspace 6.21.5
Public Member Functions | List of all members
NdTo3dAdaptor Class Reference

Adapter from an ArrayNd object to a Array3dScalar object.

#include <DataAnalysis/DataStructures/ndto3dadaptor.h>

Inheritance diagram for NdTo3dAdaptor:
[legend]

Public Member Functions

 NdTo3dAdaptor ()
 
 ~NdTo3dAdaptor () override
 
qint64 cacheKey () const override
 
NdTo3dAdaptorclone () const override
 
unsigned dimension (unsigned i) const override
 
bool empty () const override
 
double getFillValue () const override
 
bool hasFillValue () const override
 
double operator() (unsigned x, unsigned y, unsigned z=0) const override
 
void resize (unsigned, unsigned, unsigned) override
 
void setCell (unsigned, unsigned, unsigned, const double &) override
 
bool setData (ArrayNd &data, const NamedDimensionRange &xDim, const NamedDimensionRange &yDim, const NamedDimensionRange &zDim, const NamedDimensionRangeList &fixedDims)
 
bool setData (ArrayNd &data, const NamedDimensionRange &xDim, const NamedDimensionRange &yDim, const NamedDimensionRangeList &fixedDims)
 
unsigned size () const override
 
- Public Member Functions inherited from Array3dTyped< double >
 ~Array3dTyped () override=default
 
Array3dTypedclone () const override=0
 
virtual double getFillValue () const
 
virtual bool hasFillValue () const
 
virtual double operator() (unsigned x, unsigned y, unsigned z) const=0
 
virtual void resize (unsigned x, unsigned y, unsigned z)=0
 
virtual void setCell (unsigned x, unsigned y, unsigned z, const double &value)=0
 
- Public Member Functions inherited from Array3d
 ~Array3d () override=default
 
virtual qint64 cacheKey () const =0
 
Array3dclone () const override=0
 
virtual unsigned dimension (unsigned i) const =0
 
virtual bool empty () const =0
 
virtual QVector3D getCellSpacing () const
 
virtual QVector3D getOrigin () const
 
virtual void setCellSpacing (const QVector3D &size)
 
virtual void setOrigin (const QVector3D &origin)
 
virtual unsigned size () const =0
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Additional Inherited Members

- Public Types inherited from Array3dTyped< double >
typedef double value_type
 

Constructor & Destructor Documentation

◆ NdTo3dAdaptor()

NdTo3dAdaptor ( )
inline

◆ ~NdTo3dAdaptor()

~NdTo3dAdaptor ( )
inlineoverride

Member Function Documentation

◆ cacheKey()

qint64 cacheKey ( ) const
inlineoverridevirtual

Implements Array3d.

◆ clone()

NdTo3dAdaptor * clone ( ) const
inlineoverridevirtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

Implements Array3dTyped< double >.

◆ dimension()

unsigned dimension ( unsigned  i) const
inlineoverridevirtual

Implements Array3d.

◆ empty()

bool empty ( ) const
inlineoverridevirtual

Implements Array3d.

◆ getFillValue()

double getFillValue ( ) const
inlineoverridevirtual
Returns
the fill (empty) value of the dataset. Will return the default constructed value of T if the dataset does not have a fill value.
Note
should not be used if the dataset does not have a fill value, as the return value will be misleading.

Reimplemented from Array3dTyped< double >.

◆ hasFillValue()

bool hasFillValue ( ) const
inlineoverridevirtual
Returns
true if a particular value of the array is used to indicate that the cell is "empty". False (default) otherwise.

Reimplemented from Array3dTyped< double >.

◆ operator()()

double operator() ( unsigned  x,
unsigned  y,
unsigned  z = 0 
) const
inlineoverridevirtual

◆ resize()

void resize ( unsigned  ,
unsigned  ,
unsigned   
)
inlineoverridevirtual

◆ setCell()

void setCell ( unsigned  ,
unsigned  ,
unsigned  ,
const double &   
)
inlineoverridevirtual

◆ setData() [1/2]

bool setData ( ArrayNd data,
const NamedDimensionRange xDim,
const NamedDimensionRange yDim,
const NamedDimensionRange zDim,
const NamedDimensionRangeList fixedDims 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
dataThe data we are going to be adapting from.
xDimThe dimension we would like to use as our X dimension.
yDimThe dimension we would like to use as our Y dimension.
zDimThe dimension we would like to use as our Z dimension.
fixedDimsA list of dimensions, each with 1 element, specifying the values to use for our other non-unison dimensions.
Returns
true if the data was set successfully, false if any of the input dimensions do not exist, are out of range, or if fixedDims contains any ranges of greater than 1 element.

Sets the underlying dataset that we're adapting from. The dataset will be set up so that reading from the operator() function with the x and y parameters will retrieve values from the xDim and yDim dimensions of the dataset.

◆ setData() [2/2]

bool setData ( ArrayNd data,
const NamedDimensionRange xDim,
const NamedDimensionRange yDim,
const NamedDimensionRangeList fixedDims 
)
inline
Parameters
dataThe data we are going to be adapting from.
xDimThe dimension we would like to use as our X dimension.
yDimThe dimension we would like to use as our Y dimension.
fixedDimsA list of dimensions, each with 1 element, specifying the values to use for our other non-unison dimensions.
Returns
true if the data was set successfully, false if any of the input dimensions do not exist, are out of range, or if fixedDims contains any ranges of greater than 1 element.

Sets the underlying dataset that we're adapting from. The dataset will be set up so that reading from the operator() function with the x and y parameters will retrieve values from the xDim and yDim dimensions of the dataset.

◆ size()

unsigned size ( ) const
inlineoverridevirtual

Implements Array3d.