ODIN
Public Member Functions | Friends | List of all members
Sample Class Reference

Virtual Sample for Simulation. More...

#include <sample.h>

Inheritance diagram for Sample:
Inheritance graph
[legend]

Public Member Functions

 Sample (const STD_string &label="unnamedSample", bool uniformFOV=true, bool uniformT1T2=false)
 
 Sample (const Sample &ss)
 
Sampleoperator= (const Sample &ss)
 
Sampleset_FOV (float fov)
 
Sampleset_FOV (axis direction, float fov)
 
float get_FOV (axis direction) const
 
Sampleset_spatial_offset (axis direction, float offs)
 
float get_spatial_offset (axis direction) const
 
Sampleset_freqrange (float range)
 
float get_freqrange () const
 
Sampleset_freqoffset (float offs)
 
float get_freqoffset () const
 
Sampleset_frame_durations (const dvector &intervals)
 
const dvectorget_frame_durations () const
 
Sampleresize (unsigned int framesize, unsigned int freqsize, unsigned int zsize, unsigned int ysize, unsigned int xsize)
 
const ndimget_extent () const
 
Sampleset_T1 (float relaxation_time)
 
Sampleset_T2 (float relaxation_time)
 
Sampleset_T1map (const farray &t1map)
 
const farrayget_T1map () const
 
Sampleset_T2map (const farray &t2map)
 
const farrayget_T2map () const
 
Sampleset_ppmMap (const farray &ppmmap)
 
const farrayget_ppmMap () const
 
Sampleset_spinDensity (const farray &sd)
 
const farrayget_spinDensity () const
 
Sampleset_DcoeffMap (const farray &dmap)
 
const farrayget_DcoeffMap () const
 
Sampleupdate ()
 
int load (const STD_string &filename, const LDRserBase &serializer=LDRserJDX())
 
- Public Member Functions inherited from LDRblock
 LDRblock (const STD_string &title="Parameter List")
 
 LDRblock (const LDRblock &block)
 
 ~LDRblock ()
 
LDRblockoperator= (const LDRblock &block)
 
LDRblockmerge (LDRblock &block, bool onlyUserPars=true)
 
LDRblockunmerge (LDRblock &block)
 
STD_string printval (const STD_string &parameterName, bool append_unit=false) const
 
bool parseval (const STD_string &parameterName, const STD_string &value)
 
int parseblock (const STD_string &source, const LDRserBase &serializer=LDRserJDX())
 
unsigned int numof_pars () const
 
LDRbaseget_parameter (const STD_string &ldrlabel)
 
bool parameter_exists (const STD_string &ldrlabel) const
 
LDRblockset_prefix (const STD_string &prefix)
 
LDRblockset_embedded (bool embedded)
 
bool is_embedded () const
 
LDRbaseoperator[] (unsigned int i)
 
const LDRbaseoperator[] (unsigned int i) const
 
LDRbaseget_parameter_by_id (int id)
 
LDRblockcreate_copy (const LDRblock &src)
 
LDRblockappend_copy (const LDRbase &src)
 
LDRblockcopy_ldr_vals (const LDRblock &src)
 
bool operator== (const LDRblock &rhs) const
 
bool operator< (const LDRblock &rhs) const
 
bool compare (const LDRblock &rhs, const STD_list< STD_string > *exclude=0, double accuracy=0.0) const
 
STD_string print (const LDRserBase &serializer=LDRserJDX()) const
 
LDRbaseset_parmode (parameterMode parameter_mode)
 
LDRbaseset_filemode (fileMode file_mode)
 
STD_string get_parx_code (parxCodeType type) const
 
STD_ostream & print2stream (STD_ostream &os, const LDRserBase &serializer) const
 
bool parsevalstring (const STD_string &, const LDRserBase *ser=0)
 
bool parse (STD_string &parstring, const LDRserBase &serializer)
 
STD_string printvalstring (const LDRserBase *ser=0) const
 
LDRbasecreate_copy () const
 
STD_string get_typeInfo (bool parx_equivtype=false) const
 
int write (const STD_string &filename, const LDRserBase &serializer=LDRserJDX()) const
 
- Public Member Functions inherited from LDRbase
virtual double get_minval () const
 
virtual double get_maxval () const
 
bool has_minmax () const
 
const STD_string & get_description () const
 
LDRbaseset_description (const STD_string &descr)
 
virtual svector get_alternatives () const
 
const STD_string & get_unit () const
 
LDRbaseset_unit (const STD_string &un)
 
virtual parameterMode get_parmode () const
 
virtual fileMode get_filemode () const
 
virtual GuiProps get_gui_props () const
 
virtual LDRbaseset_gui_props (const GuiProps &)
 
JcampDxProps get_jdx_props () const
 
LDRbaseset_jdx_props (const JcampDxProps &jp)
 
- Public Member Functions inherited from Labeled
 Labeled (const STD_string &label="unnamed")
 
Labeledset_label (const STD_string &label)
 
const STD_string & get_label () const
 
Labeledoperator= (const Labeled &l)
 
- Public Member Functions inherited from List< I, P, R >
 List ()
 
 ~List ()
 
Listoperator= (const List &l)
 
Listclear ()
 
Listappend (R item)
 
Listremove (R item)
 
unsigned int size () const
 
iter get_begin ()
 
iter get_end ()
 
constiter get_const_begin () const
 
constiter get_const_end () const
 

Friends

class SeqSimMagsi
 

Additional Inherited Members

- Public Types inherited from List< I, P, R >
typedef STD_list< P >::iterator iter
 
typedef STD_list< P >::const_iterator constiter
 
- Protected Member Functions inherited from LDRblock
LDRblockappend_member (LDRbase &ldr, const STD_string ldrlabel="")
 

Detailed Description

Virtual Sample for Simulation.

Class to store properties of a virtual sample which is used as input to simulation. The arrays are 4-dimensional: one frequency dimension and 3 spatial dimensions. Coordinates are in the laboratory frame of reference.

Definition at line 55 of file sample.h.

Constructor & Destructor Documentation

◆ Sample() [1/2]

Sample::Sample ( const STD_string &  label = "unnamedSample",
bool  uniformFOV = true,
bool  uniformT1T2 = false 
)

Constructs a sample consisting of single voxel with the given label and the parameters:

  • uniformFOV: A uniform FOV is used in each spatial dimension
  • uniformT1T2: Uniform relaxation constants T1 and T2 are used, set_T1/2map has no effect

◆ Sample() [2/2]

Sample::Sample ( const Sample ss)

Constructs a copy of 'ss'

Member Function Documentation

◆ get_DcoeffMap()

const farray& Sample::get_DcoeffMap ( ) const

Returns the diffusion coefficient map

◆ get_extent()

const ndim& Sample::get_extent ( ) const
inline

Returns the extent vector

Definition at line 148 of file sample.h.

◆ get_FOV()

float Sample::get_FOV ( axis  direction) const

Returns the FOV of the sample in the given direction

◆ get_frame_durations()

const dvector& Sample::get_frame_durations ( ) const
inline

Returns the vector of time intervals of the frames.

Definition at line 132 of file sample.h.

◆ get_freqoffset()

float Sample::get_freqoffset ( ) const
inline

Returns the frequency offset

Definition at line 119 of file sample.h.

◆ get_freqrange()

float Sample::get_freqrange ( ) const
inline

Returns the frequency range

Definition at line 109 of file sample.h.

◆ get_ppmMap()

const farray& Sample::get_ppmMap ( ) const

Returns an array for the relative frequency offset (in ppm)

◆ get_spatial_offset()

float Sample::get_spatial_offset ( axis  direction) const
inline

Returns the spatial offset in the given direction

Definition at line 99 of file sample.h.

◆ get_spinDensity()

const farray& Sample::get_spinDensity ( ) const

Returns an array for the spin density of each voxel

◆ get_T1map()

const farray& Sample::get_T1map ( ) const

Returns the array for the longitudinal relaxation time

◆ get_T2map()

const farray& Sample::get_T2map ( ) const

Returns the array for the transverse relaxation time

◆ load()

int Sample::load ( const STD_string &  filename,
const LDRserBase serializer = LDRserJDX() 
)
virtual

Loads the parameter(s) from a file using format 'serializer'. In case of calling this function of a single paramter, the file is searched for this parameter and the value is assigned. In case of a parameter block, all parameter values are taken from the file. The return value is the number of parameters which are successfully parsed. If an error occurs, -1 is returned.

Reimplemented from LDRblock.

◆ operator=()

Sample& Sample::operator= ( const Sample ss)

Assignment operator that makes this Sample become a copy of 'ss'

◆ resize()

Sample& Sample::resize ( unsigned int  framesize,
unsigned int  freqsize,
unsigned int  zsize,
unsigned int  ysize,
unsigned int  xsize 
)

Resize the sample in the four dimensions according to the given sizes:

  • framesize: Number of frames (time intervals)
  • freqsize: Number of frequency intervals
  • zsize: Spatial extent in the axial direction of the scanner coordinate system
  • ysize: Spatial extent in the 2nd transversal direction of the scanner coordinate system
  • xsize: Spatial extent in the 1st transversal direction of the scanner coordinate system

◆ set_DcoeffMap()

Sample& Sample::set_DcoeffMap ( const farray dmap)

Sets the diffusion coefficient map

◆ set_FOV() [1/2]

Sample& Sample::set_FOV ( axis  direction,
float  fov 
)

Sets the FOV of the sample in the given direction

◆ set_FOV() [2/2]

Sample& Sample::set_FOV ( float  fov)

Sets the uniform FOV of the sample

◆ set_frame_durations()

Sample& Sample::set_frame_durations ( const dvector intervals)
inline

Sets a vector of time intervals to cycle through frames periodically. For maps with a time dimension, the index of the current interval will also be used to index the time dimension of the map.

Definition at line 127 of file sample.h.

◆ set_freqoffset()

Sample& Sample::set_freqoffset ( float  offs)
inline

Sets the frequency offset

Definition at line 114 of file sample.h.

◆ set_freqrange()

Sample& Sample::set_freqrange ( float  range)
inline

Sets the frequency range

Definition at line 104 of file sample.h.

◆ set_ppmMap()

Sample& Sample::set_ppmMap ( const farray ppmmap)

Sets an array for the relative frequency offset (in ppm)

◆ set_spatial_offset()

Sample& Sample::set_spatial_offset ( axis  direction,
float  offs 
)
inline

Sets the spatial offset in the given direction

Definition at line 94 of file sample.h.

◆ set_spinDensity()

Sample& Sample::set_spinDensity ( const farray sd)

Sets an array for the spin density of each voxel

◆ set_T1()

Sample& Sample::set_T1 ( float  relaxation_time)
inline

Sets a uniform longitudinal relaxation time

Definition at line 153 of file sample.h.

◆ set_T1map()

Sample& Sample::set_T1map ( const farray t1map)

Sets an array for the longitudinal relaxation time

◆ set_T2()

Sample& Sample::set_T2 ( float  relaxation_time)
inline

Sets a uniform transverse relaxation time

Definition at line 158 of file sample.h.

◆ set_T2map()

Sample& Sample::set_T2map ( const farray t2map)

Sets an array for the transverse relaxation time

◆ update()

Sample& Sample::update ( )

Updates all parameter relations


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