MeVisLab Toolbox Reference
mlDicomFrameSelectionTools.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11
12#pragma once
13
15#include <mlModuleIncludes.h>
16#include <DCMTree_Lib.h>
17
18ML_START_NAMESPACE
19
20// Forward of volume representation of DirectDicomImport module.
21class _DicomDateTimeTagIds;
22class BitImage;
23
28namespace DicomToMLTools {
29
36
38 enum {
40 };
41
43 extern MLDICOM_TO_ML_TOOLS_EXPORT const char * const VoxelDoubleOperationsStrings[NumberOfVoxelDoubleOperations];
44
49 inline FrameSpecificTags(MLint z=0, MLint t=0, MLint u=0):
50 zPosition(z), tPosition(t), uPosition(u), tagMap() {}
51
54
57
60
63 std::map<DCMTree::RawTagId, DCMTree::Const_TagPtr> tagMap;
64 };
65
67 typedef std::vector< FrameSpecificTags > FrameSpecificTagsVector;
68
87
89 typedef std::vector< PositionSpecificDouble > PositionSpecificDoubleVector;
90
99 // any tagId could be found then tagPtr is non nullptr, otherwise nullptr for that frame.
101 const std::vector<DCMTree::RawTagId> &tagIds);
102
110 // tagId could be found then tagPtr is non nullptr, otherwise nullptr for that frame.
112 DCMTree::RawTagId tagId);
113
126 PositionSpecificDoubleVector &frameSpecificDoubles);
127
155 const SubImage &srcSubImage,
156 SubImage &dstSubImage,
157 const PositionSpecificDoubleVector &positionDoubles,
158 const VoxelDoubleOperations dummyOperationMode = Copy,
159 const MLdouble dummyOperationValue = 0.0,
160 PositionSpecificDoubleVector *valueFreePositions = nullptr,
161 bool isOldMultiFrameDICOM = false);
162
166 MLint z, MLint t, MLint u);
167
171 const SubImageBox &volume);
172
178 double &rangeMin,
179 double &rangeMax,
180 bool &hasFractionalParts);
181
182};
183
184ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOM_TO_ML_TOOLS_EXPORT
DLL export macro definition.
double MLdouble
Definition mlTypeDefs.h:216
MLint64 MLint
Definition mlTypeDefs.h:489
boost::shared_ptr< const StructuredMF > Const_StructuredMFPtr
unsigned int RawTagId
A collection of DICOM tool functions.
std::vector< FrameSpecificTags > FrameSpecificTagsVector
Often used std::vector type of FrameSpecificTag elements.
MLDICOM_TO_ML_TOOLS_EXPORT bool isVolumeCovered(const PositionSpecificDoubleVector &positions, const SubImageBox &volume)
MLDICOM_TO_ML_TOOLS_EXPORT FrameSpecificTagsVector getFrameSpecificTags(const DCMTree::Const_StructuredMFPtr &smfTree, DCMTree::RawTagId tagId)
std::vector< PositionSpecificDouble > PositionSpecificDoubleVector
Often used std::vector type of PositionSpecificDouble elements.
VoxelDoubleOperations
Defines some modes how a (voxel) value can be manipulated with a double value.
@ Copy
Copy the input value to output without modification.
@ Add
Copy the sum of the input value and the double to output.
@ Multiply
Copy the product of the input value and the double to output.
MLDICOM_TO_ML_TOOLS_EXPORT const FrameSpecificTags * getFrameSpecificTagsSet(const FrameSpecificTagsVector &tagSet, MLint z, MLint t, MLint u)
MLDICOM_TO_ML_TOOLS_EXPORT bool getPositionSpecificDoubleProperties(const PositionSpecificDoubleVector &positions, double &rangeMin, double &rangeMax, bool &hasFractionalParts)
MLDICOM_TO_ML_TOOLS_EXPORT bool applyFrameSpecificOperation(const VoxelDoubleOperations &operationMode, const SubImage &srcSubImage, SubImage &dstSubImage, const PositionSpecificDoubleVector &positionDoubles, const VoxelDoubleOperations dummyOperationMode=Copy, const MLdouble dummyOperationValue=0.0, PositionSpecificDoubleVector *valueFreePositions=nullptr, bool isOldMultiFrameDICOM=false)
MLDICOM_TO_ML_TOOLS_EXPORT FrameSpecificTagsVector getFrameSpecificTagSet(const DCMTree::Const_StructuredMFPtr &smfTree, const std::vector< DCMTree::RawTagId > &tagIds)
MLDICOM_TO_ML_TOOLS_EXPORT size_t convertToFrameSpecificDoubles(const FrameSpecificTagsVector &frameSpecificTags, PositionSpecificDoubleVector &frameSpecificDoubles)
TSubImageBox< MLint > SubImageBox
Defines the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type...
FrameSpecificTags(MLint z=0, MLint t=0, MLint u=0)
Default and convenience constructor.
MLint tPosition
Temporal position of the frame.
MLint uPosition
U-Dimension position of the frame.
std::map< DCMTree::RawTagId, DCMTree::Const_TagPtr > tagMap
MLint zPosition
Spatial position of the frame.
MLint tPosition
Temporal position of the frame.
PositionSpecificDouble(MLint z=0, MLint t=0, MLint u=0, MLdouble v=0.)
Default and convenience constructor.
MLint uPosition
U-Dimension position of the frame.
MLdouble doubleVal
Pointer to a tag from that frame.
MLint zPosition
Spatial position of the frame.