#include <itkGDCMSeriesFileNames.h>
Generate a sequence of filenames from a DICOM series.
This class generates a sequence of files whose filenames point to a DICOM file. The ordering is based on the following strategy: Read all images in the directory (assuming there is only one study/series)
If multiple volumes are being grouped as a single series for your DICOM objects, you may want to try calling SetUseSeriesDetails(true) prior to calling SetDirectory().
Definition at line 60 of file itkGDCMSeriesFileNames.h.
Inheritance diagram for itk::GDCMSeriesFileNames:
Collaboration diagram for itk::GDCMSeriesFileNames:Classes | |
| struct | SeriesEntry |
Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
| static bool | GetGlobalWarningDisplay () |
| static void | GlobalWarningDisplayOff () |
| static void | GlobalWarningDisplayOn () |
| static Pointer | New () |
| static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
| static void | BreakOnError () |
| static Pointer | New () |
Private Member Functions | |
| void | BuildSeriesMap () |
| void | OrderSeries (SeriesEntry &entry) |
Private Attributes | |
| TimeStamp | m_CacheBuildTime {} |
| bool | m_FailOnAmbiguousOrdering = true |
| std::string | m_InputDirectory = "" |
| FileNamesContainerType | m_InputFileNames {} |
| std::map< std::string, std::string > | m_InstanceNumbers {} |
| bool | m_LoadPrivateTags = false |
| bool | m_LoadSequences = false |
| std::string | m_OutputDirectory = "" |
| FileNamesContainerType | m_OutputFileNames {} |
| bool | m_Recursive = false |
| std::map< std::string, SeriesEntry > | m_SeriesFiles {} |
| SeriesUIDContainerType | m_SeriesUIDs {} |
| std::vector< std::pair< unsigned short, unsigned short > > | m_UserRefineTags {} |
| bool | m_UseSeriesDetails = false |
Additional Inherited Members | |
Static Protected Member Functions inherited from itk::ProcessObject | |
| template<typename TSourceObject> | |
| static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
| static constexpr float | progressFixedToFloat (uint32_t fixed) |
| static uint32_t | progressFloatToFixed (float f) |
Protected Attributes inherited from itk::ProcessObject | |
| TimeStamp | m_OutputInformationMTime {} |
| bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
| std::atomic< int > | m_ReferenceCount {} |
Type of the container that holds the file names in the series.
Definition at line 71 of file itkGDCMSeriesFileNames.h.
Definition at line 68 of file itkGDCMSeriesFileNames.h.
Standard class type aliases.
Definition at line 66 of file itkGDCMSeriesFileNames.h.
Type of the container that holds the UID's for the series.
Definition at line 74 of file itkGDCMSeriesFileNames.h.
Definition at line 67 of file itkGDCMSeriesFileNames.h.
|
protected |
Referenced by GetNameOfClass().
|
overrideprotected |
| void itk::GDCMSeriesFileNames::AddSeriesRestriction | ( | const std::string & | tag | ) |
Add more restriction on the selection of a Series. This follows the same approach as SetUseSeriesDetails, but allows a user to add even more DICOM tags to take into account for subrefining a set of DICOM files into multiple series. The tag format is "group|element" of a DICOM tag. Call order relative to SetUseSeriesDetails does not matter.
|
private |
Parse the input directory into the per-series file-name map.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LightObject.
|
virtual |
Throw an exception when a series cannot be ordered geometrically by gdcm::IPPSorter (duplicate ImagePositionPatient, inconsistent orientation). When false, fall back to the legacy SerieHelper heuristics: Instance Number when unique, else lexicographic filename order. The fallback is not DICOM-standards conforming and its output should not be trusted; it exists only for backward compatibility.
|
virtual |
Throw an exception when a series cannot be ordered geometrically by gdcm::IPPSorter (duplicate ImagePositionPatient, inconsistent orientation). When false, fall back to the legacy SerieHelper heuristics: Instance Number when unique, else lexicographic filename order. The fallback is not DICOM-standards conforming and its output should not be trusted; it exists only for backward compatibility.
|
virtual |
Throw an exception when a series cannot be ordered geometrically by gdcm::IPPSorter (duplicate ImagePositionPatient, inconsistent orientation). When false, fall back to the legacy SerieHelper heuristics: Instance Number when unique, else lexicographic filename order. The fallback is not DICOM-standards conforming and its output should not be trusted; it exists only for backward compatibility.
| const FileNamesContainerType & itk::GDCMSeriesFileNames::GetFileNames | ( | const std::string | serie | ) |
Returns a vector containing the series' file names. The file names are ordered by the strategy define in header. All DICOM files have the same exact UID equal to the one user's specified. An extended UID may be returned/used if SetUseSeriesDetails(true) has been called.
| const FileNamesContainerType & itk::GDCMSeriesFileNames::GetInputFileNames | ( | ) |
Returns a vector containing the series' file names. The file names are ordered by the strategy define in header. No sorting is done based on UID
|
virtual |
No effect with the gdcm::Scanner backend (retained for source compatibility). Series enumeration reads only the grouping and ordering tags, so private tags are never parsed during the scan.
|
virtual |
No effect with the gdcm::Scanner backend (retained for source compatibility). Series enumeration reads only the grouping and ordering tags, so sequences are never parsed during the scan.
|
virtual |
Reimplemented from itk::ProcessObject.
References GDCMSeriesFileNames().
| const FileNamesContainerType & itk::GDCMSeriesFileNames::GetOutputFileNames | ( | ) |
Returns a vector containing the series' file names. The file names are ordered in the same exact order as the input one. This could be dangerous if the writing has changed 3rd position or some other DICOM tag in the header
|
virtual |
Recursively parse the input directory. Must be set before the call to SetInputDirectory().
| const SeriesUIDContainerType & itk::GDCMSeriesFileNames::GetSeriesUIDs | ( | ) |
Returns a vector containing all the UIDs found when parsing the directory specified via SetDirectory. If no directory is specified return an empty vector. An extended UID may be returned/used if SetUseSeriesDetails(true) has been called.
|
inline |
Returns true if using additional series information such as ProtocolName and SeriesName to identify when a single SeriesUID contains multiple 3D volumes - as can occur with perfusion and DTI imaging
Definition at line 160 of file itkGDCMSeriesFileNames.h.
References m_UseSeriesDetails.
|
virtual |
No effect with the gdcm::Scanner backend (retained for source compatibility). Series enumeration reads only the grouping and ordering tags, so private tags are never parsed during the scan.
|
virtual |
No effect with the gdcm::Scanner backend (retained for source compatibility). Series enumeration reads only the grouping and ordering tags, so private tags are never parsed during the scan.
|
virtual |
No effect with the gdcm::Scanner backend (retained for source compatibility). Series enumeration reads only the grouping and ordering tags, so sequences are never parsed during the scan.
|
virtual |
No effect with the gdcm::Scanner backend (retained for source compatibility). Series enumeration reads only the grouping and ordering tags, so sequences are never parsed during the scan.
|
static |
Method for creation through the object factory.
|
private |
Order one series geometrically, or apply the legacy fallback / throw per FailOnAmbiguousOrdering.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::LightObject.
|
virtual |
Recursively parse the input directory. Must be set before the call to SetInputDirectory().
|
virtual |
Recursively parse the input directory. Must be set before the call to SetInputDirectory().
|
inline |
Set the directory that contains the DICOM series.
Definition at line 94 of file itkGDCMSeriesFileNames.h.
References SetInputDirectory().
|
virtual |
Throw an exception when a series cannot be ordered geometrically by gdcm::IPPSorter (duplicate ImagePositionPatient, inconsistent orientation). When false, fall back to the legacy SerieHelper heuristics: Instance Number when unique, else lexicographic filename order. The fallback is not DICOM-standards conforming and its output should not be trusted; it exists only for backward compatibility.
| void itk::GDCMSeriesFileNames::SetInputDirectory | ( | const char * | name | ) |
Set the directory that contains the DICOM series.
Referenced by SetDirectory().
| void itk::GDCMSeriesFileNames::SetInputDirectory | ( | const std::string & | name | ) |
Set the directory that contains the DICOM series.
|
virtual |
No effect with the gdcm::Scanner backend (retained for source compatibility). Series enumeration reads only the grouping and ordering tags, so private tags are never parsed during the scan.
|
virtual |
No effect with the gdcm::Scanner backend (retained for source compatibility). Series enumeration reads only the grouping and ordering tags, so sequences are never parsed during the scan.
|
inline |
Set the directory where the output DICOM series should be written.
Definition at line 107 of file itkGDCMSeriesFileNames.h.
References m_OutputDirectory, and itk::Object::Modified().
|
virtual |
Recursively parse the input directory. Must be set before the call to SetInputDirectory().
| void itk::GDCMSeriesFileNames::SetUseSeriesDetails | ( | bool | useSeriesDetails | ) |
Use additional series information such as ProtocolName and SeriesName to identify when a single SeriesUID contains multiple 3D volumes - as can occur with perfusion and DTI imaging. Off by default: series are identified by their SeriesInstanceUID (0020,000e) alone, per the DICOM information model.
|
private |
Modified time of the last directory parse; the cache is rebuilt only when the object has been Modified() since.
Definition at line 252 of file itkGDCMSeriesFileNames.h.
|
private |
Definition at line 258 of file itkGDCMSeriesFileNames.h.
|
private |
Contains the input directory where the DICOM series is found
Definition at line 214 of file itkGDCMSeriesFileNames.h.
|
private |
Internal structure to keep the list of input/output filenames
Definition at line 220 of file itkGDCMSeriesFileNames.h.
|
private |
Instance Number (0020,0013) per scanned file, for the legacy fallback.
Definition at line 243 of file itkGDCMSeriesFileNames.h.
|
private |
Definition at line 261 of file itkGDCMSeriesFileNames.h.
|
private |
Definition at line 260 of file itkGDCMSeriesFileNames.h.
|
private |
Contains the output directory where the DICOM series should be written
Definition at line 217 of file itkGDCMSeriesFileNames.h.
Referenced by SetOutputDirectory().
|
private |
Definition at line 221 of file itkGDCMSeriesFileNames.h.
|
private |
Definition at line 259 of file itkGDCMSeriesFileNames.h.
|
private |
File names per distinct series identifier.
Definition at line 240 of file itkGDCMSeriesFileNames.h.
|
private |
Internal structure to keep the list of series UIDs
Definition at line 255 of file itkGDCMSeriesFileNames.h.
|
private |
User (group,element) tags from AddSeriesRestriction, appended to the series identifier (after the default detail tags) when UseSeriesDetails is enabled.
Definition at line 248 of file itkGDCMSeriesFileNames.h.
|
private |
Definition at line 257 of file itkGDCMSeriesFileNames.h.
Referenced by GetUseSeriesDetails().