# gdcm::FilenameGenerator Class Reference

FilenameGenerator. More...

`#include <gdcmFilenameGenerator.h>`

Collaboration diagram for gdcm::FilenameGenerator:
[legend]

List of all members.

## Public Types
typedef std::vector< FilenameType > | FilenamesType
typedef std::string | FilenameType
## Public Member Functions
| FilenameGenerator ()
| ~FilenameGenerator ()
bool | Generate ()
| Generate (return success).
const char * | GetFilename (unsigned int n) const
| Get a particular filename (call after Generate).
FilenamesType const & | GetFilenames () const
| Return all filenames.
unsigned int | GetNumberOfFilenames () const
const char * | GetPattern () const
const char * | GetPrefix () const
void | SetNumberOfFilenames (unsigned int 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'

## Member Typedef Documentation

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

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

## Constructor & Destructor Documentation

gdcm::FilenameGenerator::FilenameGenerator | ( |  | ) | `[inline]`

gdcm::FilenameGenerator::~FilenameGenerator | ( |  | ) | `[inline]`

## Member Function Documentation

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

Generate (return success).

const char* gdcm::FilenameGenerator::GetFilename | ( | unsigned int | n | ) | const

Get a particular filename (call after Generate).

FilenamesType const& gdcm::FilenameGenerator::GetFilenames | ( |  | ) | const`[inline]`

Return all filenames.

unsigned int gdcm::FilenameGenerator::GetNumberOfFilenames | ( |  | ) | const

const char* gdcm::FilenameGenerator::GetPattern | ( |  | ) | const`[inline]`

const char* gdcm::FilenameGenerator::GetPrefix | ( |  | ) | const`[inline]`

void gdcm::FilenameGenerator::SetNumberOfFilenames | ( | unsigned int | nfiles | ) |

Set/Get the number of filenames to generate.

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

Set/Get pattern.

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

Set/Get prefix.

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

- gdcmFilenameGenerator.h