| IOFormat 1.8.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ioformat::StackReader Class Reference

`#include <ioformat/StackReader.h>`

## Public Member Functions
| StackReader ()=delete

## Static Public Member Functions
static std::shared_ptr< iolink::ImageView > | openImageFromPattern (const std::string &pattern, iolink::ImageDimension newDim)
static std::shared_ptr< iolink::ImageView > | openImageFromPattern (const std::string &pattern)
static std::shared_ptr< iolink::ImageView > | readImageFromPattern (const std::string &pattern, iolink::ImageDimension newDim)
static std::shared_ptr< iolink::ImageView > | readImageFromPattern (const std::string &pattern)
static std::shared_ptr< iolink::ImageView > | openImageFromListFile (const std::string &filePath, iolink::ImageDimension newDim)
static std::shared_ptr< iolink::ImageView > | openImageFromListFile (const std::string &filePath)
static std::shared_ptr< iolink::ImageView > | readImageFromListFile (const std::string &filePath, iolink::ImageDimension newDim)
static std::shared_ptr< iolink::ImageView > | readImageFromListFile (const std::string &filePath)

## Detailed Description

A factory to read stacks of images.

## Constructor & Destructor Documentation

## ◆ StackReader()

ioformat::StackReader::StackReader | ( |  | ) |
| delete

Remove constructor, as this class is a static factory.

## Member Function Documentation

## ◆ openImageFromListFile() [1/2]

static std::shared_ptr< iolink::ImageView > ioformat::StackReader::openImageFromListFile | ( | const std::string & | filePath | ) |
| static

Stack multiple files as described in a list file.

A list file is a file, usually with the "lst" extension, where each line is a path to a file, absolute, or relative to the list file.

Example of a list file:

some/path/to/a/file.ext
some/other/path/to/a/file.ext
...

Parameters

  filePath | The path to the list file.

Exceptions

  Error | if a file from the list is not found
  Error | if stacking failed

Returns
  An ImageView built by stacking all the images in the list file.

See also
  IOFormat::stack

## ◆ openImageFromListFile() [2/2]

static std::shared_ptr< iolink::ImageView > ioformat::StackReader::openImageFromListFile | ( | const std::string & | filePath,
|  | iolink::ImageDimension | newDim
| ) |  |
| static

Stack multiple files as described in a list file.

A list file is a file, usually with the "lst" extension, where each line is a path to a file, absolute, or relative to the list file.

Example of a list file:

some/path/to/a/file.ext
some/other/path/to/a/file.ext
...

Parameters

  filePath | The path to the list file.
  newDim | The interpretation of the stacking dimension.

Exceptions

  Error | if a file from the list is not found
  Error | if stacking failed

Returns
  An ImageView built by stacking all the images in the list file.

See also
  IOFormat::stack

## ◆ openImageFromPattern() [1/2]

static std::shared_ptr< iolink::ImageView > ioformat::StackReader::openImageFromPattern | ( | const std::string & | pattern | ) |
| static

Open multiple files to stack them.

The pattern must be written using the character "*" as a wildcard for any number of characters. The wildcard must only be present on the last segment of the path, the filename part.

Example:

`/some/dir/img_*.png` will load all files following this pattern, ands stack them, using lexicographic order.

As there is no dimension specified in this version, the ImageType of the output image will be ImageTYpeId::UNKNOWN

Parameters

  pattern | The pattern to use to open files.

Exceptions

  Error | if stacking failed

Returns
  An ImageView containing the images loaded using the pattern, and stacked.

See also
  IOFormat::stack

## ◆ openImageFromPattern() [2/2]

static std::shared_ptr< iolink::ImageView > ioformat::StackReader::openImageFromPattern | ( | const std::string & | pattern,
|  | iolink::ImageDimension | newDim
| ) |  |
| static

Open multiple files to stack them.

The pattern must be written using the character "*" as a wildcard for any number of characters. The wildcard must only be present on the last segment of the path, the filename part.

Example:

`/some/dir/img_*.png` will load all files following this pattern, ands stack them, using lexicographic order.

Parameters

  pattern | The pattern to use to open files.
  newDim | The interpretation of the stacking dimension.

Exceptions

  Error | if stacking failed

Returns
  An ImageView containing the images loaded using the pattern, and stacked.

See also
  IOFormat::stack

## ◆ readImageFromListFile() [1/2]

static std::shared_ptr< iolink::ImageView > ioformat::StackReader::readImageFromListFile | ( | const std::string & | filePath | ) |
| static

Stack multiple files as described in a list file and load the result in memory.

A list file is a file, usually with the "lst" extension, where each line is a path to a file, absolute, or relative to the list file.

Example of a list file:

some/path/to/a/file.ext
some/other/path/to/a/file.ext
...

Parameters

  filePath | The path to the list file.

Exceptions

  Error | if a file from the list is not found
  Error | if stacking failed

Returns
  An ImageView built by stacking all the images in the list file and loading it in memory.

See also
  IOFormat::stack

## ◆ readImageFromListFile() [2/2]

static std::shared_ptr< iolink::ImageView > ioformat::StackReader::readImageFromListFile | ( | const std::string & | filePath,
|  | iolink::ImageDimension | newDim
| ) |  |
| static

Stack multiple files as described in a list file and load the result in memory.

A list file is a file, usually with the "lst" extension, where each line is a path to a file, absolute, or relative to the list file.

Example of a list file:

some/path/to/a/file.ext
some/other/path/to/a/file.ext
...

Parameters

  filePath | The path to the list file.
  newDim | The interpretation of the stacking dimension.

Exceptions

  Error | if a file from the list is not found
  Error | if stacking failed

Returns
  An ImageView built by stacking all the images in the list file and loading it in memory.

See also
  IOFormat::stack

## ◆ readImageFromPattern() [1/2]

static std::shared_ptr< iolink::ImageView > ioformat::StackReader::readImageFromPattern | ( | const std::string & | pattern | ) |
| static

Stack multiple files following a pattern and load the stacked ImageView in memory.

The pattern must be written using the character "*" as a wildcard for any number of characters. The wildcard must only be present on the last segment of the path, the filename part.

The stack will be loaded in memory after construction.

Example:

`/some/dir/img_*.png` will load all files following this pattern, ands stack them, using lexicographic order.

As there is no dimension specified in this version, the ImageType of the output image will be ImageTYpeId::UNKNOWN

Parameters

  pattern | The pattern to use to open files.

Exceptions

  Error | if stacking failed

Returns
  An ImageView containing the images opened using the pattern, stacked, and loaded in memory.

See also
  IOFormat::stack

## ◆ readImageFromPattern() [2/2]

static std::shared_ptr< iolink::ImageView > ioformat::StackReader::readImageFromPattern | ( | const std::string & | pattern,
|  | iolink::ImageDimension | newDim
| ) |  |
| static

Stack multiple files following a pattern and load the stacked ImageView in memory.

The pattern must be written using the character "*" as a wildcard for any number of characters. The wildcard must only be present on the last segment of the path, the filename part.

The stack will be loaded in memory after construction.

Example:

`/some/dir/img_*.png` will load all files following this pattern, ands stack them, using lexicographic order.

Parameters

  pattern | The pattern to use to open files.
  newDim | The interpretation of the stacking dimension.

Exceptions

  Error | if stacking failed

Returns
  An ImageView containing the images opened using the pattern, stacked, and loaded in memory.

See also
  IOFormat::stack

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

- ioformat/public/include/ioformat/StackReader.h