Field3D
|
#include <Field.h>
Public Types | |
typedef FieldRes | class_type |
typedef boost::intrusive_ptr< FieldRes > | Ptr |
typedef std::vector< Ptr > | Vec |
![]() | |
typedef FieldBase | class_type |
typedef boost::intrusive_ptr< FieldBase > | Ptr |
![]() | |
typedef boost::intrusive_ptr< RefBase > | Ptr |
Public Member Functions | |
V3i const | dataResolution () const |
virtual std::string | dataTypeString () const |
const Box3i & | dataWindow () const |
Returns the data window. Any coordinate inside this window is safe to pass to value() in the Field subclass. More... | |
const Box3i & | extents () const |
Returns the extents of the data. This signifies the relevant area that the data exists over. However, the data window (below) may be smaller than the extents, in which case it is only safe to call value() for those coordinate inside the data window. More... | |
FieldRes () | |
This constructor ensures that we have a valid mapping at all times. More... | |
FieldRes (const FieldRes &src) | |
Base class copy constructor. More... | |
bool | isInBounds (int i, int j, int k) const |
Returns true is the indicies are in bounds of the data window. More... | |
FieldMapping::Ptr | mapping () |
Returns a pointer to the mapping. More... | |
const FieldMapping::Ptr | mapping () const |
Returns a pointer to the mapping. More... | |
virtual long long int | memSize () const |
Returns the memory usage (in bytes) More... | |
void | setMapping (FieldMapping::Ptr mapping) |
Sets the field's mapping. More... | |
![]() | |
FieldBase () | |
Constructor. More... | |
FieldBase (const FieldBase &) | |
Copy Constructor. More... | |
virtual | ~FieldBase () |
Destructor. More... | |
virtual std::string | className () const =0 |
Returns the class name of the object. Used by the class pool and when writing the data to disk. More... | |
virtual Ptr | clone () const =0 |
Returns a pointer to a copy of the field, pure virtual so ensure derived classes properly implement it. More... | |
FieldMetadata< FieldBase > & | metadata () |
accessor to the m_metadata class More... | |
const FieldMetadata< FieldBase > & | metadata () const |
Read only access to the m_metadata class. More... | |
virtual void | metadataHasChanged (const std::string &) |
This function should implemented by concrete classes to get the callback when metadata changes. More... | |
void | copyMetadata (const FieldBase &field) |
Copies the metadata from a second field. More... | |
![]() | |
void | ref () const |
Used by boost::intrusive_pointer. More... | |
size_t | refcnt () |
Used by boost::intrusive_pointer. More... | |
void | unref () const |
Used by boost::intrusive_pointer. More... | |
RefBase () | |
RefBase (const RefBase &) | |
Copy constructor. More... | |
RefBase & | operator= (const RefBase &) |
Assignment operator. More... | |
virtual | ~RefBase () |
Destructor. More... | |
virtual bool | checkRTTI (const char *typenameStr)=0 |
This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();. More... | |
bool | matchRTTI (const char *typenameStr) |
Performs a check to see if the given typename string matches this class' This needs to be implemented in -all- subclasses, even abstract ones. More... | |
Static Public Member Functions | |
static const char * | classType () |
static const char * | staticClassName () |
![]() | |
static const char * | classType () |
static const char * | staticClassName () |
![]() | |
static const char * | classType () |
Public Attributes | |
DEFINE_FIELD_RTTI_ABSTRACT_CLASS | |
![]() | |
std::string | attribute |
Optional name of the attribute the field represents. More... | |
std::string | name |
Optional name of the field. More... | |
Protected Types | |
typedef MatrixFieldMapping | default_mapping |
Protected Attributes | |
Box3i | m_dataWindow |
Defines the area where data is allocated. This should be treated as a closed (i.e. inclusive) interval. More... | |
Box3i | m_extents |
Defines the extents of the the storage. This may be larger or smaller than the data window, and in the case where it is larger, care must be taken not to access voxels outside the data window. This should be treated as a closed (i.e. inclusive) interval. More... | |
FieldMapping::Ptr | m_mapping |
Pointer to the field's mapping. More... | |
Private Types | |
typedef FieldBase | base |
Convenience typedef for referring to base class. More... | |
This class serves to isolate the extents and data window from its templated subclasses. Thus, anything that needs to access the extents or data window don't need to know about what data type the subclass is templated on.
It also owns the field's mapping.
Why do we have both an extent and a data window? The extents are used to define which range of voxels define the [0..1] local coordinate system. The data window in turn defines the voxels that are legal to read/write from. Thus, for optimization we may have a large extents but a small data window, or a small extents and a larger data window which would let us apply large-kernel filters without having to deal with boundary conditions.
typedef boost::intrusive_ptr<FieldRes> FieldRes::Ptr |
typedef std::vector<Ptr> FieldRes::Vec |
typedef FieldRes FieldRes::class_type |
|
protected |
|
private |
|
inline |
This constructor ensures that we have a valid mapping at all times.
Definition at line 314 of file Field.h.
References m_dataWindow, m_extents, and m_mapping.
|
inline |
Base class copy constructor.
Definition at line 324 of file Field.h.
References m_mapping, and mapping().
|
inlinevirtual |
Reimplemented in Field< Data_T >.
|
inlinestatic |
|
inline |
Returns the extents of the data. This signifies the relevant area that the data exists over. However, the data window (below) may be smaller than the extents, in which case it is only safe to call value() for those coordinate inside the data window.
Definition at line 251 of file Field.h.
Referenced by ResizableField< Data_T >::classType(), convertCellCenteredToMAC(), convertMACToCellCentered(), ResizableField< Data_T >::copyFrom(), sameDefinition(), ResizableField< Data_T >::setSize(), MACFieldIO::writeInternal(), DenseFieldIO::writeInternal(), and SparseFieldIO::writeInternal().
|
inline |
Returns the data window. Any coordinate inside this window is safe to pass to value() in the Field subclass.
Definition at line 255 of file Field.h.
Referenced by MACField< Data_T >::begin_comp(), MACField< Data_T >::cbegin_comp(), MACField< Data_T >::cend_comp(), ResizableField< Data_T >::classType(), convertCellCenteredToMAC(), convertMACToCellCentered(), ResizableField< Data_T >::copyFrom(), MACField< Data_T >::end_comp(), MACFieldUtil::makeDataWindowForComponent(), sameDefinition(), LinearFieldInterp< Data_T >::sample(), CubicFieldInterp< Data_T >::sample(), LinearMACFieldInterp< Data_T >::sample(), CubicMACFieldInterp< Data_T >::sample(), ResizableField< Data_T >::setSize(), MACFieldIO::writeInternal(), DenseFieldIO::writeInternal(), and SparseFieldIO::writeInternal().
|
inline |
Definition at line 258 of file Field.h.
Referenced by DenseField< Data_T >::begin(), SparseField< Data_T >::begin(), WritableField< Data_T >::begin(), MACField< Data_T >::begin_comp(), SparseField< Data_T >::blockBegin(), DenseField< Data_T >::cbegin(), SparseField< Data_T >::cbegin(), Field< Data_T >::cbegin(), MACField< Data_T >::cbegin_comp(), SparseField< Data_T >::releaseBlocks(), and ProceduralFieldLookup< Data_T >::sample().
|
inline |
Sets the field's mapping.
Definition at line 336 of file Field.h.
References m_extents, m_mapping, Msg::print(), and Msg::SevWarning.
Referenced by convertCellCenteredToMAC(), ResizableField< Data_T >::copyFrom(), ResizableField< Data_T >::matchDefinition(), Field3DInputFile::readLayer(), and Field3DInputFile::readProxyLayer().
|
inline |
Returns a pointer to the mapping.
Definition at line 265 of file Field.h.
Referenced by convertCellCenteredToMAC(), convertMACToCellCentered(), ResizableField< Data_T >::copyFrom(), Field3DOutputFile::createNewPartition(), FieldRes(), sameDefinition(), Field3DOutputFile::writeLayer(), and wsSample().
|
inline |
Returns a pointer to the mapping.
Definition at line 269 of file Field.h.
|
inline |
Returns true is the indicies are in bounds of the data window.
Definition at line 349 of file Field.h.
References m_dataWindow.
|
inlinevirtual |
Returns the memory usage (in bytes)
Reimplemented in SparseField< Data_T >, MACField< Data_T >, DenseField< Data_T >, and EmptyField< Data_T >.
Definition at line 281 of file Field.h.
Referenced by EmptyField< Data_T >::memSize(), DenseField< Data_T >::memSize(), and MACField< Data_T >::memSize().
|
protected |
Defines the extents of the the storage. This may be larger or smaller than the data window, and in the case where it is larger, care must be taken not to access voxels outside the data window. This should be treated as a closed (i.e. inclusive) interval.
Definition at line 296 of file Field.h.
Referenced by FieldRes(), and setMapping().
|
protected |
Defines the area where data is allocated. This should be treated as a closed (i.e. inclusive) interval.
Definition at line 299 of file Field.h.
Referenced by DenseField< Data_T >::begin(), SparseField< Data_T >::begin(), MACField< Data_T >::begin_comp(), DenseField< Data_T >::cbegin(), SparseField< Data_T >::cbegin(), Field< Data_T >::cbegin(), MACField< Data_T >::cbegin_comp(), DenseField< Data_T >::cend(), SparseField< Data_T >::cend(), Field< Data_T >::cend(), MACField< Data_T >::cend_comp(), DenseField< Data_T >::end(), SparseField< Data_T >::end(), MACField< Data_T >::end_comp(), DenseField< Data_T >::fastLValue(), SparseField< Data_T >::fastLValue(), DenseField< Data_T >::fastValue(), SparseField< Data_T >::fastValue(), FieldRes(), isInBounds(), EmptyField< Data_T >::lvalue(), DenseField< Data_T >::ptr(), SparseField< Data_T >::setupBlocks(), DenseField< Data_T >::sizeChanged(), MACField< Data_T >::sizeChanged(), MACField< Data_T >::u(), MACField< Data_T >::uPtr(), MACField< Data_T >::v(), EmptyField< Data_T >::value(), MACField< Data_T >::vPtr(), MACField< Data_T >::w(), and MACField< Data_T >::wPtr().
|
protected |
Pointer to the field's mapping.
Definition at line 301 of file Field.h.
Referenced by FieldRes(), and setMapping().