ODIN
Public Member Functions | Static Public Member Functions | List of all members
Geometry Class Reference

Geometry Settings. More...

#include <geometry.h>

Inheritance diagram for Geometry:
Inheritance graph
[legend]

Public Member Functions

 Geometry (const STD_string &label="unnamedGeometry")
 
 Geometry (const Geometry &ia)
 
Geometryoperator= (const Geometry &ia)
 
Geometryset_Mode (geometryMode mode)
 
geometryMode get_Mode () const
 
Geometryset_FOV (direction dir, double fov)
 
double get_FOV (direction dir) const
 
Geometryset_offset (direction dir, double offset)
 
double get_offset (direction dir) const
 
Geometryset_nSlices (unsigned int nslices)
 
unsigned int get_nSlices () const
 
Geometryset_sliceThickness (double thick)
 
Geometryset_sliceDistance (double dist)
 
double get_sliceDistance () const
 
dvector get_readVector () const
 
dvector get_phaseVector () const
 
dvector get_sliceVector () const
 
dvector get_sliceOffsetVector () const
 
double get_sliceThickness () const
 
darray get_cornerPoints (const Geometry &background, unsigned int backgrslice) const
 
Geometryset_orientation (sliceOrientation orientation)
 
sliceOrientation get_orientation () const
 
void get_orientation (double &heightAng, double &azimutAng, double &inplaneAng, bool &revSlice) const
 
Geometryset_orientation (double heightAng, double azimutAng, double inplaneAng, bool revSlice=false)
 
Geometryset_orientation_and_offset (const dvector &readvec, const dvector &phasevec, const dvector &slicevec, const dvector &centervec)
 
dvector get_center () const
 
RotMatrix get_gradrotmatrix (bool transpose=false) const
 
dvector transform (const dvector &rpsvec, bool inverse=false) const
 
Geometrytranspose_inplane (bool reverse_read=false, bool reverse_phase=false)
 
Geometryreset ()
 
Geometryupdate ()
 
- 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 load (const STD_string &filename, const LDRserBase &serializer=LDRserJDX())
 
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
 

Static Public Member Functions

static sliceOrientation get_slice_orientation (const dvector &svec)
 

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

Geometry Settings.

Depending on the selected geometryMode, this class describes a pack of parallel and congruent slices, or a 3D volume, .i.e. a voxel.

The patients x,y,z coordinate system used for the gradients is as follows: If standing in front of the magnet with the feet of the patient pointing towards you, the axes are oriented

The three orientation angles 'heightAngle', 'azimutAngle', and 'inplaneAngle' (in degree) describe the orientation of the slicepack/voxel relative to the x/y/z-coordinate system of the gradients. If all these angles are zero, the read/phase/slice-system of the slicepack/voxel is the same as the x/y/z-system of the gradients. Otherwise, the system is rotated by the following angles (in the given order):

Definition at line 179 of file geometry.h.

Constructor & Destructor Documentation

◆ Geometry() [1/2]

Geometry::Geometry ( const STD_string &  label = "unnamedGeometry")

Constructs a Geometry with the given label

◆ Geometry() [2/2]

Geometry::Geometry ( const Geometry ia)

Copy constructor

Member Function Documentation

◆ get_center()

dvector Geometry::get_center ( ) const

Returns a vector pointing to the center of the slicepack/voxel.

◆ get_cornerPoints()

darray Geometry::get_cornerPoints ( const Geometry background,
unsigned int  backgrslice 
) const

Returns a 5-dimensional array that contains the corner points of the slices/voxels where indexing is as follows: (unsigned int slice,sliceBoundary boundary1,sliceBoundary boundary2,sliceBoundary boundary3, axis direction) with

  • slice: The slice for the point
  • boundary1: The boundary in the read direction
  • boundary2: The boundary in the phase direction
  • boundary3: The boundary in the slice direction, the size is 1 in slicepack mode
  • direction: The x,y,z index

The points are transformed to slice 'backgrslice' the coordinate system of 'background'.

◆ get_FOV()

double Geometry::get_FOV ( direction  dir) const

Returns the Field Of View in the specified direction

◆ get_gradrotmatrix()

RotMatrix Geometry::get_gradrotmatrix ( bool  transpose = false) const

Returns the rotation matrix to convert the gradient strengths in the sequence coordinate system (read,phase,slice) to the laboratory system (x,y,z). If 'transpose' is set to true, the transposed matrix is returned.

◆ get_Mode()

geometryMode Geometry::get_Mode ( ) const
inline

Returns the geometry selection mode

Definition at line 206 of file geometry.h.

◆ get_nSlices()

unsigned int Geometry::get_nSlices ( ) const
inline

Returns the number of slices of the current slice pack

Definition at line 237 of file geometry.h.

◆ get_offset()

double Geometry::get_offset ( direction  dir) const

Returns the spatial offset in the specified direction

◆ get_orientation() [1/2]

sliceOrientation Geometry::get_orientation ( ) const
inline

Returns the principal anatomical slice orientation

Definition at line 309 of file geometry.h.

◆ get_orientation() [2/2]

void Geometry::get_orientation ( double &  heightAng,
double &  azimutAng,
double &  inplaneAng,
bool &  revSlice 
) const

Returns the orientation of the slice, i.e. the three orientation angles 'heightAng', 'azimutAng' and 'inplaneAng'. 'revSlice' returns whether the slice direction (handness) is reversed.

◆ get_phaseVector()

dvector Geometry::get_phaseVector ( ) const

Returns the normalised vector for the phase direction in the laboratory system of reference

◆ get_readVector()

dvector Geometry::get_readVector ( ) const

Returns the normalised vector for the read direction in the laboratory system of reference

◆ get_slice_orientation()

static sliceOrientation Geometry::get_slice_orientation ( const dvector svec)
static

Returns the principal anatomical slice orientation of slice normal 'svec'.

◆ get_sliceDistance()

double Geometry::get_sliceDistance ( ) const
inline

Returns the slice interslice distance

Definition at line 252 of file geometry.h.

◆ get_sliceOffsetVector()

dvector Geometry::get_sliceOffsetVector ( ) const

Returns the vector of spatial offsets in slice direction for the different slices of the slicepack.

◆ get_sliceThickness()

double Geometry::get_sliceThickness ( ) const
inline

Returns the slice thickness for the slices

Definition at line 277 of file geometry.h.

◆ get_sliceVector()

dvector Geometry::get_sliceVector ( ) const

Returns the normalised vector for the slice direction in the laboratory system of reference

◆ operator=()

Geometry& Geometry::operator= ( const Geometry ia)

Assignment operator

◆ reset()

Geometry& Geometry::reset ( )

Resets the slicepacks geometry to its inintial state

◆ set_FOV()

Geometry& Geometry::set_FOV ( direction  dir,
double  fov 
)

Sets the Field Of View in the specified direction

◆ set_Mode()

Geometry& Geometry::set_Mode ( geometryMode  mode)

Sets the geometry selection mode

◆ set_nSlices()

Geometry& Geometry::set_nSlices ( unsigned int  nslices)

Sets the number of slices of the current slice pack

◆ set_offset()

Geometry& Geometry::set_offset ( direction  dir,
double  offset 
)

Sets the spatial offset in the specified direction

◆ set_orientation() [1/2]

Geometry& Geometry::set_orientation ( double  heightAng,
double  azimutAng,
double  inplaneAng,
bool  revSlice = false 
)

Specifies the orientation of the slice pack by giving the three orientation angles 'heightAng', 'azimutAng' and 'inplaneAng'. Optionally, the slice direction can be reversed by setting 'revSlice' to true.

◆ set_orientation() [2/2]

Geometry& Geometry::set_orientation ( sliceOrientation  orientation)

Set the angle parameters to match the specified anatomical slice orientation

◆ set_orientation_and_offset()

Geometry& Geometry::set_orientation_and_offset ( const dvector readvec,
const dvector phasevec,
const dvector slicevec,
const dvector centervec 
)

Specifies the orientation of the slicepack/voxel by giving the three vectors 'readvec', 'phasevec', and 'slicevec' which point in read, phase, and slice direction. The vector 'offset' must contain the spatial offset of the center of the slicepack/voxel.

◆ set_sliceDistance()

Geometry& Geometry::set_sliceDistance ( double  dist)

Sets the slice interslice distance

◆ set_sliceThickness()

Geometry& Geometry::set_sliceThickness ( double  thick)

Sets the slice thickness of the current slice pack

◆ transform()

dvector Geometry::transform ( const dvector rpsvec,
bool  inverse = false 
) const

Coordinate transformation from sequence coordinate system (read,phase,slice) of slice 'slice' to laboratory system (x,y,z), or vice versa if 'inverse' is set to 'true'.

◆ transpose_inplane()

Geometry& Geometry::transpose_inplane ( bool  reverse_read = false,
bool  reverse_phase = false 
)

Transpose geometry in-plane, 'reverse_read' and 'reverse_phase' can be used to reverse read/phase direction before transposing.

◆ update()

Geometry& Geometry::update ( )

Updates internal relations of the geometry parameters


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