Medical Imaging Interaction Toolkit  2024.06.99-692c34ce
Medical Imaging Interaction Toolkit
mitkDICOMTagScanner.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkDICOMTagScanner_h
14 #define mitkDICOMTagScanner_h
15 
16 #include <stack>
17 #include <mutex>
18 
19 #include "mitkDICOMEnums.h"
20 #include "mitkDICOMTagPath.h"
21 #include "mitkDICOMTagCache.h"
23 
24 namespace mitk
25 {
26 
42  class MITKDICOM_EXPORT DICOMTagScanner : public itk::Object
43  {
44  public:
46 
50  virtual void AddTag(const DICOMTag& tag) = 0;
54  virtual void AddTags(const DICOMTagList& tags) = 0;
58  virtual void AddTagPath(const DICOMTagPath& path) = 0;
62  virtual void AddTagPaths(const DICOMTagPathList& paths) = 0;
63 
69  virtual void SetInputFiles(const StringList& filenames) = 0;
70 
77  virtual void Scan() = 0;
78 
82  virtual DICOMDatasetAccessingImageFrameList GetFrameInfoList() const = 0;
83 
87  virtual DICOMTagCache::Pointer GetScanCache() const = 0;
88 
89  protected:
90 
92  static std::string GetActiveLocale();
97  void PushLocale() const;
102  void PopLocale() const;
103 
104  DICOMTagScanner();
105  ~DICOMTagScanner() override;
106 
107  private:
108 
109  static std::mutex s_LocaleMutex;
110 
111  mutable std::stack<std::string> m_ReplacedCLocales;
112  mutable std::stack<std::locale> m_ReplacedCinLocales;
113 
115  };
116 }
117 
118 #endif
mitk::DICOMTagPathList
std::vector< DICOMTagPath > DICOMTagPathList
Definition: mitkDICOMTagPath.h:155
mitkDICOMDatasetAccessingImageFrameInfo.h
mitk::DICOMTag
Representation of a DICOM tag.
Definition: mitkDICOMTag.h:32
mitkDICOMEnums.h
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::DICOMTagList
std::vector< DICOMTag > DICOMTagList
Definition: mitkDICOMTag.h:59
mitkDICOMTagCache.h
mitk::DICOMDatasetAccessingImageFrameList
std::vector< DICOMDatasetAccessingImageFrameInfo::Pointer > DICOMDatasetAccessingImageFrameList
Definition: mitkDICOMDatasetAccessingImageFrameInfo.h:46
mitkDICOMTagPath.h
MITKDICOM_EXPORT
#define MITKDICOM_EXPORT
Definition: MitkDICOMExports.h:15
mitk::DICOMTagScanner
Abstracts the tag scanning process for a set of DICOM files.
Definition: mitkDICOMTagScanner.h:42
mitk::StringList
std::vector< std::string > StringList
Definition: mitkDICOMEnums.h:22
mitk::DICOMTagPath
Class is used to identify (nested) attributes in a DICOM dataset. In contrast to the class DICOMTag,...
Definition: mitkDICOMTagPath.h:34