MeVisLab Toolbox Reference
mlDicomFrameSetMinMaxCalculation.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11#pragma once
12
13// Local includes
18
19// ML includes
20#include <mlModuleIncludes.h>
21
22// DICOM tree prototypes.
23#include <DCMTree_Lib.h>
24
25ML_START_NAMESPACE
26
27// Forwards
28class DicomMessageCollector;
29
30//----------------------------------------------------------------------------------
33//----------------------------------------------------------------------------------
34namespace DicomToMLTools {
35
36 //----------------------------------------------------------------------------------
38 //----------------------------------------------------------------------------------
40 {
41 public:
42 //----------------------------------------------------------------------------------
43 // Default construction (nothing found, nothing okay, no logging into resultArgs)
49 //----------------------------------------------------------------------------------
51 double defaultFillValueArg,
52 DicomMessageCollector &dcmMsgCollectorArg);
53
59 const DICOMCachedIOFileHandle &frameHandle);
60
62 void logMinMaxFailures(const DICOMCachedIOFileHandle &firstFileName);
63
66
67 private:
69 MLDICOMCachedIOProxies cacheProxies;
70
72 const CalculateMinMaxFromDicomModes calcMinMaxMode;
73
75 const double defaultFillValue;
76
78 DicomMessageCollector &dcmMsgCollector;
79
80
82 MLdouble minPixValRet;
83
85 MLdouble maxPixValRet;
86
88 bool atLeastOneOkay;
89
91 bool atLeastOneEntry;
92
94 bool allFramesOk;
95
98 bool expectsMinMax;
99
101 typedef struct {
103 double minVal;
105 double maxVal;
106 } _MinMaxValsContainer;
107
110 std::map< DICOMCachedIOFileHandle, _MinMaxValsContainer > mfMinMaxMap;
111
114
117 };
118
119};
120
121ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOM_TO_ML_TOOLS_EXPORT
DLL export macro definition.
Class to collect messages and errors related to a given frame handle.
Class to collect incrementally per frame all min/max related parameters of a DICOM frame set.
void updateMinMaxParamsForFrame(DCMTree::Const_TreePtr frameTree, const DICOMCachedIOFileHandle &frameHandle)
void logMinMaxFailures(const DICOMCachedIOFileHandle &firstFileName)
Check minMaxParams container for final min/max validity and log errors if necessary.
DicomFrameSetMinMaxCalculation(CalculateMinMaxFromDicomModes calcMinMaxModeArg, double defaultFillValueArg, DicomMessageCollector &dcmMsgCollectorArg)
void updateMinMaxInImageProperties(MedicalImageProperties &imgProps) const
Updates min/max values in resultImgProps if we could determine min/max values.
Tool functions for the min/max value handling from and in DICOM frames and frame sets.
double MLdouble
Definition mlTypeDefs.h:216
boost::shared_ptr< const Tree > Const_TreePtr
Definition DCMTree_Lib.h:67
CalculateMinMaxFromDicomModes
Available selectable DPL configurations.
DICOMCachedIOFileHandleBase< char > DICOMCachedIOFileHandle
"Forward" to DICOMCachedIOFileHandle.