13#ifndef DCM_TREE_STRUCTURED_MF_H
14#define DCM_TREE_STRUCTURED_MF_H
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
85 unsigned int timePoints = 0,
unsigned int u1Size = 0);
230 bool initPrivateTagIds(
bool newOrExisting);
232 void clearPrivateTags();
234 void createPrivateCreatorTag();
236 bool isPrivateTagId (
const TagId &tagId)
const;
238 bool isSingleSlice()
const;
243 TagInfo dimensionGroupTagInfo();
247 TagInfo defaultCreatorTagInfo();
254 void createDimensionSubtree(
TagPtr parentSeq,
int index);
256 void setDimensionsTag();
261 IndexVector indexVectorFromIndexes(
unsigned int z,
unsigned int t,
unsigned int u1 )
const;
269 bool checkGridPosition(
const IndexVector &gridPosition)
const;
283 TagId _creatorId, _privateBaseId, _dimensionsId, _dimensionSequenceId, _frameIndexId;
286 bool _alsoRegardEnhancedMultiFrameTags{};
291 #pragma warning (pop)
Const_TagPtr sharedTag(TagId tagId) const
Returns a const pointer to the specified shared tag.
void setTagForGridPosition(TagPtr tag, unsigned int z, unsigned int t=0, unsigned int u1=0, const std::string &privateCreatorArg="")
TreePtr extractTagTreeForGridPosition(IndexVector gridPosition, ExtractMode mode=ExtractSharedAndSpecific) const
Const_TreePtr tagTree() const
Returns a const pointer to the contained tag tree.
bool frameExists(const IndexVector &position) const
Returns true if frame at a given grid position exists.
bool privateTagsAreSet() const
Returns true if the internal private tags have been initialized.
void setGridPositionSpecificTags(TreePtr tree, unsigned int z, unsigned int t=0, unsigned int u1=0)
Const_TagPtr tagForGridPosition(TagId tagId, IndexVector gridPosition) const
StatusCode
Status code constants.
@ NO_PER_FRAME_TAGS
A per-frame tag list is empty.
@ INCONSISTENT_PER_FRAME_TAGS
The per-frame tag lists define different sets of tags.
void setFrameIndexForGridPosition(unsigned int frameIndex, unsigned int z, unsigned int t=0, unsigned int u1=0)
void normalizeTagStructure(double tolerance=0.0, bool compress=true)
int frameIndexForGridPosition(unsigned int z, unsigned int t=0, unsigned int u1=0) const
void setGridPositionSpecificTags(TreePtr tree, const IndexVector &gridPosition, bool skipInvalidPrivateTags=true)
Const_TagPtr tagForGridPosition(TagId tagId, unsigned int z, unsigned int t=0, unsigned int u1=0) const
const IndexVector & getGridExtent() const
Returns the extents of the logical grid (i.e., the size in each dimension).
void getEmptyFrames(std::vector< IndexVector > &positions) const
boost::uint32_t getGridDimension() const
Returns the dimension of the logical grid (i.e., the number of dimensions).
TreePtr extractTagTreeForGridPosition(unsigned int z, unsigned int t=0, unsigned int u1=0, ExtractMode mode=ExtractSharedAndSpecific) const
static std::string privateCreator
Private creator string used for storing the StructuredMF information.
Const_TagPtr sharedTag(TagId tagId, const std::string &privateCreatorArg, Vr privateVr=UN) const
Returns a const pointer to the specified shared tag with the given private creator and VR.
int frameIndexForGridPosition(const IndexVector &gridPosition) const
TreePtr tagTree()
Returns a pointer to the contained tag tree.
void setSharedTags(TreePtr tree, bool handleFuncGroups=true)
Adds/replaces shared tags with the given tag tree (no copy).
@ privateGroupId
The (fixed) private group in which the StructuredMF info is stored.
@ dimensionSequenceOffset
Element offset for dimension sequence.
@ dimensionsOffset
Element offset for number of dimensions.
@ frameIndexOffset
Element offset for frame index.
std::vector< unsigned int > IndexVector
Index vector type, ordered as (z, t, u1, u2, ...).
Const_TagPtr tagForGridPosition(TagId tagId, const std::string &privateCreatorArg, Vr privateVr, unsigned int z, unsigned int t=0, unsigned int u1=0) const
StructuredMF(Const_TreePtr tree)
Const_TagPtr tagForGridPosition(TagId tagId, IndexVector gridPosition, const std::string &privateCreatorArg, Vr privateVr=UN) const
TreePtr gridPositionTagTree(IndexVector gridPosition)
void setTagForGridPosition(TagPtr tag, const IndexVector &gridPosition, const std::string &privateCreatorArg="", bool skipInvalidPrivateTags=true)
StructuredMF(TreePtr tree)
TagPtr sharedTag_rw(TagId tagId)
TreePtr extractSharedTagTree() const
Extracts all DICOM tags valid for all frames (deep copy).
void setAlsoRegardEnhancedMultiFrameTags(bool flag)
void setFrameIndexForGridPosition(unsigned int frameIndex, const IndexVector &gridPosition)
bool alsoRegardEnhancedMultiFrameTags() const
ExtractMode
Constants for extracting DICOM tags for a given index vector.
@ ExtractSharedAndSpecific
Shared and frame-specific tags are copied to new tree.
@ ExtractSpecificWithSharedParent
Frame-specific tags are copied to new tree, shared tags are inherited.
@ ExtractSpecific
Only frame-specific tags are copied to new tree.
unsigned int getNumberOfFrames() const
Returns total number of frames.
StructuredMF(TreePtr sharedTagTree, unsigned int depth, unsigned int timePoints=0, unsigned int u1Size=0)
StructuredMF(TreePtr sharedTagTree, const IndexVector &gridExtent)
Class to carry meta information about a specific tag.
Class to dump a DCMTree DICOM message into a human-readable file.
boost::shared_ptr< const Tag > Const_TagPtr
boost::shared_ptr< const Tree > Const_TreePtr
boost::shared_ptr< Tag > TagPtr
Shared pointer to tag.
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.