Adapter from an ArrayNd object to a Array3dScalar object.
#include <DataAnalysis/DataStructures/ndto3dadaptor.h>
|
| NdTo3dAdaptor () |
|
| ~NdTo3dAdaptor () override |
|
qint64 | cacheKey () const override |
|
NdTo3dAdaptor * | clone () 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 |
|
| ~Array3dTyped () override=default |
|
Array3dTyped * | clone () 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 |
|
| ~Array3d () override=default |
|
virtual qint64 | cacheKey () const =0 |
|
Array3d * | clone () 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 |
|
virtual | ~Clonable ()=default |
|
virtual Clonable * | clone () const =0 |
|
◆ NdTo3dAdaptor()
◆ ~NdTo3dAdaptor()
◆ cacheKey()
qint64 cacheKey |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ clone()
- 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 |
◆ empty()
◆ 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]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
data | The data we are going to be adapting from. |
xDim | The dimension we would like to use as our X dimension. |
yDim | The dimension we would like to use as our Y dimension. |
zDim | The dimension we would like to use as our Z dimension. |
fixedDims | A 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]
- Parameters
-
data | The data we are going to be adapting from. |
xDim | The dimension we would like to use as our X dimension. |
yDim | The dimension we would like to use as our Y dimension. |
fixedDims | A 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()