Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::DICOMGDCMTagScanner Class Reference

Encapsulates the tag scanning process for a set of DICOM files. More...

#include <mitkDICOMGDCMTagScanner.h>

Inheritance diagram for mitk::DICOMGDCMTagScanner:
Collaboration diagram for mitk::DICOMGDCMTagScanner:

Public Member Functions

 mitkClassMacro (DICOMGDCMTagScanner, DICOMTagScanner)
 
Pointer Clone () const
 
virtual void AddTag (const DICOMTag &tag) override
 Add this tag to the scanning process. More...
 
virtual void AddTags (const DICOMTagList &tags) override
 Add a list of tags to the scanning process. More...
 
virtual void AddTagPath (const DICOMTagPath &tag) override
 Add this tag path to the scanning process. More...
 
virtual void AddTagPaths (const DICOMTagPathList &tags) override
 Add a list of tag pathes to the scanning process. More...
 
virtual 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 list of files. More...
 
virtual void Scan ()
 Start the scanning process. Calling Scan() will invalidate previous scans, forgetting all about files and tags from files that have been scanned previously. More...
 
virtual DICOMDatasetAccessingImageFrameList GetFrameInfoList () const override
 Retrieve a result list for file-by-file tag access. More...
 
virtual DICOMTagCache::Pointer GetScanCache () const override
 Retrieve Pointer to the complete cache of the scan. More...
 
virtual DICOMDatasetFinding GetTagValue (DICOMImageFrameInfo *frame, const DICOMTag &tag) const
 Directly retrieve the tag value for a given frame and tag. More...
 
- Public Member Functions inherited from mitk::DICOMTagScanner
 mitkClassMacroItkParent (DICOMTagScanner, itk::Object)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 DICOMGDCMTagScanner ()
 
virtual ~DICOMGDCMTagScanner ()
 
- Protected Member Functions inherited from mitk::DICOMTagScanner
void PushLocale () const
 Remember current locale on stack, activate "C" locale. "C" locale is required for correct parsing of numbers by itk::ImageSeriesReader. More...
 
void PopLocale () const
 Activate last remembered locale from locale stack "C" locale is required for correct parsing of numbers by itk::ImageSeriesReader. More...
 
 DICOMTagScanner ()
 
virtual ~DICOMTagScanner ()
 

Protected Attributes

std::set< DICOMTagm_ScannedTags
 
StringList m_InputFilenames
 
DICOMGDCMTagCache::Pointer m_Cache
 
std::shared_ptr< gdcm::Scanner > m_GDCMScanner
 

Additional Inherited Members

- Static Protected Member Functions inherited from mitk::DICOMTagScanner
static std::string GetActiveLocale ()
 Return active C locale. More...
 

Detailed Description

Encapsulates the tag scanning process for a set of DICOM files.

Formerly integrated as a part of DICOMITKSeriesGDCMReader, the tag scanning part has been factored out into this DICOMGDCMTagScanner class in order to allow a single scan for multiple reader alternatives. This helps much in the selection process of e.g. DICOMFileReaderSelector.

The class works similar to gdcm::Scanner, just with the MITK set of classes:

  • add a number of DICOM tags that should be read
  • set a list of files that should be scanned for named tags
  • call Scan()
  • retrieve the scan results

When used in a process where multiple classes will access the scan results, care should be taken that all the tags and files of interest are communicated to DICOMGDCMTagScanner before requesting the results!

Remarks
This scanner does only support the scanning for simple value tag. If you need to scann for sequence items or non-top-level elements, this scanner will not be sufficient. See i.a. DICOMDCMTKTagScanner for these cases.

Definition at line 52 of file mitkDICOMGDCMTagScanner.h.

Constructor & Destructor Documentation

mitk::DICOMGDCMTagScanner::DICOMGDCMTagScanner ( )
protected

Definition at line 23 of file mitkDICOMGDCMTagScanner.cpp.

References m_GDCMScanner.

mitk::DICOMGDCMTagScanner::~DICOMGDCMTagScanner ( )
protectedvirtual

Definition at line 28 of file mitkDICOMGDCMTagScanner.cpp.

Member Function Documentation

void mitk::DICOMGDCMTagScanner::AddTag ( const DICOMTag tag)
overridevirtual

Add this tag to the scanning process.

Implements mitk::DICOMTagScanner.

Definition at line 45 of file mitkDICOMGDCMTagScanner.cpp.

References mitk::DICOMTag::GetElement(), and mitk::DICOMTag::GetGroup().

void mitk::DICOMGDCMTagScanner::AddTagPath ( const DICOMTagPath tag)
overridevirtual
void mitk::DICOMGDCMTagScanner::AddTagPaths ( const DICOMTagPathList tags)
overridevirtual

Add a list of tag pathes to the scanning process.

Implements mitk::DICOMTagScanner.

Definition at line 74 of file mitkDICOMGDCMTagScanner.cpp.

References MITK_ERROR.

void mitk::DICOMGDCMTagScanner::AddTags ( const DICOMTagList tags)
overridevirtual

Add a list of tags to the scanning process.

Implements mitk::DICOMTagScanner.

Definition at line 52 of file mitkDICOMGDCMTagScanner.cpp.

Pointer mitk::DICOMGDCMTagScanner::Clone ( ) const
mitk::DICOMDatasetAccessingImageFrameList mitk::DICOMGDCMTagScanner::GetFrameInfoList ( ) const
overridevirtual

Retrieve a result list for file-by-file tag access.

Implements mitk::DICOMTagScanner.

Definition at line 114 of file mitkDICOMGDCMTagScanner.cpp.

mitk::DICOMTagCache::Pointer mitk::DICOMGDCMTagScanner::GetScanCache ( ) const
overridevirtual

Retrieve Pointer to the complete cache of the scan.

Implements mitk::DICOMTagScanner.

Definition at line 109 of file mitkDICOMGDCMTagScanner.cpp.

mitk::DICOMDatasetFinding mitk::DICOMGDCMTagScanner::GetTagValue ( DICOMImageFrameInfo frame,
const DICOMTag tag 
) const
virtual

Directly retrieve the tag value for a given frame and tag.

Precondition
Scan() must have been called before calling this function.

Definition at line 32 of file mitkDICOMGDCMTagScanner.cpp.

References mitkThrow.

mitk::DICOMGDCMTagScanner::mitkClassMacro ( DICOMGDCMTagScanner  ,
DICOMTagScanner   
)
static Pointer mitk::DICOMGDCMTagScanner::New ( )
static
void mitk::DICOMGDCMTagScanner::Scan ( )
virtual

Start the scanning process. Calling Scan() will invalidate previous scans, forgetting all about files and tags from files that have been scanned previously.

Implements mitk::DICOMTagScanner.

Definition at line 97 of file mitkDICOMGDCMTagScanner.cpp.

References mitk::DICOMGDCMTagCache::New().

void mitk::DICOMGDCMTagScanner::SetInputFiles ( const StringList filenames)
overridevirtual

Define the list of files to scan. This does not ADD to an internal list, but it replaces the whole list of files.

Implements mitk::DICOMTagScanner.

Definition at line 91 of file mitkDICOMGDCMTagScanner.cpp.

Member Data Documentation

DICOMGDCMTagCache::Pointer mitk::DICOMGDCMTagScanner::m_Cache
protected

Definition at line 115 of file mitkDICOMGDCMTagScanner.h.

std::shared_ptr<gdcm::Scanner> mitk::DICOMGDCMTagScanner::m_GDCMScanner
protected

Definition at line 116 of file mitkDICOMGDCMTagScanner.h.

Referenced by DICOMGDCMTagScanner().

StringList mitk::DICOMGDCMTagScanner::m_InputFilenames
protected

Definition at line 114 of file mitkDICOMGDCMTagScanner.h.

std::set<DICOMTag> mitk::DICOMGDCMTagScanner::m_ScannedTags
protected

Definition at line 113 of file mitkDICOMGDCMTagScanner.h.


The documentation for this class was generated from the following files: