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

Get information about all DICOM files within a directory. More...

#include <vtkDICOMDirectory.h>

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

Public Types

enum  {
  PATIENT , STUDY , SERIES , IMAGE ,
  FRAME
}
 Levels within the DICOM information model.
 
typedef vtkAlgorithm Superclass
 
- Public Types inherited from vtkAlgorithm
enum  DesiredOutputPrecision { SINGLE_PRECISION , DOUBLE_PRECISION , DEFAULT_PRECISION }
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 
vtkDICOMDirectoryNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_DICOM_OVERRIDE
 
void SetDirectoryName (const char *name)
 Set the input directory. More...
 
const char * GetDirectoryName ()
 
void SetInputFileNames (vtkStringArray *sa)
 Set a list of filenames (or files and directories) to read. More...
 
vtkStringArray * GetInputFileNames ()
 
void AddInputFileNames (vtkStringArray *sa)
 Add more filenames to be read. More...
 
void SetFilePattern (const char *pattern)
 Set a pattern to match for the filenames. More...
 
const char * GetFilePattern ()
 
virtual void SetScanDepth (int)
 Set the scan depth to use when no DICOMDIR is found. More...
 
int GetScanDepth ()
 
void SetFindQuery (const vtkDICOMItem &query)
 Specify a find query.
 
void SetFindLevel (int level)
 Specify the find level. More...
 
void SetFindLevelToImage ()
 
void SetFindLevelToSeries ()
 
int GetFindLevel ()
 
void Update () VTK_DICOM_OVERRIDE
 Update the information about the files. More...
 
void Update (int) VTK_DICOM_OVERRIDE
 
vtkTypeBool Update (vtkInformation *) VTK_DICOM_OVERRIDE
 
vtkTypeBool Update (int i, vtkInformationVector *) VTK_DICOM_OVERRIDE
 
int GetNumberOfSeries ()
 Get the total number of series that were found.
 
const vtkDICOMItemGetSeriesRecord (int series)
 Get the directory attributes for a series.
 
int GetNumberOfStudies ()
 Get the number of studies that were found.
 
const vtkDICOMItemGetStudyRecord (int study)
 Get the directory attributes for a study.
 
const vtkDICOMItemGetPatientRecordForStudy (int study)
 Get the patient-related attributes for a specific study. More...
 
int GetNumberOfPatients ()
 Get the number of patients that were found.
 
const vtkDICOMItemGetPatientRecord (int patient)
 Get the directory attributes for a patient.
 
vtkIntArray * GetStudiesForPatient (int patient)
 Get the studies for this patient.
 
int GetFirstSeriesForStudy (int study)
 Get the first series in a particular study.
 
int GetLastSeriesForStudy (int study)
 Get the last series in a particular study.
 
vtkStringArray * GetFileNamesForSeries (int i)
 Get the file names for a specific series.
 
vtkDICOMMetaDataGetMetaDataForSeries (int i)
 Get the meta data for a specific series. More...
 
void SetQueryFilesToAlways ()
 Set when to query the files, rather than just the DICOMDIR index. More...
 
void SetQueryFilesToNever ()
 
void SetQueryFilesToDefault ()
 
virtual void SetQueryFiles (int)
 
int GetQueryFiles ()
 
const char * GetFileSetID ()
 Get the file set ID. This will be NULL unless a DICOMDIR was found.
 
const char * GetInternalFileName ()
 Get the filename associated with the error code.
 
virtual void SetIgnoreDicomdir (int)
 If On, the DICOMDIR file will be ignored. More...
 
virtual void IgnoreDicomdirOn ()
 
virtual void IgnoreDicomdirOff ()
 
int GetIgnoreDicomdir ()
 
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 ()
 
virtual void SetFollowSymlinks (int)
 If On (the default), symbolic links will be followed.
 
virtual void FollowSymlinksOn ()
 
virtual void FollowSymlinksOff ()
 
int GetFollowSymlinks ()
 
virtual void SetShowHidden (int)
 If On (the default), hidden files will be listed. More...
 
virtual void ShowHiddenOn ()
 
virtual void ShowHiddenOff ()
 
int GetShowHidden ()
 
void SetDefaultCharacterSet (vtkDICOMCharacterSet cs)
 Set the character set to use if SpecificCharacterSet is missing. More...
 
vtkDICOMCharacterSet GetDefaultCharacterSet ()
 
virtual void SetOverrideCharacterSet (bool)
 Override the value stored in SpecificCharacterSet. More...
 
virtual void OverrideCharacterSetOn ()
 
virtual void OverrideCharacterSetOff ()
 
bool GetOverrideCharacterSet ()
 
- Public Member Functions inherited from vtkAlgorithm
vtkAlgorithmNewInstance () const
 
int HasExecutive ()
 
vtkExecutive * GetExecutive ()
 
virtual void SetExecutive (vtkExecutive *executive)
 
virtual int ProcessRequest (vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
 
int ProcessRequest (vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
 
virtual int ComputePipelineMTime (vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime)
 
virtual int ModifyRequest (vtkInformation *request, int when)
 
vtkInformation * GetInputPortInformation (int port)
 
vtkInformation * GetOutputPortInformation (int port)
 
virtual vtkInformation * GetInformation ()
 
virtual void SetInformation (vtkInformation *)
 
int GetNumberOfInputPorts ()
 
int GetNumberOfOutputPorts ()
 
void Register (vtkObjectBase *o) VTK_OVERRIDE
 
void UnRegister (vtkObjectBase *o) VTK_OVERRIDE
 
virtual void SetAbortExecute (int)
 
virtual int GetAbortExecute ()
 
virtual void AbortExecuteOn ()
 
virtual void AbortExecuteOff ()
 
virtual void SetProgress (double)
 
virtual double GetProgress ()
 
void UpdateProgress (double amount)
 
void SetProgressText (const char *ptext)
 
virtual char * GetProgressText ()
 
virtual unsigned long GetErrorCode ()
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
 
virtual void SetInputArrayToProcess (int idx, vtkInformation *info)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
 
vtkInformation * GetInputArrayInformation (int idx)
 
void RemoveAllInputs ()
 
vtkDataObject * GetOutputDataObject (int port)
 
vtkDataObject * GetInputDataObject (int port, int connection)
 
virtual void SetInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void SetInputConnection (vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (vtkAlgorithmOutput *input)
 
virtual void RemoveInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void RemoveInputConnection (int port, int idx)
 
virtual void RemoveAllInputConnections (int port)
 
virtual void SetInputDataObject (int port, vtkDataObject *data)
 
virtual void SetInputDataObject (vtkDataObject *data)
 
virtual void AddInputDataObject (int port, vtkDataObject *data)
 
virtual void AddInputDataObject (vtkDataObject *data)
 
vtkAlgorithmOutput * GetOutputPort (int index)
 
vtkAlgorithmOutput * GetOutputPort ()
 
int GetNumberOfInputConnections (int port)
 
int GetTotalNumberOfInputConnections ()
 
vtkAlgorithmOutput * GetInputConnection (int port, int index)
 
vtkAlgorithmGetInputAlgorithm (int port, int index, int &algPort)
 
vtkAlgorithmGetInputAlgorithm (int port, int index)
 
vtkAlgorithmGetInputAlgorithm ()
 
vtkExecutive * GetInputExecutive (int port, int index)
 
vtkExecutive * GetInputExecutive ()
 
vtkInformation * GetInputInformation (int port, int index)
 
vtkInformation * GetInputInformation ()
 
vtkInformation * GetOutputInformation (int port)
 
virtual int UpdatePiece (int piece, int numPieces, int ghostLevels, const int extents[6]=0)
 
virtual int UpdateExtent (const int extents[6])
 
virtual int UpdateTimeStep (double time, int piece=-1, int numPieces=1, int ghostLevels=0, const int extents[6]=0)
 
virtual void UpdateInformation ()
 
virtual void UpdateDataObject ()
 
virtual void PropagateUpdateExtent ()
 
virtual void UpdateWholeExtent ()
 
void ConvertTotalInputToPortConnection (int ind, int &port, int &conn)
 
virtual void SetReleaseDataFlag (int)
 
virtual int GetReleaseDataFlag ()
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, vtkDataObject *output)
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType)
 
int SetUpdateExtentToWholeExtent (int port)
 
int SetUpdateExtentToWholeExtent ()
 
void SetUpdateExtent (int port, int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int port, int extent[6])
 
void SetUpdateExtent (int extent[6])
 
int * GetUpdateExtent ()
 
int * GetUpdateExtent (int port)
 
void GetUpdateExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int extent[6])
 
void GetUpdateExtent (int port, int extent[6])
 
int GetUpdatePiece ()
 
int GetUpdatePiece (int port)
 
int GetUpdateNumberOfPieces ()
 
int GetUpdateNumberOfPieces (int port)
 
int GetUpdateGhostLevel ()
 
int GetUpdateGhostLevel (int port)
 
void SetProgressObserver (vtkProgressObserver *)
 
virtual vtkProgressObserver * GetProgressObserver ()
 
- 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)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkDICOMDirectorySafeDownCast (vtkObjectBase *o)
 
static vtkDICOMDirectoryNew ()
 
- Static Public Member Functions inherited from vtkAlgorithm
static vtkAlgorithmNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkAlgorithmSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKey * INPUT_IS_OPTIONAL ()
 
static vtkInformationIntegerKey * INPUT_IS_REPEATABLE ()
 
static vtkInformationInformationVectorKey * INPUT_REQUIRED_FIELDS ()
 
static vtkInformationStringVectorKey * INPUT_REQUIRED_DATA_TYPE ()
 
static vtkInformationInformationVectorKey * INPUT_ARRAYS_TO_PROCESS ()
 
static vtkInformationIntegerKey * INPUT_PORT ()
 
static vtkInformationIntegerKey * INPUT_CONNECTION ()
 
static vtkInformationIntegerKey * CAN_PRODUCE_SUB_EXTENT ()
 
static vtkInformationIntegerKey * CAN_HANDLE_PIECE_REQUEST ()
 
static void SetDefaultExecutivePrototype (vtkExecutive *proto)
 
- 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 FillImageRecord (vtkDICOMItem *item, vtkDICOMMetaData *meta, const vtkDICOMTag *skip, size_t nskip)
 Fill image info from image metadata.
 
virtual void FillSeriesRecord (vtkDICOMItem *item, vtkDICOMMetaData *meta)
 Fill series info from image metadata.
 
virtual void FillStudyRecord (vtkDICOMItem *item, vtkDICOMMetaData *meta)
 Fill study info from image metadata.
 
virtual void FillPatientRecord (vtkDICOMItem *item, vtkDICOMMetaData *meta)
 Fill patient info from image metadata.
 
virtual void SortFiles (vtkStringArray *input)
 Sort the input string array.
 
void AddSeriesFileNames (int patient, int study, vtkStringArray *files, const vtkDICOMItem &patientRecord, const vtkDICOMItem &studyRecord, const vtkDICOMItem &seriesRecord, const vtkDICOMItem *imageRecords[])
 Add a sorted series to output. More...
 
void AddSeriesWithQuery (int patient, int study, vtkStringArray *files, const vtkDICOMItem &patientRecord, const vtkDICOMItem &studyRecord, const vtkDICOMItem &seriesRecord, const vtkDICOMItem *imageRecords[])
 Add files only if they match the query.
 
bool MatchesQuery (const vtkDICOMItem &record, vtkDICOMItem &result)
 Returns false if the record doesn't match the query. More...
 
int MatchesImageQuery (const vtkDICOMItem &record, const vtkDICOMItem &result)
 Perform query on image record, given results from previous levels. More...
 
void RelayError (vtkObject *o, unsigned long e, void *data)
 Convert parser errors into sorter errors.
 
void SetInternalFileName (const char *fname)
 Set the name of the file currently being operated on.
 
void SetErrorCode (unsigned long e) VTK_DICOM_OVERRIDE
 Set the error code.
 
void ProcessDirectoryFile (const char *dirname, vtkDICOMMetaData *meta)
 Add all of the series listed in a DICOMDIR file. More...
 
void ProcessDirectory (const char *dirname, int depth, vtkStringArray *files)
 Process a directory, and subdirs to the specified depth.
 
void ProcessOsirixDatabase (const char *fname)
 Process an OsiriX sqlite database file.
 
void CopyRecord (vtkDICOMMetaData *meta, const vtkDICOMItem *item, int instance)
 Copy attributes into a meta data object.
 
- Protected Member Functions inherited from vtkAlgorithm
virtual int FillInputPortInformation (int port, vtkInformation *info)
 
virtual int FillOutputPortInformation (int port, vtkInformation *info)
 
virtual void SetNumberOfInputPorts (int n)
 
virtual void SetNumberOfOutputPorts (int n)
 
int InputPortIndexInRange (int index, const char *action)
 
int OutputPortIndexInRange (int index, const char *action)
 
int GetInputArrayAssociation (int idx, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, vtkDataObject *input)
 
vtkDataArray * GetInputArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkDataArray * GetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkDataArray * GetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkDataArray * GetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkDataArray * GetInputArrayToProcess (int idx, vtkDataObject *input)
 
vtkDataArray * GetInputArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, vtkDataObject *input)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkInformation * GetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector)
 
virtual vtkExecutive * CreateDefaultExecutive ()
 
void ReportReferences (vtkGarbageCollector *) VTK_OVERRIDE
 
virtual void SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input)
 
virtual void SetNumberOfInputConnections (int port, int n)
 
void SetInputDataInternal (int port, vtkDataObject *input)
 
void AddInputDataInternal (int port, vtkDataObject *input)
 
- 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 &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

const char * DirectoryName
 
vtkStringArray * InputFileNames
 
const char * FilePattern
 
int QueryFiles
 
int IgnoreDicomdir
 
int RequirePixelData
 
int FollowSymlinks
 
int ShowHidden
 
int ScanDepth
 
vtkDICOMCharacterSet DefaultCharacterSet
 
bool OverrideCharacterSet
 
vtkTimeStamp UpdateTime
 
char * InternalFileName
 
- Protected Attributes inherited from vtkAlgorithm
vtkInformation * Information
 
unsigned long ErrorCode
 
double Progress
 
char * ProgressText
 
vtkProgressObserver * ProgressObserver
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Public Attributes inherited from vtkAlgorithm
int AbortExecute
 
- Static Protected Member Functions inherited from vtkAlgorithm
static vtkInformationIntegerKey * PORT_REQUIREMENTS_FILLED ()
 
- Static Protected Attributes inherited from vtkAlgorithm
static vtkExecutive * DefaultExecutivePrototype
 

Detailed Description

Get information about all DICOM files within a directory.

Given a directory, search for a DICOMDIR file, and if no DICOMDIR is found, directly search for DICOM files within the directory. Provide a list of DICOM file names as output, sorted by patient, study, series, and image.

Member Function Documentation

◆ AddInputFileNames()

void vtkDICOMDirectory::AddInputFileNames ( vtkStringArray *  sa)

Add more filenames to be read.

This allows the directory to be updated. The new files can belong to an existing series or a new series. If any of the new files are already present in the directory, then nothing will be done for those files.

◆ AddSeriesFileNames()

void vtkDICOMDirectory::AddSeriesFileNames ( int  patient,
int  study,
vtkStringArray *  files,
const vtkDICOMItem patientRecord,
const vtkDICOMItem studyRecord,
const vtkDICOMItem seriesRecord,
const vtkDICOMItem imageRecords[] 
)
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.

◆ GetMetaDataForSeries()

vtkDICOMMetaData* vtkDICOMDirectory::GetMetaDataForSeries ( int  i)

Get the meta data for a specific series.

This provides a subset of the meta data of each file in the series. To be specific, it contains all the information from the patient, study, and, at the very minimum, the SOPClassUID, SOPInstanceUID, and InstanceNumber for each file.

◆ GetPatientRecordForStudy()

const vtkDICOMItem& vtkDICOMDirectory::GetPatientRecordForStudy ( int  study)

Get the patient-related attributes for a specific study.

This returns a patient record, the same as GetPatientRecord(), except that it returns the patient information as recorded at the time of the study.

◆ IsA()

virtual vtkTypeBool vtkDICOMDirectory::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 vtkAlgorithm.

◆ MatchesImageQuery()

int vtkDICOMDirectory::MatchesImageQuery ( const vtkDICOMItem record,
const vtkDICOMItem result 
)
protected

Perform query on image record, given results from previous levels.

This method requires that MatchesQuery() was already called on the patient, study, and series records. It has three possible return values. If all remaining query attributes were matched by the image record, then 0 is returned. If any of the remaining query attributes mis-matches with the image record, then -1 is returned. If the query contains tags that weren't in the patient, study, series, or image record, then 1 is returned to indicate that the match is inconclusive.

◆ MatchesQuery()

bool vtkDICOMDirectory::MatchesQuery ( const vtkDICOMItem record,
vtkDICOMItem result 
)
protected

Returns false if the record doesn't match the query.

Matching values are placed into the result parameter.

◆ PrintSelf()

void vtkDICOMDirectory::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 vtkAlgorithm.

◆ ProcessDirectoryFile()

void vtkDICOMDirectory::ProcessDirectoryFile ( const char *  dirname,
vtkDICOMMetaData meta 
)
protected

Add all of the series listed in a DICOMDIR file.

The provided directory should be the directory that contains the DICOMDIR file, rather than the DICOMDIR file itself. The DICOMDIR file should be parsed before this method is called.

◆ SetDefaultCharacterSet()

void vtkDICOMDirectory::SetDefaultCharacterSet ( vtkDICOMCharacterSet  cs)

Set the character set to use if SpecificCharacterSet is missing.

Some DICOM files do not list a SpecificCharacterSet attribute, but nevertheless use a non-ASCII character encoding. This method can be used to specify the character set in absence of SpecificCharacterSet. If SpecificCharacterSet is present, the default will not override it unless OverrideCharacterSet is true.

◆ SetDirectoryName()

void vtkDICOMDirectory::SetDirectoryName ( const char *  name)

Set the input directory.

If the directory has a DICOMDIR file, then that file will be scanned to get information about the DICOM files in the directory. Otherwise, the directory will be scanned for DICOM files. The depth of the scan (how many subdirectories deep) can be controlled with the SetScanDepth() method.

◆ SetFilePattern()

void vtkDICOMDirectory::SetFilePattern ( const char *  pattern)

Set a pattern to match for the filenames.

For example "*.dcm" will match files ending with ".dcm". The two wildcards that are supported are "*" and "?".

◆ SetFindLevel()

void vtkDICOMDirectory::SetFindLevel ( int  level)

Specify the find level.

If this is Series, then the whole series will be found if a single file in the series matches the query. Only IMAGE and SERIES are allowed. Note that IMAGE is inclusive of any single file, whether or not the contained data is an image.

◆ SetIgnoreDicomdir()

virtual void vtkDICOMDirectory::SetIgnoreDicomdir ( int  )
virtual

If On, the DICOMDIR file will be ignored.

This method can be used to ignore the DICOMDIR file if it is present, instead of using the DICOMDIR file as an index.

◆ SetInputFileNames()

void vtkDICOMDirectory::SetInputFileNames ( vtkStringArray *  sa)

Set a list of filenames (or files and directories) to read.

This can be used as alternative to setting a single input directory.

◆ SetOverrideCharacterSet()

virtual void vtkDICOMDirectory::SetOverrideCharacterSet ( bool  )
virtual

Override the value stored in SpecificCharacterSet.

This method can be used if the SpecificCharacterSet attribute of a file is incorrect. It overrides the SpecificCharacterSet with the DefaultCharacterSet.

◆ SetQueryFilesToAlways()

void vtkDICOMDirectory::SetQueryFilesToAlways ( )
inline

Set when to query the files, rather than just the DICOMDIR index.

If a DICOMDIR file is present, the default behavior is to only query the other files in the directory if the Query contains elements that cannot be elucidated from the DICOMDIR file. For Always, the data returned by GetMetaDataForSeries() will always be data from the file, not the DICOMDIR (though the data returned by GetSeriesRecord() etc. will be from DICOMDIR). For Never, the files will never be scanned if a DICOMDIR is present, which means that any Query that is applied can only check attributes that are present in the DICOMDIR.

◆ SetRequirePixelData()

virtual void vtkDICOMDirectory::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.

◆ SetScanDepth()

virtual void vtkDICOMDirectory::SetScanDepth ( int  )
virtual

Set the scan depth to use when no DICOMDIR is found.

The default scan depth is 1, which scans only the given directory and no subdirectories. A scan depth of zero means that the directory will not be scanned unless it contains a DICOMDIR file.

◆ SetShowHidden()

virtual void vtkDICOMDirectory::SetShowHidden ( int  )
virtual

If On (the default), hidden files will be listed.

A file is hidden if it has a "hidden" attribute set. On Linux and OS X, any file that begins with "." will also be considered "hidden".

◆ Update() [1/4]

void vtkDICOMDirectory::Update ( )
inlinevirtual

Update the information about the files.

This method causes the directory to be read. It must be called before any of the Get methods.

Reimplemented from vtkAlgorithm.

◆ Update() [2/4]

vtkTypeBool vtkDICOMDirectory::Update ( int  port,
vtkInformationVector *  requests 
)
inlinevirtual

This method enables the passing of data requests to the algorithm to be used during execution (in addition to bringing a particular port up-to-date). The requests argument should contain an information object for each port that requests need to be passed. For each of those, the pipeline will copy all keys to the output information before execution. This is equivalent to:

* algorithm->UpdateInformation();
* for (int i=0; i<algorithm->GetNumberOfOutputPorts(); i++)
* {
* vtkInformation* portRequests = requests->GetInformationObject(i);
* if (portRequests)
* {
* algorithm->GetOutputInformation(i)->Append(portRequests);
* }
* }
* algorithm->Update();
* 

Available requests include UPDATE_PIECE_NUMBER(), UPDATE_NUMBER_OF_PIECES() UPDATE_EXTENT() etc etc.

Reimplemented from vtkAlgorithm.

◆ Update() [3/4]

void vtkDICOMDirectory::Update ( int  port)
virtual

Bring this algorithm's outputs up-to-date.

Reimplemented from vtkAlgorithm.

◆ Update() [4/4]

vtkTypeBool vtkDICOMDirectory::Update ( vtkInformation *  requests)
inlinevirtual

Convenience method to update an algorithm after passing requests to its first output port. See documentation for Update(int port, vtkInformationVector* requests) for details.

Reimplemented from vtkAlgorithm.


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