GDCM 3.2.1

Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
gdcm::Directory Class Reference

Class for manipulation directories. More...

`#include <gdcmDirectory.h>`

## Public Types
typedef std::vector< FilenameType > | FilenamesType
typedef std::string | FilenameType

## Public Member Functions
| Directory ()=default
| ~Directory ()=default
FilenamesType const & | GetDirectories () const
| Return the Directories traversed.
FilenamesType const & | GetFilenames () const
| Set/Get the file names within the directory.
FilenameType const & | GetToplevel () const
| Get the name of the toplevel directory.
unsigned int | Load (FilenameType const &name, bool recursive=false)
void | Print (std::ostream &os=std::cout) const
| Print.

## Protected Member Functions
unsigned int | Explore (FilenameType const &name, bool recursive)
| Return number of file found when 'recursive'ly exploring directory name

## Friends
std::ostream & | operator<< (std::ostream &_os, const Directory &d)

## Detailed Description

Class for manipulation directories.

Note
  This implementation provide a cross platform implementation for manipulating directories: basically traversing directories and harvesting files
  will not take into account unix type hidden file recursive option will not look into UNIX type hidden directory (those starting with a '.')
  Since python or C# provide there own equivalent implementation, in which case gdcm::Directory does not make much sense.

Examples
  DecompressImageMultiframe.cs, DiscriminateVolume.cxx, DumpToSQLITE3.cxx, DumpVisusChange.cxx, ExplicitLittleEndian.cs, GenerateDICOMDIR.cs, GenerateRTSTRUCT.cxx, ReadUTF8QtDir.cxx, ScanDirectory.cs, SortImage.cxx, StandardizeFiles.cs, VolumeSorter.cxx, gdcmorthoplanes.cxx, and threadgdcm.cxx.

## Member Typedef Documentation

## ◆ FilenamesType

typedef std::vector<FilenameType> gdcm::Directory::FilenamesType

Examples
  CStoreQtProgress.cxx, DumpVisusChange.cxx, GenerateRTSTRUCT.cxx, ReadUTF8QtDir.cxx, SimpleScanner.cxx, VolumeSorter.cxx, gdcmorthoplanes.cxx, reslicesphere.cxx, and threadgdcm.cxx.

## ◆ FilenameType

typedef std::string gdcm::Directory::FilenameType

## Constructor & Destructor Documentation

## ◆ Directory()

gdcm::Directory::Directory | ( |  | ) |
| default

Referenced by operator<<.

## ◆ ~Directory()

gdcm::Directory::~Directory | ( |  | ) |
| default

## Member Function Documentation

## ◆ Explore()

unsigned int gdcm::Directory::Explore | ( | FilenameType const & | name,
|  | bool | recursive )
| protected

Return number of file found when 'recursive'ly exploring directory name

## ◆ GetDirectories()

FilenamesType const & gdcm::Directory::GetDirectories | ( |  | ) | const
| inline

Return the Directories traversed.

## ◆ GetFilenames()

FilenamesType const & gdcm::Directory::GetFilenames | ( |  | ) | const
| inline

Set/Get the file names within the directory.

Examples
  ClinicalTrialIdentificationWorkflow.cs, DecompressImageMultiframe.cs, DiscriminateVolume.cxx, DumpToSQLITE3.cxx, DumpVisusChange.cxx, ExplicitLittleEndian.cs, GenerateDICOMDIR.cs, GenerateRTSTRUCT.cxx, ReadUTF8QtDir.cxx, ScanDirectory.cs, SortImage.cxx, StandardizeFiles.cs, VolumeSorter.cxx, gdcmorthoplanes.cxx, reslicesphere.cxx, and threadgdcm.cxx.

References gdcm_assert.

## ◆ GetToplevel()

FilenameType const & gdcm::Directory::GetToplevel | ( |  | ) | const
| inline

Get the name of the toplevel directory.

## ◆ Load()

unsigned int gdcm::Directory::Load | ( | FilenameType const & | name,
|  | bool | recursive = false )

construct a list of filenames and subdirectory beneath directory: name

Warning
  : hidden file and hidden directory are not loaded.

Examples
  ClinicalTrialIdentificationWorkflow.cs, DecompressImageMultiframe.cs, DiscriminateVolume.cxx, DumpToSQLITE3.cxx, DumpVisusChange.cxx, ExplicitLittleEndian.cs, GenerateDICOMDIR.cs, GenerateRTSTRUCT.cxx, ReadUTF8QtDir.cxx, ScanDirectory.cs, SortImage.cxx, StandardizeFiles.cs, VolumeSorter.cxx, gdcmorthoplanes.cxx, reslicesphere.cxx, and threadgdcm.cxx.

## ◆ Print()

void gdcm::Directory::Print | ( | std::ostream & | os = std::cout | ) | const

Print.

Examples
  SortImage.cxx.

Referenced by operator<<.

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | _os,
|  | const Directory & | d )
| friend

References Directory(), and Print().

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

- gdcmDirectory.h