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
14 #include "MLDicomToMLToolsSystem.h"
16 #include "mlDICOMCachedIOProxies.h"
17 #include "mlDicomTreeMinMaxTools.h"
18 
19 // ML includes
20 #include <mlModuleIncludes.h>
21 
22 // DICOM tree prototypes.
23 #include <DCMTree_Lib.h>
24 
25 ML_START_NAMESPACE
26 
27 // Forwards
28 class DicomMessageCollector;
29 
30 //----------------------------------------------------------------------------------
33 //----------------------------------------------------------------------------------
34 namespace 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 
121 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOM_TO_ML_TOOLS_EXPORT
DLL export macro definition.
An instance of this class creates singleton proxies for DICOMCachedIO cache classes such that all cac...
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)
Updates minMaxParams for a frameTree; once for each frame of a frame set.
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.
This class encapsulates basic medical image properties:
Header of FileHandle class which should be used in DICOM importing modules to resolve the filename fo...
An instance of this class creates singleton proxies for DICOMCachedIO cache classes such that all cac...
Tool functions for the min/max value handling from and in DICOM frames and frame sets.
double MLdouble
Definition: mlTypeDefs.h:223
boost::shared_ptr< const Tree > Const_TreePtr
Definition: DCMTree_Lib.h:73
CalculateMinMaxFromDicomModes
Available selectable DPL configurations.