NPL
Neurological Programs and Libraries
npl::NDArrayStore< D, T > Class Template Reference

Basic storage unity for ND array. Creates a big chunk of memory. More...

#include <ndarray.h>

Inherits npl::NDArray.

Inherited by npl::MRImageStore< D, T > [virtual].

Public Member Functions

 NDArrayStore ()
 Constructor with initializer list. Orientation will be default (direction = identity, spacing = 1, origin = 0). More...
 
 NDArrayStore (const std::initializer_list< size_t > &dim)
 Constructor with initializer list. Orientation will be default (direction = identity, spacing = 1, origin = 0). More...
 
 NDArrayStore (const std::vector< size_t > &dim)
 Constructor with vector. Orientation will be default (direction = identity, spacing = 1, origin = 0). More...
 
 NDArrayStore (size_t len, const size_t *dim)
 Constructor with array of length len, Orientation will be default (direction = identity, spacing = 1, origin = 0). More...
 
 NDArrayStore (size_t len, const size_t *dim, T *ptr, const std::function< void(void *)> &deleter)
 Constructor which uses a preexsting array, to graft into the array. No new allocation will be performed, however ownership of the array will be taken, meaning it could be deleted anytime after this constructor completes. More...
 
 ~NDArrayStore ()
 
T & operator[] (const int64_t *index)
 
T & operator[] (const std::vector< int64_t > &index)
 
T & operator[] (std::initializer_list< int64_t > index)
 
T & operator[] (int64_t pixel)
 
const T & operator[] (const int64_t *index) const
 
const T & operator[] (const std::vector< int64_t > &index) const
 
const T & operator[] (std::initializer_list< int64_t > index) const
 
const T & operator[] (int64_t pixel) const
 
size_t ndim () const
 
size_t bytes () const
 
size_t bytesper () const
 
size_t elements () const
 
size_t dim (size_t dir) const
 
const size_t * dim () const
 
void resize (const size_t dim[D])
 Changes the dimensions (size) of the image. This does not affect rank/dimensionality. More...
 
void resize (std::initializer_list< size_t > dim)
 Changes the dimensions (size) of the image. This does not affect rank/dimensionality. More...
 
PixelT type () const
 Return enum PixelT type of pixels. More...
 
void * data ()
 Returns a pointer to the data array. Be careful. More...
 
const void * data () const
 Returns a pointer to the data array. Be careful. More...
 
void graft (const size_t dim[D], T *ptr, const std::function< void(void *)> &deleter)
 Grafts data of the given dimensions into the image, effectively changing the image size. More...
 
virtual int write (std::string filename, double version=1) const
 Write the image to a nifti file. More...
 
virtual ptr< NDArraycopy () const
 Performs a deep copy of the entire array. More...
 
virtual ptr< NDArraycreateAnother () const
 Creates an identical array, but does not initialize pixel values. More...
 
virtual ptr< NDArraycreateAnother (size_t newdims, const size_t *newsize, PixelT newtype) const
 Create a new array that is the same underlying type as this. If this is an image then it will also copy the metdata, but NOT the pixels. More...
 
virtual ptr< NDArraycreateAnother (PixelT newtype) const
 Create a new array that is the same underlying type as this, but with a different pixel type. More...
 
virtual ptr< NDArraycreateAnother (size_t newdims, const size_t *newsize) const
 Create a new array that is the same underlying type as this, and same pixel type and orientation as this, but with a different size. More...
 
virtual ptr< NDArraycopyCast (size_t newdims, const size_t *newsize, PixelT newtype) const
 Create a new array that is a copy of the input, possibly with new dimensions and pixeltype. The new array will have all overlapping pixels copied from the old array. More...
 
virtual ptr< NDArraycopyCast (PixelT newtype) const
 Create a new array that is a copy of the input, with same dimensions but pxiels cast to newtype. The new array will have all overlapping pixels copied from the old array. More...
 
virtual ptr< NDArraycopyCast (size_t newdims, const size_t *newsize) const
 Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array. More...
 
virtual ptr< NDArrayextractCast (size_t len, const int64_t *index, const size_t *size) const
 Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array. More...
 
virtual ptr< NDArrayextractCast (size_t len, const size_t *size) const
 Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array. Index assumed to be [0,0,...], so the output image will start at the origin of this image. More...
 
virtual ptr< NDArrayextractCast (size_t len, const int64_t *index, const size_t *size, PixelT newtype) const
 Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array. More...
 
virtual ptr< NDArrayextractCast (size_t len, const size_t *size, PixelT newtype) const
 Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array. Index assumed to be [0,0,...], so the output image will start at the origin of this image. More...
 
void zero ()
 Sets all elements to zero. More...
 
virtual void * __getAddr (std::initializer_list< int64_t > index) const
 
virtual void * __getAddr (size_t len, const int64_t *index) const
 
virtual void * __getAddr (const std::vector< int64_t > &index) const
 
virtual void * __getAddr (int64_t i) const
 
virtual void * __getAddr (int64_t x, int64_t y, int64_t z, int64_t t) const
 
virtual int64_t getLinIndex (std::initializer_list< int64_t > index) const
 
virtual int64_t getLinIndex (size_t len, const int64_t *index) const
 
virtual int64_t getLinIndex (const std::vector< int64_t > &index) const
 
virtual int64_t getLinIndex (int64_t x, int64_t y, int64_t z, int64_t t) const
 
virtual int64_t tlen () const
 This function just returns the number of elements in a theoretical fourth dimension (ignoring orgnaization of higher dimensions) More...
 
bool floatType () const
 Returns true if the stored type is FLOAT32, FLOAT64, or FLOAT128, ie is a pure float type. More...
 
bool complexType () const
 Returns true if the stored type is COMPLEX256, COMPLEX128, or COMPLEX64, ie is a complex floating point type. More...
 
bool signedType () const
 Returns true if the stored type is a variant of signed integer . More...
 
bool unsignedType () const
 Returns true if the stored type is a variant of unsigned signed integer. More...
 
ptr< NDArraygetPtr ()
 
ptr< const NDArraygetConstPtr () const
 

Public Attributes

T * _m_data
 
size_t _m_stride [D]
 
size_t _m_dim [D]
 

Protected Member Functions

void updateStrides ()
 
virtual int writeNifti1Image (gzFile file) const
 
virtual int writeNifti2Image (gzFile file) const
 
virtual int writeNifti1Header (gzFile file) const
 
virtual int writeNifti2Header (gzFile file) const
 
virtual int writePixels (gzFile file) const
 
virtual int writeJSON (gzFile file) const
 
virtual int writeCSV (gzFile file) const
 

Protected Attributes

std::function< void(void *)> m_freefunc
 The function which should be called when deleting data. By default this will just be delete[], but if data is grafted or if. More...
 

Detailed Description

template<size_t D, typename T>
class npl::NDArrayStore< D, T >

Basic storage unity for ND array. Creates a big chunk of memory.

Template Parameters
Ddimension of array
Ttype of sample

Definition at line 452 of file ndarray.h.

Constructor & Destructor Documentation

template<size_t D, typename T>
npl::NDArrayStore< D, T >::NDArrayStore ( )

Constructor with initializer list. Orientation will be default (direction = identity, spacing = 1, origin = 0).

template<size_t D, typename T>
npl::NDArrayStore< D, T >::NDArrayStore ( const std::initializer_list< size_t > &  dim)

Constructor with initializer list. Orientation will be default (direction = identity, spacing = 1, origin = 0).

Parameters
dimdimensions of input, the length of this initializer list may not be fully used if a_args is longer than D. If it is shorter then D then additional dimensions are left as size 1.
template<size_t D, typename T>
npl::NDArrayStore< D, T >::NDArrayStore ( const std::vector< size_t > &  dim)

Constructor with vector. Orientation will be default (direction = identity, spacing = 1, origin = 0).

Parameters
dimdimensions of input, the length of this initializer list may not be fully used if a_args is longer than D. If it is shorter then D then additional dimensions are left as size 1.
template<size_t D, typename T>
npl::NDArrayStore< D, T >::NDArrayStore ( size_t  len,
const size_t *  dim 
)

Constructor with array of length len, Orientation will be default (direction = identity, spacing = 1, origin = 0).

Parameters
lenLength of array 'size'
dimdimensions of input, the length of this initializer list may not be fully used if a_args is longer than D. If it is shorter then D then additional dimensions are left as size 1.
template<size_t D, typename T>
npl::NDArrayStore< D, T >::NDArrayStore ( size_t  len,
const size_t *  dim,
T *  ptr,
const std::function< void(void *)> &  deleter 
)

Constructor which uses a preexsting array, to graft into the array. No new allocation will be performed, however ownership of the array will be taken, meaning it could be deleted anytime after this constructor completes.

Parameters
lenLength of array 'size'
dimdimensions of input, the length of this initializer list may not be fully used if a_args is longer than D. If it is shorter then D then additional dimensions are left as size 1.
ptrPointer to data array, should be allocated with new, and size should be exactly sizeof(T)*size[0]*size[1]*...*size[len-1]
deleterFunction which should be used to delete ptr
template<size_t D, typename T>
npl::NDArrayStore< D, T >::~NDArrayStore ( )
inline

Definition at line 510 of file ndarray.h.

Member Function Documentation

template<size_t D, typename T>
virtual void* npl::NDArrayStore< D, T >::__getAddr ( std::initializer_list< int64_t >  index) const
inlinevirtual

Implements npl::NDArray.

Definition at line 765 of file ndarray.h.

template<size_t D, typename T>
virtual void* npl::NDArrayStore< D, T >::__getAddr ( size_t  len,
const int64_t *  index 
) const
inlinevirtual

Implements npl::NDArray.

Definition at line 770 of file ndarray.h.

template<size_t D, typename T>
virtual void* npl::NDArrayStore< D, T >::__getAddr ( const std::vector< int64_t > &  index) const
inlinevirtual

Implements npl::NDArray.

Definition at line 775 of file ndarray.h.

template<size_t D, typename T>
virtual void* npl::NDArrayStore< D, T >::__getAddr ( int64_t  i) const
inlinevirtual

Implements npl::NDArray.

Definition at line 780 of file ndarray.h.

template<size_t D, typename T>
virtual void* npl::NDArrayStore< D, T >::__getAddr ( int64_t  x,
int64_t  y,
int64_t  z,
int64_t  t 
) const
inlinevirtual

Implements npl::NDArray.

Definition at line 784 of file ndarray.h.

template<size_t D, typename T>
size_t npl::NDArrayStore< D, T >::bytes ( ) const
virtual

Implements npl::NDArray.

template<size_t D, typename T>
size_t npl::NDArrayStore< D, T >::bytesper ( ) const
virtual

Implements npl::NDArray.

bool npl::NDArray::complexType ( ) const
inlineinherited

Returns true if the stored type is COMPLEX256, COMPLEX128, or COMPLEX64, ie is a complex floating point type.

Returns
True if the number can be represented by a complex<long double>

Definition at line 203 of file ndarray.h.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::copy ( ) const
virtual

Performs a deep copy of the entire array.

Returns
Copied array.

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::copyCast ( size_t  newdims,
const size_t *  newsize,
PixelT  newtype 
) const
virtual

Create a new array that is a copy of the input, possibly with new dimensions and pixeltype. The new array will have all overlapping pixels copied from the old array.

Parameters
newdimsNumber of dimensions in output array
newsizeInput array sized 'newdims', indicating size of output array
newtypeType of pixels in output array
Returns
Image with overlapping sections cast and copied from 'in'

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::copyCast ( PixelT  newtype) const
virtual

Create a new array that is a copy of the input, with same dimensions but pxiels cast to newtype. The new array will have all overlapping pixels copied from the old array.

Parameters
newtypeType of pixels in output array
Returns
Image with overlapping sections cast and copied from 'in'

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::copyCast ( size_t  newdims,
const size_t *  newsize 
) const
virtual

Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array.

Parameters
newdimsNumber of dimensions in output array
newsizeSize of output array
Returns
Image with overlapping sections cast and copied from 'in'

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::createAnother ( ) const
virtual

Creates an identical array, but does not initialize pixel values.

Returns
New array.

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::createAnother ( size_t  newdims,
const size_t *  newsize,
PixelT  newtype 
) const
virtual

Create a new array that is the same underlying type as this. If this is an image then it will also copy the metdata, but NOT the pixels.

Parameters
newdimsNumber of dimensions in copied output
newsizeSize of output, this array should be of size newdims
newtypeType of pixels in output array
Returns
Image with identical orientation but different size and pixeltype

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::createAnother ( PixelT  newtype) const
virtual

Create a new array that is the same underlying type as this, but with a different pixel type.

Parameters
newtypeType of pixels in output array
Returns
Image with identical orientation and size but different pixel type

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::createAnother ( size_t  newdims,
const size_t *  newsize 
) const
virtual

Create a new array that is the same underlying type as this, and same pixel type and orientation as this, but with a different size.

Parameters
newdimsNumber of dimensions in output array
newsizeInput array of length newdims that gives the size of output array,
Returns
Image with identical orientation and pixel type but different size from this

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
void* npl::NDArrayStore< D, T >::data ( )
inlinevirtual

Returns a pointer to the data array. Be careful.

Returns
Pointer to data

Implements npl::NDArray.

Definition at line 559 of file ndarray.h.

template<size_t D, typename T>
const void* npl::NDArrayStore< D, T >::data ( ) const
inlinevirtual

Returns a pointer to the data array. Be careful.

Returns
Pointer to data

Implements npl::NDArray.

Definition at line 566 of file ndarray.h.

template<size_t D, typename T>
size_t npl::NDArrayStore< D, T >::dim ( size_t  dir) const
virtual

Implements npl::NDArray.

template<size_t D, typename T>
const size_t* npl::NDArrayStore< D, T >::dim ( ) const
virtual

Implements npl::NDArray.

template<size_t D, typename T>
size_t npl::NDArrayStore< D, T >::elements ( ) const
virtual

Implements npl::NDArray.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::extractCast ( size_t  len,
const int64_t *  index,
const size_t *  size 
) const
virtual

Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array.

Parameters
lenLength of index/newsize arrays
indexIndex to start copying from.
sizeSize of output image. Note length 0 dimensions will be removed, while length 1 dimensions will be left.
Returns
Image with overlapping sections cast and copied from 'in'

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::extractCast ( size_t  len,
const size_t *  size 
) const
virtual

Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array. Index assumed to be [0,0,...], so the output image will start at the origin of this image.

Parameters
lenLength of index/size arrays
sizeSize of output image. Note length 0 dimensions will be removed, while length 1 dimensions will be left.
Returns
Image with overlapping sections cast and copied from 'in'

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::extractCast ( size_t  len,
const int64_t *  index,
const size_t *  size,
PixelT  newtype 
) const
virtual

Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array.

Parameters
lenLength of index/size arrays
indexIndex to start copying from.
sizeSize of output image. Note length 0 dimensions will be removed, while length 1 dimensions will be left.
newtypePixel type of output image.
Returns
Image with overlapping sections cast and copied from 'in'

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual ptr<NDArray> npl::NDArrayStore< D, T >::extractCast ( size_t  len,
const size_t *  size,
PixelT  newtype 
) const
virtual

Create a new array that is a copy of the input, possibly with new dimensions or size. The new array will have all overlapping pixels copied from the old array. The new array will have the same pixel type as the input array. Index assumed to be [0,0,...], so the output image will start at the origin of this image.

Parameters
lenLength of index/size arrays
sizeSize of output image. Note length 0 dimensions will be removed, while length 1 dimensions will be left.
newtypePixel type of output image.
Returns
Image with overlapping sections cast and copied from 'in'

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

bool npl::NDArray::floatType ( ) const
inlineinherited

Returns true if the stored type is FLOAT32, FLOAT64, or FLOAT128, ie is a pure float type.

Returns
True if the number can be represented by a long double

Definition at line 193 of file ndarray.h.

ptr<const NDArray> npl::NDArray::getConstPtr ( ) const
inlineinherited

Definition at line 231 of file ndarray.h.

template<size_t D, typename T>
virtual int64_t npl::NDArrayStore< D, T >::getLinIndex ( std::initializer_list< int64_t >  index) const
virtual

Implements npl::NDArray.

template<size_t D, typename T>
virtual int64_t npl::NDArrayStore< D, T >::getLinIndex ( size_t  len,
const int64_t *  index 
) const
virtual

Implements npl::NDArray.

template<size_t D, typename T>
virtual int64_t npl::NDArrayStore< D, T >::getLinIndex ( const std::vector< int64_t > &  index) const
virtual

Implements npl::NDArray.

template<size_t D, typename T>
virtual int64_t npl::NDArrayStore< D, T >::getLinIndex ( int64_t  x,
int64_t  y,
int64_t  z,
int64_t  t 
) const
virtual

Implements npl::NDArray.

ptr<NDArray> npl::NDArray::getPtr ( )
inlineinherited

Definition at line 227 of file ndarray.h.

template<size_t D, typename T>
void npl::NDArrayStore< D, T >::graft ( const size_t  dim[D],
T *  ptr,
const std::function< void(void *)> &  deleter 
)

Grafts data of the given dimensions into the image, effectively changing the image size.

Parameters
dimDimensions of image
ptrPointer to data which we will take control of
deleterFunction which can be called on ptr to delete it.
template<size_t D, typename T>
size_t npl::NDArrayStore< D, T >::ndim ( ) const
virtual

Implements npl::NDArray.

template<size_t D, typename T>
T& npl::NDArrayStore< D, T >::operator[] ( const int64_t *  index)
template<size_t D, typename T>
T& npl::NDArrayStore< D, T >::operator[] ( const std::vector< int64_t > &  index)
template<size_t D, typename T>
T& npl::NDArrayStore< D, T >::operator[] ( std::initializer_list< int64_t >  index)
template<size_t D, typename T>
T& npl::NDArrayStore< D, T >::operator[] ( int64_t  pixel)
template<size_t D, typename T>
const T& npl::NDArrayStore< D, T >::operator[] ( const int64_t *  index) const
template<size_t D, typename T>
const T& npl::NDArrayStore< D, T >::operator[] ( const std::vector< int64_t > &  index) const
template<size_t D, typename T>
const T& npl::NDArrayStore< D, T >::operator[] ( std::initializer_list< int64_t >  index) const
template<size_t D, typename T>
const T& npl::NDArrayStore< D, T >::operator[] ( int64_t  pixel) const
template<size_t D, typename T>
void npl::NDArrayStore< D, T >::resize ( const size_t  dim[D])

Changes the dimensions (size) of the image. This does not affect rank/dimensionality.

Parameters
dimNew size
template<size_t D, typename T>
void npl::NDArrayStore< D, T >::resize ( std::initializer_list< size_t >  dim)

Changes the dimensions (size) of the image. This does not affect rank/dimensionality.

Parameters
dimNew size
bool npl::NDArray::signedType ( ) const
inlineinherited

Returns true if the stored type is a variant of signed integer .

Returns
True if the number can be represented by an int64_t

Definition at line 212 of file ndarray.h.

template<size_t D, typename T>
virtual int64_t npl::NDArrayStore< D, T >::tlen ( ) const
inlinevirtual

This function just returns the number of elements in a theoretical fourth dimension (ignoring orgnaization of higher dimensions)

Returns
number of elements in the 4th or greater dimensions

Implements npl::NDArray.

Definition at line 800 of file ndarray.h.

template<size_t D, typename T>
PixelT npl::NDArrayStore< D, T >::type ( ) const
virtual

Return enum PixelT type of pixels.

Returns
Type of values stored

Implements npl::NDArray.

bool npl::NDArray::unsignedType ( ) const
inlineinherited

Returns true if the stored type is a variant of unsigned signed integer.

Returns
True if the number can be represented by an size_t

Definition at line 222 of file ndarray.h.

template<size_t D, typename T>
void npl::NDArrayStore< D, T >::updateStrides ( )
protected
template<size_t D, typename T>
virtual int npl::NDArrayStore< D, T >::write ( std::string  filename,
double  version = 1 
) const
virtual

Write the image to a nifti file.

Parameters
filenameFilename
versionVersion of nifti to use
Returns
0 if successful

Implements npl::NDArray.

Reimplemented in npl::MRImageStore< D, T >, npl::MRImageStore< 3, double >, npl::MRImageStore< 4, double >, and npl::MRImageStore< 5, double >.

template<size_t D, typename T>
virtual int npl::NDArrayStore< D, T >::writeCSV ( gzFile  file) const
protectedvirtual
template<size_t D, typename T>
virtual int npl::NDArrayStore< D, T >::writeJSON ( gzFile  file) const
protectedvirtual
template<size_t D, typename T>
virtual int npl::NDArrayStore< D, T >::writeNifti1Header ( gzFile  file) const
protectedvirtual
template<size_t D, typename T>
virtual int npl::NDArrayStore< D, T >::writeNifti1Image ( gzFile  file) const
protectedvirtual
template<size_t D, typename T>
virtual int npl::NDArrayStore< D, T >::writeNifti2Header ( gzFile  file) const
protectedvirtual
template<size_t D, typename T>
virtual int npl::NDArrayStore< D, T >::writeNifti2Image ( gzFile  file) const
protectedvirtual
template<size_t D, typename T>
virtual int npl::NDArrayStore< D, T >::writePixels ( gzFile  file) const
protectedvirtual
template<size_t D, typename T>
void npl::NDArrayStore< D, T >::zero ( )
virtual

Sets all elements to zero.

Implements npl::NDArray.

Member Data Documentation

template<size_t D, typename T>
T* npl::NDArrayStore< D, T >::_m_data

Definition at line 805 of file ndarray.h.

template<size_t D, typename T>
size_t npl::NDArrayStore< D, T >::_m_dim[D]

Definition at line 809 of file ndarray.h.

template<size_t D, typename T>
size_t npl::NDArrayStore< D, T >::_m_stride[D]

Definition at line 808 of file ndarray.h.

std::function<void(void*)> npl::NDArray::m_freefunc
protectedinherited

The function which should be called when deleting data. By default this will just be delete[], but if data is grafted or if.

Definition at line 435 of file ndarray.h.


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