A.I.M.S


aims::MincHeader Class Reference

The descriptor class of the MINC header. More...

#include <aims/io/mincheader.h>

Inheritance diagram for aims::MincHeader:
Collaboration diagram for aims::MincHeader:

Public Member Functions

int writeMincAttribute (carto::Syntax &sx, int mincid, std::string minc_var, nc_type minc_var_type, std::string minc_var_parent, std::string minc_att, std::string aims_att_name)
 
int writeMincHistory (int mincid)
 
Constructor and Destructor
 MincHeader (const std::string &name, const std::string &type="UNKNOWN", int x=1, int y=1, int z=1, int t=1, float sx=1, float sy=1, float sz=1, float st=1)
 The constructor has 2 roles : either to give the name of an existing header, or to inform the class of the various parameters. More...
 
virtual ~MincHeader ()
 Destructor does nothing. More...
 
Methods
int dimX () const
 Get dimension in X axis. More...
 
int dimY () const
 Get dimension in Y axis. More...
 
int dimZ () const
 Get dimension in Z axis. More...
 
int dimT () const
 Get dimension in T axis. More...
 
float sizeX () const
 Get resolution in X axis. More...
 
float sizeY () const
 Get resolution in Y axis. More...
 
float sizeZ () const
 Get resolution in Z axis. More...
 
float sizeT () const
 Get resolution in T axis. More...
 
std::string dataType () const
 Get type of items ("U8", "S8", "FLOAT", "S16", ...) More...
 
std::vector< std::string > possibleDataTypes () const
 
std::string name () const
 Get the file name of the header. More...
 
virtual std::string extension () const
 Get the open mode ("binar" or "ascii") More...
 
virtual std::set< std::string > extensions () const
 possible filename extensions for specialized formats More...
 
void read ()
 Read the header. More...
 
void write ()
 Write the header. More...
 
- Public Member Functions inherited from aims::PythonHeader
 PythonHeader ()
 
 PythonHeader (const internal::PythonHeaderType &)
 
 PythonHeader (const PythonHeader &)
 
 PythonHeader (carto::Headered &)
 initialization by reference More...
 
virtual ~PythonHeader ()
 
virtual PythonHeaderoperator= (const PythonHeader &)
 
virtual const char * id () const
 
virtual bool readMinf (const std::string &filename)
 read meta-info header More...
 
virtual bool writeMinf (const std::string &filename)
 write meta-info header, non-const version (may change some attributes) More...
 
virtual bool writeMinf (const std::string &filename) const
 write meta-info header More...
 
virtual HeadercloneHeader (bool keepUuid=false) const
 
virtual void copy (const PythonHeader &, bool keepUuid=false)
 
virtual bool isScalar () const
 
virtual bool isString () const
 
virtual bool isArray () const
 
virtual bool isDynArray () const
 
virtual bool isIterator () const
 
virtual bool isDictionaryIterator () const
 
- Public Member Functions inherited from carto::PointerObject< class >
 PointerObject (T &x, bool owner)
 
virtual ~PointerObject ()
 
virtual T & getValue ()
 
virtual Object clone () const
 
 TypedObject ()
 
virtual ~TypedObject ()
 
const T & getValue () const
 
virtual void setValue (Object val)
 
virtual std::string type () const
 
virtual double getScalar () const
 
virtual void setScalar (double)
 
virtual std::string getString () const
 
virtual void setString (const std::string &)
 
virtual Object getArrayItem (int index) const
 
virtual void setArrayItem (int, Object)
 
virtual size_t size () const
 
virtual void reserveArray (size_t)
 
virtual void resizeArray (size_t)
 
virtual void removeArrayItem (int)
 
virtual void insertArrayItem (int, Object)
 
virtual bool getProperty (const std::string &, Object &) const
 
virtual bool isDictionary () const
 
virtual void setProperty (const std::string &, Object)
 
virtual bool removeProperty (const std::string &)
 
virtual bool hasProperty (const std::string &) const
 
virtual void clearProperties ()
 
virtual bool isIterable () const
 
virtual Object objectIterator () const
 
virtual bool isValid () const
 
virtual Object currentValue () const
 
virtual void next ()
 
virtual std::string key () const
 
virtual bool isNone () const
 
virtual bool operator== (const GenericObject &other) const
 
- Public Member Functions inherited from carto::GenericObject
virtual ~GenericObject ()
 
const T & value () const
 
T & value ()
 
bool value (T &) const
 
void setValue (const T &val)
 
T * getInterface ()
 
const T * getInterface () const
 
virtual bool operator!= (const GenericObject &other) const
 
 RCObject ()
 
 RCObject (const RCObject &)
 
RCObjectoperator= (const RCObject &)
 
virtual ~StringInterface ()
 
virtual bool operator== (const StringInterface &other) const
 
virtual bool operator!= (const StringInterface &other) const
 
virtual ~ScalarInterface ()
 
virtual bool operator== (const ScalarInterface &other) const
 
virtual bool operator!= (const ScalarInterface &other) const
 
virtual ~NoneInterface ()
 
- Public Member Functions inherited from carto::DynArrayInterface
virtual ~DynArrayInterface ()
 
- Public Member Functions inherited from carto::ArrayInterface
virtual ~ArrayInterface ()
 
virtual ~SizeInterface ()
 
virtual ~Interface ()
 
virtual ~IterableInterface ()
 
virtual bool operator== (const IterableInterface &other) const
 
virtual bool operator!= (const IterableInterface &other) const
 
- Public Member Functions inherited from carto::DictionaryInterface
virtual ~DictionaryInterface ()
 
Object getProperty (const std::string &) const
 
Object getProperty (Object key) const
 
bool getProperty (const std::string &key, T &value) const
 
void setProperty (const std::string &, const char *)
 
void setProperty (const std::string &, const T &)
 
virtual void copyProperties (Object source)
 
virtual bool operator== (const DictionaryInterface &other) const
 
virtual bool operator!= (const DictionaryInterface &other) const
 
void setProperty (const std::string &key, Object const &value)
 
bool getProperty (const std::string &key, Object &value) const
 
- Public Member Functions inherited from carto::DictionaryIteratorInterface
virtual ~DictionaryIteratorInterface ()
 
virtual ~IteratorInterface ()
 
- Public Member Functions inherited from aims::Header
virtual ~Header ()=0
 
virtual std::string extension (const std::string &filename) const
 extension of given filename (including '.') More...
 
virtual std::string removeExtension (const std::string &) const
 

Static Public Member Functions

static void my_empty_print_error (char *message)
 mute output function More...
 
static carto::MutexmincMutex ()
 
- Static Public Member Functions inherited from aims::PythonHeader
static carto::SyntaxSetsyntax ()
 

Additional Inherited Members

- Public Types inherited from carto::GenericObject
typedef int RefCounterType
 
- Protected Member Functions inherited from carto::GenericObject
virtual Interface_getGenericInterface ()=0
 
virtual const void * _getAddressOfValue () const =0
 

Detailed Description

The descriptor class of the MINC header.

Definition at line 69 of file mincheader.h.

Constructor & Destructor Documentation

aims::MincHeader::MincHeader ( const std::string &  name,
const std::string &  type = "UNKNOWN",
int  x = 1,
int  y = 1,
int  z = 1,
int  t = 1,
float  sx = 1,
float  sy = 1,
float  sz = 1,
float  st = 1 
)
inline

The constructor has 2 roles : either to give the name of an existing header, or to inform the class of the various parameters.

Parameters
namefile name
typestring code of the type of the items [default="UNKNOWN"]
xdimension of X axis [default=1]
ydimension of Y axis [default=1]
zdimension of Z axis [default=1]
tdimension of T axis [default=1]
sxresolution of X axis [default=1.0]
syresolution of Y axis [default=1.0]
szresolution of Z axis [default=1.0]
stresolution of T axis [default=1.0]

Definition at line 90 of file mincheader.h.

virtual aims::MincHeader::~MincHeader ( )
inlinevirtual

Destructor does nothing.

Definition at line 100 of file mincheader.h.

Member Function Documentation

std::string aims::MincHeader::dataType ( ) const
inline

Get type of items ("U8", "S8", "FLOAT", "S16", ...)

Definition at line 124 of file mincheader.h.

int aims::MincHeader::dimT ( ) const
inline

Get dimension in T axis.

Definition at line 112 of file mincheader.h.

Referenced by aims::MincReader< T >::read().

int aims::MincHeader::dimX ( ) const
inline

Get dimension in X axis.

Definition at line 106 of file mincheader.h.

Referenced by aims::MincReader< T >::read().

int aims::MincHeader::dimY ( ) const
inline

Get dimension in Y axis.

Definition at line 108 of file mincheader.h.

Referenced by aims::MincReader< T >::read().

int aims::MincHeader::dimZ ( ) const
inline

Get dimension in Z axis.

Definition at line 110 of file mincheader.h.

Referenced by aims::MincReader< T >::read().

virtual std::string aims::MincHeader::extension ( ) const
inlinevirtual

Get the open mode ("binar" or "ascii")

Reimplemented from aims::Header.

Definition at line 133 of file mincheader.h.

virtual std::set<std::string> aims::MincHeader::extensions ( ) const
virtual

possible filename extensions for specialized formats

Reimplemented from aims::Header.

static carto::Mutex& aims::MincHeader::mincMutex ( )
static
static void aims::MincHeader::my_empty_print_error ( char *  message)
static

mute output function

std::string aims::MincHeader::name ( ) const
inline

Get the file name of the header.

Definition at line 127 of file mincheader.h.

std::vector<std::string> aims::MincHeader::possibleDataTypes ( ) const
inline

Definition at line 125 of file mincheader.h.

void aims::MincHeader::read ( )

Read the header.

Referenced by aims::MincReader< T >::read().

float aims::MincHeader::sizeT ( ) const
inline

Get resolution in T axis.

Definition at line 121 of file mincheader.h.

Referenced by aims::MincReader< T >::read().

float aims::MincHeader::sizeX ( ) const
inline

Get resolution in X axis.

Definition at line 115 of file mincheader.h.

Referenced by aims::MincReader< T >::read().

float aims::MincHeader::sizeY ( ) const
inline

Get resolution in Y axis.

Definition at line 117 of file mincheader.h.

Referenced by aims::MincReader< T >::read().

float aims::MincHeader::sizeZ ( ) const
inline

Get resolution in Z axis.

Definition at line 119 of file mincheader.h.

Referenced by aims::MincReader< T >::read().

void aims::MincHeader::write ( )

Write the header.

int aims::MincHeader::writeMincAttribute ( carto::Syntax sx,
int  mincid,
std::string  minc_var,
nc_type  minc_var_type,
std::string  minc_var_parent,
std::string  minc_att,
std::string  aims_att_name 
)
int aims::MincHeader::writeMincHistory ( int  mincid)

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