MeVisLabToolboxReference
|
Support for structured multi-frame (SMF) DICOM objects, not to be used. More...
#include <DCMTree_EnhancedMF.h>
Public Types | |
typedef std::vector< unsigned int > | IndexVector |
Index vector type, ordered as (z, t, u1, u2, ...) | |
Public Member Functions | |
EnhancedMF (const DictPtr &dict, TreePtr tree) | |
ctor - gets the tree of the DICOM tags for the SMF Use this constructor to access an existing SMF object. | |
Access all tags valid for a given frame | |
TagPtr | tagForFrame (TagId tagId, unsigned int frameIndex) |
Get a pointer to the specified tag for a given frame. | |
Const_TagPtr | tagForFrame (TagId tagId, unsigned int frameIndex) const |
Get a pointer to the specified tag for a given frame (const version) | |
TreePtr | extractTagTreeForFrame (unsigned int frameIndex) const |
Extract all DICOM tags for a given frame (deep copy) | |
TreePtr | extractSharedTagTree () const |
Extract all DICOM tags valid for all frames (deep copy) | |
void | setTagForFrame (const TagPtr tag, unsigned int frameIndex) |
Add/replace specified tag for a given frame. | |
void | setPerFrameTags (const Tree &tree, unsigned int frameIndex) |
Set/replace frame-specific tags for a given frame. | |
Relation between logical grid and DICOM multi-frame structure | |
unsigned int | getGridDimension () const |
Get the dimension of the logical grid (i.e. the number of dimensions) | |
const IndexVector & | getGridExtent () const |
Get the extents of the logical grid (i.e. the size in each dimension) | |
unsigned int | getNumberOfFrames () const |
Get total number of frames. | |
unsigned int | getFrameIndex (const IndexVector &position) const |
Get the frame index for a given grid position, may throw an exception if not exist. | |
unsigned int | getFrameIndex (unsigned int z, unsigned int t=0, unsigned int u1=0) const |
bool | frameExists (const IndexVector &position) const |
Return true if frame at a given grid position exists. | |
IndexVector | getGridPosition (unsigned int frameIndex) const |
Get grid position for given frame index, may throw an exception if not exist. | |
const IndexVector & | getGridToSMFMap () const |
Get a vector describing the order in which the logical grid dimensions appear in the DICOM representation. | |
const std::vector< unsigned int > & | getSMFToGridMap () const |
Get the inverse of the grid-to-SMF-map. | |
Check validity of SMF object | |
enum | StatusCode { OK = 0, NO_PER_FRAME_TAGS, AMBIGUOUS_TAG, INCONSISTENT_PER_FRAME_TAGS, NUM_STATUS_CODES } |
Status code constants. More... | |
enum | { NO_INDEX = 255 } |
StatusCode | checkPerFrameTags (unsigned int frameIndex) const |
Check validity of per-frame tags for specified frame. | |
StatusCode | check (unsigned int *badFrame=0) const |
Check validity of SMF object. |
Support for structured multi-frame (SMF) DICOM objects, not to be used.
NOTE: This is a unused (and not finshed) version with support for real enhanced MF data For our SMF, we use are simplified version for performance reasons Part of the code may be used for enhanced MF support later
Definition at line 24 of file DCMTree_EnhancedMF.h.
typedef std::vector<unsigned int> DCMTree::EnhancedMF::IndexVector |
Index vector type, ordered as (z, t, u1, u2, ...)
Definition at line 29 of file DCMTree_EnhancedMF.h.
anonymous enum |
Definition at line 75 of file DCMTree_EnhancedMF.h.
Status code constants.
Definition at line 65 of file DCMTree_EnhancedMF.h.
ctor - gets the tree of the DICOM tags for the SMF Use this constructor to access an existing SMF object.
Make sure that the DICOM tags defining the SMF structure are not modified during the lifetime of this object.
StatusCode DCMTree::EnhancedMF::check | ( | unsigned int * | badFrame = 0 | ) | const |
Check validity of SMF object.
If the returned status is not OK and badFrame is not NULL, it receives the index of the first frame causing an error.
StatusCode DCMTree::EnhancedMF::checkPerFrameTags | ( | unsigned int | frameIndex | ) | const |
Check validity of per-frame tags for specified frame.
TreePtr DCMTree::EnhancedMF::extractSharedTagTree | ( | ) | const |
Extract all DICOM tags valid for all frames (deep copy)
TreePtr DCMTree::EnhancedMF::extractTagTreeForFrame | ( | unsigned int | frameIndex | ) | const |
Extract all DICOM tags for a given frame (deep copy)
bool DCMTree::EnhancedMF::frameExists | ( | const IndexVector & | position | ) | const |
Return true if frame at a given grid position exists.
unsigned int DCMTree::EnhancedMF::getFrameIndex | ( | const IndexVector & | position | ) | const |
Get the frame index for a given grid position, may throw an exception if not exist.
unsigned int DCMTree::EnhancedMF::getFrameIndex | ( | unsigned int | z, |
unsigned int | t = 0 , |
||
unsigned int | u1 = 0 |
||
) | const |
unsigned int DCMTree::EnhancedMF::getGridDimension | ( | ) | const |
Get the dimension of the logical grid (i.e. the number of dimensions)
All frames in a structured multi-frame (SMF) object are located at different positions in a logical, multi-dimensional grid. By convention, this grid has a spatial dimension (z), a time dimension (t), and optionally additional user dimensions (u1, u2, ...). This ordering may differ from the order in which the dimensions are arranged in the DICOM representation of the SMF object.
const IndexVector& DCMTree::EnhancedMF::getGridExtent | ( | ) | const |
Get the extents of the logical grid (i.e. the size in each dimension)
IndexVector DCMTree::EnhancedMF::getGridPosition | ( | unsigned int | frameIndex | ) | const |
Get grid position for given frame index, may throw an exception if not exist.
const IndexVector& DCMTree::EnhancedMF::getGridToSMFMap | ( | ) | const |
Get a vector describing the order in which the logical grid dimensions appear in the DICOM representation.
The first item of this vectors is the index at which the spatial dimension appears in the DICOM structure, the second item is the index of the time dimension, etc.
unsigned int DCMTree::EnhancedMF::getNumberOfFrames | ( | ) | const |
Get total number of frames.
const std::vector<unsigned int>& DCMTree::EnhancedMF::getSMFToGridMap | ( | ) | const |
Get the inverse of the grid-to-SMF-map.
void DCMTree::EnhancedMF::setPerFrameTags | ( | const Tree & | tree, |
unsigned int | frameIndex | ||
) |
Set/replace frame-specific tags for a given frame.
void DCMTree::EnhancedMF::setTagForFrame | ( | const TagPtr | tag, |
unsigned int | frameIndex | ||
) |
Add/replace specified tag for a given frame.
Const_TagPtr DCMTree::EnhancedMF::tagForFrame | ( | TagId | tagId, |
unsigned int | frameIndex | ||
) | const |
Get a pointer to the specified tag for a given frame (const version)
Get a pointer to the specified tag for a given frame.