open_iA 2024.9
Loading...
Searching...
No Matches
iAImageStackFileIO Class Reference

Support for loading/saving image stack files for the file I/O framework of open_iA. More...

#include <iAImageStackFileIO.h>

Inheritance diagram for iAImageStackFileIO:
[legend]
Collaboration diagram for iAImageStackFileIO:
[legend]

Public Member Functions

 iAImageStackFileIO ()
 
QStringList extensions () const override
 The file extensions that this file IO should be used for.
 
bool isDataSetSupported (std::shared_ptr< iADataSet > dataSet, QString const &fileName, Operation op) const override
 Whether this IO can be used for storing the given data set.
 
std::shared_ptr< iADataSetloadData (QString const &fileName, QVariantMap const &paramValues, iAProgress const &progress) override
 I/O for specific file formats should override this to load data from the file with given name.
 
QString name () const override
 The name of the file type that this IO supports.
 
void saveData (QString const &fileName, std::shared_ptr< iADataSet > dataSet, QVariantMap const &paramValues, iAProgress const &progress) override
 I/O for specific file formats should override this to save data to the file with given name.
 
- Public Member Functions inherited from iAFileIO
 iAFileIO (iADataSetTypes readTypes, iADataSetTypes writeTypes)
 create a file I/O for the given dataset type
 
virtual ~iAFileIO ()
 virtual destructor, to enable proper destruction in derived classes and to avoid warnings
 
bool checkParams (QVariantMap &paramValues, Operation op, QString const &fileName)
 Check whether the given values contain all required parameters; set to default if not.
 
QStringList filterExtensions ()
 list of extensions as required by Qt's open/save file dialogs
 
QString filterString ()
 a filter string for the type of files supported by the I/O class
 
std::shared_ptr< iADataSetload (QString const &fileName, QVariantMap const &paramValues, iAProgress const &progress=iAProgress())
 Load the (list of) dataset(s); store parameters in the resulting datasets.
 
iAAttributes const & parameter (Operation op) const
 Required parameters for loading/saving the file.
 
bool save (QString const &fileName, std::shared_ptr< iADataSet > dataSet, QVariantMap const &paramValues, iAProgress const &progress=iAProgress())
 Save the (list of) dataset(s); modify input datasets to reflect the new file name this data is now stored under.
 
iADataSetTypes supportedDataSetTypes (Operation op) const
 Types of dataset contained in this file format, which this IO can load/save.
 

Static Public Member Functions

static int axisName2Idx (QString const &axisName)
 

Static Public Attributes

static QString const AxisOption
 
static QString const ImageStackOption
 
static QString const LoadTypeStr
 
static QString const Name
 
static QString const SingleImageOption
 
- Static Public Attributes inherited from iAFileIO
static const QString CompressionStr
 

Additional Inherited Members

- Public Types inherited from iAFileIO
enum  Operation { Load , Save }
 
- Protected Member Functions inherited from iAFileIO
- Protected Attributes inherited from iAFileIO
std::array< iAAttributes, 2 > m_params
 

Detailed Description

Support for loading/saving image stack files for the file I/O framework of open_iA.

Todo
merge with modules/MetaFilters/iAStackReaderFilter ?

Constructor & Destructor Documentation

◆ iAImageStackFileIO()

iAImageStackFileIO::iAImageStackFileIO ( )

Member Function Documentation

◆ axisName2Idx()

int iAImageStackFileIO::axisName2Idx ( QString const & axisName)
static

◆ extensions()

QStringList iAImageStackFileIO::extensions ( ) const
overridevirtual

The file extensions that this file IO should be used for.

Implements iAFileIO.

◆ isDataSetSupported()

bool iAImageStackFileIO::isDataSetSupported ( std::shared_ptr< iADataSet > dataSet,
QString const & fileName,
Operation op ) const
overridevirtual

Whether this IO can be used for storing the given data set.

It could for example check whether the format supports the data types in the dataset

Returns
by default, it only checks whether the given dataSet is of a supported data set type for the given operation

Reimplemented from iAFileIO.

◆ loadData()

std::shared_ptr< iADataSet > iAImageStackFileIO::loadData ( QString const & fileName,
QVariantMap const & paramValues,
iAProgress const & progress )
overridevirtual

I/O for specific file formats should override this to load data from the file with given name.

default implementation does nothing (instead of being pure virtual, to allow for I/O's that only save a dataset but don't load one)

Reimplemented from iAFileIO.

◆ name()

QString iAImageStackFileIO::name ( ) const
overridevirtual

The name of the file type that this IO supports.

Implements iAFileIO.

◆ saveData()

void iAImageStackFileIO::saveData ( QString const & fileName,
std::shared_ptr< iADataSet > dataSet,
QVariantMap const & paramValues,
iAProgress const & progress )
overridevirtual

I/O for specific file formats should override this to save data to the file with given name.

default implementation does nothing (instead of being pure virtual, to allow for I/O's that only load a dataset but don't save one). The file name and all Save parameter values (m_params[Save]) will be set in save() Derived classes must add any potentially necessary metadata in the dataSets so that there is all information in there to load the dataSet again from the given fileName

Reimplemented from iAFileIO.

Member Data Documentation

◆ AxisOption

QString const iAImageStackFileIO::AxisOption
static

◆ ImageStackOption

QString const iAImageStackFileIO::ImageStackOption
static

◆ LoadTypeStr

QString const iAImageStackFileIO::LoadTypeStr
static

◆ Name

QString const iAImageStackFileIO::Name
static

◆ SingleImageOption

QString const iAImageStackFileIO::SingleImageOption
static

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