Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkDICOMGDCMTagScanner.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 mitkDICOMGDCMTagScanner_h
14 #define mitkDICOMGDCMTagScanner_h
15 
16 #include "mitkDICOMTagScanner.h"
17 #include "mitkDICOMEnums.h"
18 #include "mitkDICOMGDCMTagCache.h"
19 
20 namespace mitk
21 {
22 
49  {
50  public:
51 
53  itkFactorylessNewMacro( DICOMGDCMTagScanner );
54  itkCloneMacro(Self);
55 
59  void AddTag(const DICOMTag& tag) override;
63  void AddTags(const DICOMTagList& tags) override;
67  void AddTagPath(const DICOMTagPath& tag) override;
71  void AddTagPaths(const DICOMTagPathList& tags) override;
72 
78  void SetInputFiles(const StringList& filenames) override;
79 
86  void Scan() override;
87 
92 
96  DICOMTagCache::Pointer GetScanCache() const override;
97 
102  virtual DICOMDatasetFinding GetTagValue(DICOMImageFrameInfo* frame, const DICOMTag& tag) const;
103 
104  protected:
105 
108 
109  std::set<DICOMTag> m_ScannedTags;
111  DICOMGDCMTagCache::Pointer m_Cache;
112  std::shared_ptr<gdcm::Scanner> m_GDCMScanner;
113 
114  private:
116  };
117 }
118 
119 #endif
#define MITKDICOM_EXPORT
Encapsulates the tag scanning process for a set of DICOM files.
std::shared_ptr< gdcm::Scanner > m_GDCMScanner
void AddTagPath(const DICOMTagPath &tag) override
Add this tag path to the scanning process.
void SetInputFiles(const StringList &filenames) override
Define the list of files to scan. This does not ADD to an internal list, but it replaces the whole li...
DICOMTagCache::Pointer GetScanCache() const override
Retrieve Pointer to the complete cache of the scan.
std::set< DICOMTag > m_ScannedTags
void Scan() override
Start the scanning process. Calling Scan() will invalidate previous scans, forgetting all about files...
DICOMGDCMTagCache::Pointer m_Cache
DICOMDatasetAccessingImageFrameList GetFrameInfoList() const override
Retrieve a result list for file-by-file tag access.
void AddTags(const DICOMTagList &tags) override
Add a list of tags to the scanning process.
mitkClassMacro(DICOMGDCMTagScanner, DICOMTagScanner)
virtual DICOMDatasetFinding GetTagValue(DICOMImageFrameInfo *frame, const DICOMTag &tag) const
Directly retrieve the tag value for a given frame and tag.
void AddTag(const DICOMTag &tag) override
Add this tag to the scanning process.
void AddTagPaths(const DICOMTagPathList &tags) override
Add a list of tag paths to the scanning process.
Describes a frame within a DICOM file.
Class is used to identify (nested) attributes in a DICOM dataset. In contrast to the class DICOMTag,...
Abstracts the tag scanning process for a set of DICOM files.
Representation of a DICOM tag.
Definition: mitkDICOMTag.h:33
Find image slices visible on a given plane.
std::vector< std::string > StringList
std::vector< DICOMDatasetAccessingImageFrameInfo::Pointer > DICOMDatasetAccessingImageFrameList
std::vector< DICOMTag > DICOMTagList
Definition: mitkDICOMTag.h:59
std::vector< DICOMTagPath > DICOMTagPathList