vtk-dicom  0.8.14
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkDICOMFileSorter Class Reference

Sort DICOM files and group them by study and series. More...

#include <vtkDICOMFileSorter.h>

Inheritance diagram for vtkDICOMFileSorter:
Inheritance graph
[legend]
Collaboration diagram for vtkDICOMFileSorter:
Collaboration graph
[legend]

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 
vtkDICOMFileSorterNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_DICOM_OVERRIDE
 
void SetInputFileName (const char *name)
 Set one file from the desired series. More...
 
const char * GetInputFileName ()
 
void SetInputFileNames (vtkStringArray *input)
 Set a list of file names to group and sort. More...
 
vtkStringArray * GetInputFileNames ()
 
virtual void Update ()
 Update the information about the files. More...
 
int GetNumberOfSeries ()
 Get the total number of series that were found.
 
int GetNumberOfStudies ()
 Get the number of studies that were found.
 
int GetFirstSeriesForStudy (int study)
 Get the first series for a particular study.
 
int GetLastSeriesForStudy (int study)
 Get the last series (inclusive) for a particular study.
 
vtkStringArray * GetOutputFileNames ()
 Get the full list of sorted filenames.
 
vtkStringArray * GetFileNamesForSeries (int i)
 Get the file names for a specific series.
 
unsigned long GetErrorCode ()
 Get the error code.
 
const char * GetInternalFileName ()
 Get the filename associated with the error code.
 
virtual void SetRequirePixelData (int)
 If this is On, files with no pixel data will be skipped. More...
 
virtual void RequirePixelDataOn ()
 
virtual void RequirePixelDataOff ()
 
int GetRequirePixelData ()
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommand * GetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkDICOMFileSorterSafeDownCast (vtkObjectBase *o)
 
static vtkDICOMFileSorterNew ()
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
virtual void Execute ()
 Fill the output filename array.
 
virtual void SortFiles (vtkStringArray *input)
 Sort the input string array.
 
void AddSeriesFileNames (int study, vtkStringArray *files)
 Add a sorted series to output. More...
 
void RelayError (vtkObject *o, unsigned long e, void *data)
 Description:
 
void SetInternalFileName (const char *fname)
 Description:
 
void SetErrorCode (unsigned long e)
 Set the error code.
 
- Protected Member Functions inherited from vtkObject
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

const char * InputFileName
 
vtkStringArray * InputFileNames
 
vtkStringArray * OutputFileNames
 
int RequirePixelData
 
vtkTimeStamp UpdateTime
 
unsigned long ErrorCode
 
char * InternalFileName
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

Sort DICOM files and group them by study and series.

If a list of input files is provided via SetInputFileNames(), then the files will be grouped by study and series, and each series will be sorted by InstanceNumber. If a single input file is provided via SetInputFileName(), then other files in the same series will be found, and the series will be sorted by InstanceNumber.

Member Function Documentation

◆ AddSeriesFileNames()

void vtkDICOMFileSorter::AddSeriesFileNames ( int  study,
vtkStringArray *  files 
)
protected

Add a sorted series to output.

This method is called from SortFiles to provide the files that make up one series. The study that the files belong to must also be provided, as a number that starts at zero and monotonically increases.

◆ IsA()

virtual vtkTypeBool vtkDICOMFileSorter::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObjectBase.

Reimplemented in vtkDICOMSorter.

◆ PrintSelf()

void vtkDICOMFileSorter::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

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 vtkObjectBase.

Reimplemented in vtkDICOMSorter.

◆ SetInputFileName()

void vtkDICOMFileSorter::SetInputFileName ( const char *  name)

Set one file from the desired series.

When Update() is called, all files that belong to the same series as the specified file will be identified and can be retrieved by calling GetOutputFileNames().

◆ SetInputFileNames()

void vtkDICOMFileSorter::SetInputFileNames ( vtkStringArray *  input)

Set a list of file names to group and sort.

This method is mutually exclusive with SetInputFileName(). If you call this method, then InputFileName will be set to NULL and vice versa.

◆ SetRequirePixelData()

virtual void vtkDICOMFileSorter::SetRequirePixelData ( int  )
virtual

If this is On, files with no pixel data will be skipped.

This is On by default. Some files, such as dicom directory files, have metadata but have no images. Usually we want to skip these.

◆ Update()

virtual void vtkDICOMFileSorter::Update ( )
virtual

Update the information about the files.

This method must be called before any of the Get methods.


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