ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::ArchetypeSeriesFileNames Class Reference

#include <itkArchetypeSeriesFileNames.h>

+ Inheritance diagram for itk::ArchetypeSeriesFileNames:
+ Collaboration diagram for itk::ArchetypeSeriesFileNames:

Public Types

using IntVectorType = std::vector< int >
 
using Pointer = SmartPointer< Self >
 
using Self = ArchetypeSeriesFileNames
 
using StringVectorType = std::vector< std::string >
 
using Superclass = Object
 
using VectorSizeType = vcl_size_t
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetArchetype () const
 
const StringVectorTypeGetFileNames (VectorSizeType group=0)
 
virtual const char * GetNameOfClass () const
 
VectorSizeType GetNumberOfGroupings ()
 
void SetArchetype (const std::string &archetype)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

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 ()
 

Protected Member Functions

 ArchetypeSeriesFileNames ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void Scan ()
 
 ~ArchetypeSeriesFileNames () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

std::string m_Archetype
 
TimeStamp m_ArchetypeMTime
 
StringVectorType m_FileNames
 
std::vector< StringVectorTypem_Groupings
 
TimeStamp m_ScanTime
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

Generate an ordered sequence of filenames.

This class generates an ordered sequence of files based on an archetypical filename. From the archetypical filename, a set of regular expressions is created to group filenames based on numeric substrings. There can be multiple numeric substrings in the archetype. When this occurs, ArchetypeSeriesFileNames can not determine which numeric substring refers to the "image number" and which numeric substring refers to the "series" or "study". By default, the ArchetypeSeriesFileNames assumes the rightmost numeric substring refers to the image number, and this is the group of filenames returned by default. However, the other groupings of filenames can also be queried by passing in a group number to the GetFileNames() method. Groups are numbered by the numeric substrings from right to left in the archetype.

For example, if a directory contains the files

    foo_5_1.png
    foo_5_2.png
    foo_5_3.png
    foo_6_1.png
    foo_6_2.png
    foo_6_3.png

and specifying an archetypical file foo_5_1.png, the filename list will contain

    foo_5_1.png
    foo_5_2.png
    foo_5_3.png

Definition at line 68 of file itkArchetypeSeriesFileNames.h.

Member Typedef Documentation

◆ IntVectorType

Helper types for managing the groups of filenames and their sizes

Definition at line 100 of file itkArchetypeSeriesFileNames.h.

◆ Pointer

Definition at line 76 of file itkArchetypeSeriesFileNames.h.

◆ Self

Standard class type aliases.

Definition at line 74 of file itkArchetypeSeriesFileNames.h.

◆ StringVectorType

using itk::ArchetypeSeriesFileNames::StringVectorType = std::vector<std::string>

Definition at line 101 of file itkArchetypeSeriesFileNames.h.

◆ Superclass

Definition at line 75 of file itkArchetypeSeriesFileNames.h.

◆ VectorSizeType

Definition at line 93 of file itkArchetypeSeriesFileNames.h.

Constructor & Destructor Documentation

◆ ArchetypeSeriesFileNames()

itk::ArchetypeSeriesFileNames::ArchetypeSeriesFileNames ( )
protected

◆ ~ArchetypeSeriesFileNames()

itk::ArchetypeSeriesFileNames::~ArchetypeSeriesFileNames ( )
overrideprotecteddefault

Member Function Documentation

◆ CreateAnother()

virtual::itk::LightObject::Pointer itk::ArchetypeSeriesFileNames::CreateAnother ( ) const
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::Object.

◆ GetArchetype()

virtual const char* itk::ArchetypeSeriesFileNames::GetArchetype ( ) const
virtual

◆ GetFileNames()

const StringVectorType& itk::ArchetypeSeriesFileNames::GetFileNames ( VectorSizeType  group = 0)

Returns a vector containing the series' file names. The file names are ordered by Index. Defaults to returning the filenames to the rightmost grouping.

◆ GetNameOfClass()

virtual const char* itk::ArchetypeSeriesFileNames::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

◆ GetNumberOfGroupings()

VectorSizeType itk::ArchetypeSeriesFileNames::GetNumberOfGroupings ( )

Get the number of groupings that match the Archetype

◆ New()

static Pointer itk::ArchetypeSeriesFileNames::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

void itk::ArchetypeSeriesFileNames::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
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::Object.

◆ Scan()

void itk::ArchetypeSeriesFileNames::Scan ( )
protected

Method that actually does the archetype matching/grouping

◆ SetArchetype()

void itk::ArchetypeSeriesFileNames::SetArchetype ( const std::string &  archetype)

Member Data Documentation

◆ m_Archetype

std::string itk::ArchetypeSeriesFileNames::m_Archetype
private

A string for formatting the names of files in the series.

Definition at line 121 of file itkArchetypeSeriesFileNames.h.

◆ m_ArchetypeMTime

TimeStamp itk::ArchetypeSeriesFileNames::m_ArchetypeMTime
private

Definition at line 127 of file itkArchetypeSeriesFileNames.h.

◆ m_FileNames

StringVectorType itk::ArchetypeSeriesFileNames::m_FileNames
private

Definition at line 124 of file itkArchetypeSeriesFileNames.h.

◆ m_Groupings

std::vector<StringVectorType> itk::ArchetypeSeriesFileNames::m_Groupings
private

Definition at line 123 of file itkArchetypeSeriesFileNames.h.

◆ m_ScanTime

TimeStamp itk::ArchetypeSeriesFileNames::m_ScanTime
private

Definition at line 128 of file itkArchetypeSeriesFileNames.h.


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