ODIN
|
#include <geometry.h>
Public Member Functions | |
Geometry (const STD_string &label="unnamedGeometry") | |
Geometry (const Geometry &ia) | |
Geometry & | operator= (const Geometry &ia) |
Geometry & | set_Mode (geometryMode mode) |
geometryMode | get_Mode () const |
Geometry & | set_FOV (direction dir, double fov) |
double | get_FOV (direction dir) const |
Geometry & | set_offset (direction dir, double offset) |
double | get_offset (direction dir) const |
Geometry & | set_nSlices (unsigned int nslices) |
unsigned int | get_nSlices () const |
Geometry & | set_sliceThickness (double thick) |
Geometry & | set_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 |
Geometry & | set_orientation (sliceOrientation orientation) |
sliceOrientation | get_orientation () const |
void | get_orientation (double &heightAng, double &azimutAng, double &inplaneAng, bool &revSlice) const |
Geometry & | set_orientation (double heightAng, double azimutAng, double inplaneAng, bool revSlice=false) |
Geometry & | set_orientation_and_offset (const dvector &readvec, const dvector &phasevec, const dvector &slicevec, const dvector ¢ervec) |
dvector | get_center () const |
RotMatrix | get_gradrotmatrix (bool transpose=false) const |
dvector | transform (const dvector &rpsvec, bool inverse=false) const |
Geometry & | transpose_inplane (bool reverse_read=false, bool reverse_phase=false) |
Geometry & | reset () |
Geometry & | update () |
Public Member Functions inherited from LDRblock | |
LDRblock (const STD_string &title="Parameter List") | |
LDRblock (const LDRblock &block) | |
~LDRblock () | |
LDRblock & | operator= (const LDRblock &block) |
LDRblock & | merge (LDRblock &block, bool onlyUserPars=true) |
LDRblock & | unmerge (LDRblock &block) |
STD_string | printval (const STD_string ¶meterName, bool append_unit=false) const |
bool | parseval (const STD_string ¶meterName, const STD_string &value) |
int | parseblock (const STD_string &source, const LDRserBase &serializer=LDRserJDX()) |
unsigned int | numof_pars () const |
LDRbase * | get_parameter (const STD_string &ldrlabel) |
bool | parameter_exists (const STD_string &ldrlabel) const |
LDRblock & | set_prefix (const STD_string &prefix) |
LDRblock & | set_embedded (bool embedded) |
bool | is_embedded () const |
LDRbase & | operator[] (unsigned int i) |
const LDRbase & | operator[] (unsigned int i) const |
LDRbase & | get_parameter_by_id (int id) |
LDRblock & | create_copy (const LDRblock &src) |
LDRblock & | append_copy (const LDRbase &src) |
LDRblock & | copy_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 |
LDRbase & | set_parmode (parameterMode parameter_mode) |
LDRbase & | set_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 |
LDRbase * | create_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 |
LDRbase & | set_description (const STD_string &descr) |
virtual svector | get_alternatives () const |
const STD_string & | get_unit () const |
LDRbase & | set_unit (const STD_string &un) |
virtual parameterMode | get_parmode () const |
virtual fileMode | get_filemode () const |
virtual GuiProps | get_gui_props () const |
virtual LDRbase & | set_gui_props (const GuiProps &) |
JcampDxProps | get_jdx_props () const |
LDRbase & | set_jdx_props (const JcampDxProps &jp) |
Public Member Functions inherited from Labeled | |
Labeled (const STD_string &label="unnamed") | |
Labeled & | set_label (const STD_string &label) |
const STD_string & | get_label () const |
Labeled & | operator= (const Labeled &l) |
Public Member Functions inherited from List< I, P, R > | |
List () | |
~List () | |
List & | operator= (const List &l) |
List & | clear () |
List & | append (R item) |
List & | remove (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 | |
LDRblock & | append_member (LDRbase &ldr, const STD_string ldrlabel="") |
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.
Geometry::Geometry | ( | const STD_string & | label = "unnamedGeometry" | ) |
Constructs a Geometry with the given label
Geometry::Geometry | ( | const Geometry & | ia | ) |
Copy constructor
dvector Geometry::get_center | ( | ) | const |
Returns a vector pointing to the center of the slicepack/voxel.
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
The points are transformed to slice 'backgrslice' the coordinate system of 'background'.
double Geometry::get_FOV | ( | direction | dir | ) | const |
Returns the Field Of View in the specified direction
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.
|
inline |
Returns the geometry selection mode
Definition at line 206 of file geometry.h.
|
inline |
Returns the number of slices of the current slice pack
Definition at line 237 of file geometry.h.
double Geometry::get_offset | ( | direction | dir | ) | const |
Returns the spatial offset in the specified direction
|
inline |
Returns the principal anatomical slice orientation
Definition at line 309 of file geometry.h.
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.
dvector Geometry::get_phaseVector | ( | ) | const |
Returns the normalised vector for the phase direction in the laboratory system of reference
dvector Geometry::get_readVector | ( | ) | const |
Returns the normalised vector for the read direction in the laboratory system of reference
|
static |
Returns the principal anatomical slice orientation of slice normal 'svec'.
|
inline |
Returns the slice interslice distance
Definition at line 252 of file geometry.h.
dvector Geometry::get_sliceOffsetVector | ( | ) | const |
Returns the vector of spatial offsets in slice direction for the different slices of the slicepack.
|
inline |
Returns the slice thickness for the slices
Definition at line 277 of file geometry.h.
dvector Geometry::get_sliceVector | ( | ) | const |
Returns the normalised vector for the slice direction in the laboratory system of reference
Geometry& Geometry::reset | ( | ) |
Resets the slicepacks geometry to its inintial state
Sets the Field Of View in the specified direction
Geometry& Geometry::set_Mode | ( | geometryMode | mode | ) |
Sets the geometry selection mode
Geometry& Geometry::set_nSlices | ( | unsigned int | nslices | ) |
Sets the number of slices of the current slice pack
Sets the spatial offset in the specified direction
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.
Geometry& Geometry::set_orientation | ( | sliceOrientation | orientation | ) |
Set the angle parameters to match the specified anatomical slice orientation
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.
Geometry& Geometry::set_sliceDistance | ( | double | dist | ) |
Sets the slice interslice distance
Geometry& Geometry::set_sliceThickness | ( | double | thick | ) |
Sets the slice thickness of the current slice pack
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'.
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.
Geometry& Geometry::update | ( | ) |
Updates internal relations of the geometry parameters