GDCM 3.2.1

Public Types | Public Member Functions | List of all members
gdcm::FilenameGenerator Class Reference

FilenameGenerator. More...

`#include <gdcmFilenameGenerator.h>`

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

## Public Member Functions
| FilenameGenerator ()
| ~FilenameGenerator ()=default
bool | Generate ()
| Generate (return success)
const char * | GetFilename (SizeType n) const
| Get a particular filename (call after Generate)
FilenamesType const & | GetFilenames () const
| Return all filenames.
SizeType | GetNumberOfFilenames () const
const char * | GetPattern () const
const char * | GetPrefix () const
void | SetNumberOfFilenames (SizeType nfiles)
| Set/Get the number of filenames to generate.
void | SetPattern (const char *pattern)
| Set/Get pattern.
void | SetPrefix (const char *prefix)
| Set/Get prefix.

## Detailed Description

FilenameGenerator.

class to generate filenames based on a pattern (C-style)

Output will be:

for i = 0, number of filenames: outfilename[i] = prefix + (pattern % i)

where pattern % i means C-style snprintf of Pattern using value 'i'

Examples
  ConvertMultiFrameToSingleFrame.cxx, and CreateFakePET.cxx.

## Member Typedef Documentation

## ◆ FilenamesType

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

## ◆ FilenameType

typedef std::string gdcm::FilenameGenerator::FilenameType

## ◆ SizeType

typedef FilenamesType::size_type gdcm::FilenameGenerator::SizeType

## Constructor & Destructor Documentation

## ◆ FilenameGenerator()

gdcm::FilenameGenerator::FilenameGenerator | ( |  | ) |
| inline

## ◆ ~FilenameGenerator()

gdcm::FilenameGenerator::~FilenameGenerator | ( |  | ) |
| default

## Member Function Documentation

## ◆ Generate()

bool gdcm::FilenameGenerator::Generate | ( |  | ) |

Generate (return success)

Examples
  ConvertMultiFrameToSingleFrame.cxx, and CreateFakePET.cxx.

## ◆ GetFilename()

const char * gdcm::FilenameGenerator::GetFilename | ( | SizeType | n | ) | const

Get a particular filename (call after Generate)

Examples
  ConvertMultiFrameToSingleFrame.cxx, and CreateFakePET.cxx.

## ◆ GetFilenames()

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

Return all filenames.

References gdcm_assert.

## ◆ GetNumberOfFilenames()

SizeType gdcm::FilenameGenerator::GetNumberOfFilenames | ( |  | ) | const

Examples
  ConvertMultiFrameToSingleFrame.cxx, and CreateFakePET.cxx.

## ◆ GetPattern()

const char * gdcm::FilenameGenerator::GetPattern | ( |  | ) | const
| inline

## ◆ GetPrefix()

const char * gdcm::FilenameGenerator::GetPrefix | ( |  | ) | const
| inline

## ◆ SetNumberOfFilenames()

void gdcm::FilenameGenerator::SetNumberOfFilenames | ( | SizeType | nfiles | ) |

Set/Get the number of filenames to generate.

Examples
  ConvertMultiFrameToSingleFrame.cxx, and CreateFakePET.cxx.

## ◆ SetPattern()

void gdcm::FilenameGenerator::SetPattern | ( | const char * | pattern | ) |
| inline

Set/Get pattern.

Examples
  ConvertMultiFrameToSingleFrame.cxx, and CreateFakePET.cxx.

## ◆ SetPrefix()

void gdcm::FilenameGenerator::SetPrefix | ( | const char * | prefix | ) |
| inline

Set/Get prefix.

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

- gdcmFilenameGenerator.h