|
| NiftiImageData () |
| Constructor.
|
|
virtual | ~NiftiImageData () |
| Destructor.
|
|
| NiftiImageData (const NiftiImageData &to_copy) |
| Copy constructor.
|
|
NiftiImageData & | operator= (const NiftiImageData &to_copy) |
| Assignment.
|
|
| NiftiImageData (const ImageData &to_copy) |
| Copy constructor.
|
|
NiftiImageData & | operator= (const ImageData &to_copy) |
| Assignment.
|
|
| NiftiImageData (const std::string &filename) |
| Filename constructor.
|
|
| NiftiImageData (const nifti_image &image_nifti) |
| Nifti constructor.
|
|
template<class inputType > |
| NiftiImageData (const inputType *const data, const VoxelisedGeometricalInfo3D &geom, const bool is_tensor=false) |
| Construct from array.
|
|
bool | operator== (const NiftiImageData &other) const |
| Equality operator.
|
|
bool | operator!= (const NiftiImageData &other) const |
| Equality operator.
|
|
NiftiImageData & | operator+= (const NiftiImageData &rhs) |
| Addition operator.
|
|
NiftiImageData & | operator-= (const NiftiImageData &rhs) |
| Subtraction operator.
|
|
NiftiImageData & | operator+= (const float) |
| Addition operator.
|
|
NiftiImageData & | operator-= (const float) |
| Subtraction operator.
|
|
NiftiImageData & | operator*= (const float) |
| Multiplication operator.
|
|
NiftiImageData & | operator*= (const NiftiImageData &rhs) |
| Multiplication operator.
|
|
NiftiImageData & | operator/= (const float) |
| Division operator.
|
|
NiftiImageData & | operator/= (const NiftiImageData &rhs) |
|
float | operator() (const int index) const |
| Access data element via 1D index (const)
|
|
float & | operator() (const int index) |
| Access data element via 1D index.
|
|
float | operator() (const int index[7]) const |
| Access data element via 7D index (const)
|
|
float & | operator() (const int index[7]) |
| Access data element via 7D index.
|
|
float | operator() (const int x, const int y, const int z, const int t=0, const int u=0, const int v=0, const int w=0) const |
| Access data element via 7D index (const)
|
|
float & | operator() (const int x, const int y, const int z, const int t=0, const int u=0, const int v=0, const int w=0) |
| Access data element via 7D index.
|
|
bool | is_initialised () const |
| Is the image initialised? (Should be unless default constructor was used.)
|
|
std::shared_ptr< const nifti_image > | get_raw_nifti_sptr () const |
| Get image as nifti as const.
|
|
std::shared_ptr< nifti_image > | get_raw_nifti_sptr () |
| Get image as nifti.
|
|
virtual void | write (const std::string &filename, const int datatype) const |
|
virtual void | write (const std::string &filename) const |
| Write.
|
|
float | get_max () const |
| Get max.
|
|
float | get_min () const |
| Get min.
|
|
float | get_mean () const |
| Get mean.
|
|
float | get_variance () const |
| Get variance.
|
|
float | get_standard_deviation () const |
| Get standard deviation.
|
|
float | get_sum () const |
| Get sum.
|
|
unsigned | get_nan_count () const |
| Get nan count.
|
|
void | fill (const float v) |
| Fill.
|
|
void | fill (const dataType *v) |
| Fill from array.
|
|
void | fill (const NiftiImageData &im) |
| Fill from array.
|
|
float | get_norm (const NiftiImageData &) const |
| Get norm.
|
|
const int * | get_dimensions () const |
| Get data size in each dimension.
|
|
size_t | get_num_voxels () const |
| Get total number of voxels.
|
|
void | print_header () const |
| Print header info. More...
|
|
void | crop (const int min_index[7], const int max_index[7]) |
| Crop. Set to -1 to leave unchanged.
|
|
void | pad (const int min_index[7], const int max_index[7], const dataType val=0) |
| Pad image with value. Give number of voxels to increase in min and max directions. Set values to -1 to leave unchanged.
|
|
int | get_1D_index (const int idx[7]) const |
| get 1D index from ND index
|
|
int | get_original_datatype () const |
| Get original datatype.
|
|
bool | is_in_bounds (const int index[7]) const |
| Point is in bounds?
|
|
bool | is_in_bounds (const int index) const |
| Point is in bounds?
|
|
bool | is_same_size (const NiftiImageData &im) const |
| Images are same size.
|
|
void | set_voxel_spacing (const float factors[3], const int interpolation_order) |
|
void | kernel_convolution (const float sigma, NREG_CONV_KERNEL_TYPE conv_type=GAUSSIAN_KERNEL) |
| Kernel convolution.
|
|
bool | get_contains_nans () const |
| Does the image contain any NaNs?
|
|
void | flip_along_axis (const unsigned axis) |
| Flip the image along a given axis (Rotation of 180 degrees about axis)
|
|
void | mirror_along_axis (const unsigned axis) |
| Mirror the image along a given axis (This will change handedness of image)
|
|
dataType | get_inner_product (const NiftiImageData &other) const |
| Inner product of two images.
|
|
void | normalise_zero_and_one () |
| Normalise image between 0 and 1.
|
|
void | standardise () |
| Standardise (subtract mean and divide by standard deviation).
|
|
std::unique_ptr< NiftiImageData > | clone () const |
| Clone and return as unique pointer.
|
|
virtual Iterator & | begin () |
|
virtual Iterator_const & | begin () const |
|
virtual Iterator & | end () |
|
virtual Iterator_const & | end () const |
|
unsigned int | items () const |
|
virtual void | sum (void *ptr) const |
| below all void* are actually float*
|
|
virtual void | max (void *ptr) const |
| calculates the value of this container's element with the largest real part
|
|
virtual void | dot (const DataContainer &a_x, void *ptr) const |
| calculates the dot product of this container with another one More...
|
|
virtual void | axpby (const void *ptr_a, const DataContainer &a_x, const void *ptr_b, const DataContainer &a_y) |
| *this = the linear combination of x and y
|
|
virtual void | xapyb (const DataContainer &a_x, const void *ptr_a, const DataContainer &a_y, const void *ptr_b) |
| alternative interface to the above
|
|
virtual void | xapyb (const DataContainer &a_x, const DataContainer &a_a, const DataContainer &a_y, const DataContainer &a_b) |
| *this = elementwise sum of two elementwise products x*a and y*b
|
|
virtual void | xapyb (const DataContainer &a_x, const void *ptr_a, const DataContainer &a_y, const DataContainer &a_b) |
| *this = elementwise sum of x*a and elementwise y*b
|
|
virtual float | norm () const |
| returns the norm of this container viewed as a vector
|
|
virtual void | multiply (const DataContainer &a_x, const DataContainer &a_y) |
| *this = the elementwise product x*y
|
|
virtual void | divide (const DataContainer &a_x, const DataContainer &a_y) |
| *this = the elementwise ratio x / y
|
|
virtual void | maximum (const DataContainer &x, const DataContainer &y) |
| *this = the elementwise max(x, y)
|
|
virtual void | minimum (const DataContainer &x, const DataContainer &y) |
| *this = the elementwise min(x, y)
|
|
virtual void | power (const DataContainer &x, const DataContainer &y) |
| *this = the elementwise pow(x, y)
|
|
virtual void | multiply (const DataContainer &a_x, const void *a_y) |
| *this = the product x * y with scalar y
|
|
virtual void | add (const DataContainer &a_x, const void *a_y) |
| *this = the sum x + y with scalar y
|
|
virtual void | maximum (const DataContainer &x, const void *a_y) |
|
virtual void | minimum (const DataContainer &x, const void *a_y) |
|
virtual void | power (const DataContainer &x, const void *a_y) |
|
virtual void | exp (const DataContainer &x) |
| *this = the elementwise exp(x)
|
|
virtual void | log (const DataContainer &x) |
| *this = the elementwise log(x)
|
|
virtual void | sqrt (const DataContainer &x) |
| *this = the elementwise sqrt(x)
|
|
virtual void | sign (const DataContainer &x) |
| *this = the elementwise sign(x)
|
|
virtual void | abs (const DataContainer &x) |
| *this = the elementwise abs(x)
|
|
virtual Dimensions | dimensions () const |
|
void | unary_op (const DataContainer &a_x, dataType(*f)(dataType)) |
|
void | semibinary_op (const DataContainer &a_x, const void *a_y, dataType(*f)(dataType, dataType)) |
|
void | binary_op (const DataContainer &a_x, const DataContainer &a_y, dataType(*f)(dataType, dataType)) |
|
virtual void | set_up_geom_info () |
| Set up the geometrical info. Use qform preferentially over sform.
|
|
virtual void | scale (float s)=0 |
|
virtual bool | ordered () const |
|
void | copy (Iterator_const &src, Iterator &dst, Iterator &end) const |
|
void | fill (const ImageData &im) |
|
void | fill (float v) |
|
virtual bool | operator== (const ImageData &id) const |
| Write image to file.
|
|
virtual bool | operator!= (const ImageData &id) const |
|
std::shared_ptr< const VoxelisedGeometricalInfo3D > | get_geom_info_sptr () const |
| Get geometrical info.
|
|
std::unique_ptr< ImageData > | clone () const |
| Clone and return as unique pointer.
|
|
virtual bool | is_complex () const |
| Is complex? Unless overwridden (Gadgetron), assume not complex.
|
|
virtual void | reorient (const VoxelisedGeometricalInfo3D &) |
| Reorient image. Requires that dimesions and spacing match.
|
|
virtual int | bits () const |
| returns the size of data elements
|
|
void | xapyb (const DataContainer &a_x, const DataContainer &a_a, const DataContainer &a_y, const void *ptr_b) |
| *this = elementwise sum of elementwise x*a and y*b
|
|
bool | is_empty () const |
|
std::unique_ptr< DataContainer > | clone () const |
|
void | conjugate () |
| overwrites this container's complex data with complex conjugate values
|
|
std::unique_ptr< DataContainer > | conjugate () const |
| returns unique pointer to the complex-conjugated copy of this container
|
|
|
static std::shared_ptr< nifti_image > | create_from_geom_info (const VoxelisedGeometricalInfo3D &geom, const bool is_tensor=false, const NREG_TRANS_TYPE tensor_type=NREG_TRANS_TYPE::DEF_FIELD) |
| Create NiftiImageData from geometrical info.
|
|
static void | construct_NiftiImageData_from_complex_im_real_component (std::shared_ptr< NiftiImageData > &out_sptr, const std::shared_ptr< const ImageData > in_sptr) |
| Construct NiftiImageData from the real component of a complex SIRF ImageData.
|
|
static void | construct_NiftiImageData_from_complex_im_imag_component (std::shared_ptr< NiftiImageData > &out_sptr, const std::shared_ptr< const ImageData > in_sptr) |
| Construct NiftiImageData from the imaginary component of a complex SIRF ImageData.
|
|
static void | construct_NiftiImageData_from_complex_im (std::shared_ptr< NiftiImageData > &out_real_sptr, std::shared_ptr< NiftiImageData > &out_imag_sptr, const std::shared_ptr< const ImageData > in_sptr) |
| Construct two NiftiImageData from a complex SIRF ImageData.
|
|
static void | print_headers (const std::vector< const NiftiImageData * > &ims) |
| Print multiple header info. More...
|
|
static bool | are_equal_to_given_accuracy (const NiftiImageData &im1, const NiftiImageData &im2, const float required_accuracy_compared_to_max) |
| Check if the norms of two images are equal to a given accuracy.
|
|
static bool | do_nifti_image_metadata_match (const NiftiImageData &im1, const NiftiImageData &im2, bool verbose) |
| Do nifti image metadatas match?
|
|
static void | dump_headers (const std::vector< const NiftiImageData * > &ims) |
| Dump info of multiple nifti images.
|
|
template<typename T > |
static void | dump_nifti_element (const std::vector< const NiftiImageData * > &ims, const std::string &name, const T &call_back) |
| Dump nifti element.
|
|
template<typename T > |
static void | dump_nifti_element (const std::vector< const NiftiImageData * > &ims, const std::string &name, const T &call_back, const unsigned num_elems) |
| Dump nifti element.
|
|
static std::string | get_headers (const std::vector< const NiftiImageData< dataType > * > &ims) |
|
template<typename T > |
static std::string | get_nifti_element (const std::vector< const NiftiImageData * > &ims, const std::string &name, const T &call_back) |
|
template<typename T > |
static std::string | get_nifti_element (const std::vector< const NiftiImageData * > &ims, const std::string &name, const T &call_back, const unsigned num_elems) |
|
static bool | can_reorient (const VoxelisedGeometricalInfo3D &geom_1, const VoxelisedGeometricalInfo3D &geom_2, const bool throw_error) |
| Can reorient? (check dimensions and spacing)
|
|
template<typename T > |
static T | product (T x, T y) |
|
template<typename T > |
static T | ratio (T x, T y) |
|
template<typename T > |
static T | inverse_ratio (T x, T y) |
|
template<typename T > |
static T | sum (T x, T y) |
|
template<typename T > |
static T | maximum (T x, T y) |
|
template<typename T > |
static T | maxabs (T x, T y) |
|
template<typename T > |
static T | maxreal (T x, T y) |
|
template<typename T > |
static T | minimum (T x, T y) |
|
template<typename T > |
static T | minabs (T x, T y) |
|
template<typename T > |
static T | minreal (T x, T y) |
|
static std::complex< float > | power (std::complex< float > x, std::complex< float > y) |
|
static std::complex< float > | exp (std::complex< float > x) |
|
static std::complex< float > | log (std::complex< float > x) |
|
static std::complex< float > | sqrt (std::complex< float > x) |
|
template<typename T > |
static T | sign (T x) |
|
template<typename T > |
static T | abs (T x) |
|