RNifti
Fast R and C++ Access to NIfTI Images
Public Member Functions | List of all members
RNifti::NiftiImageData::Element Struct Reference

Inner class representing a single element in the data blob. More...

#include <NiftiImage.h>

Public Member Functions

 Element (const NiftiImageData &parent, void *ptr=NULL)
 Primary constructor. More...
 
template<typename SourceType >
Elementoperator= (const SourceType &value)
 Copy assignment operator. More...
 
Elementoperator= (const Element &other)
 Copy assignment operator. More...
 
template<typename TargetType >
 operator TargetType () const
 Type-cast operator, suitable for implicit conversion to basic numeric types.
 
template<typename ElementType >
 operator std::complex< ElementType > () const
 
 operator Rcomplex () const
 Rcomplex type-cast operator, allowing data to be copied straight to a CPLXSXP
 
 operator rgba32_t () const
 

Detailed Description

Inner class representing a single element in the data blob.

Constructor & Destructor Documentation

◆ Element()

RNifti::NiftiImageData::Element::Element ( const NiftiImageData parent,
void *  ptr = NULL 
)
inline

Primary constructor.

Parameters
parentA reference to the parent object
ptrAn opaque pointer to the element. If NULL, the start of the data blob encapsulated by the parent will be used

Member Function Documentation

◆ operator=() [1/2]

Element& RNifti::NiftiImageData::Element::operator= ( const Element other)

Copy assignment operator.

Parameters
otherAnother data element
Returns
A reference to the callee

◆ operator=() [2/2]

template<typename SourceType >
Element& RNifti::NiftiImageData::Element::operator= ( const SourceType &  value)

Copy assignment operator.

Parameters
valueThe value to assign. Any basic numeric type supported by NIfTI-1 is allowed, but int is used as an intermediate type for all integers, so values unrepresentable in a signed 32-bit integer may overflow
Returns
A reference to the callee

The documentation for this struct was generated from the following file: