RNifti: RNifti::NiftiImageData::Element Struct Reference

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 >
Element & | operator= (const SourceType &value)
| Copy assignment operator. More...
Element & | operator= (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

  parent | A reference to the parent object
  ptr | An 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

  other | Another 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

  value | The 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:

- inst/include/RNifti/NiftiImage.h