Medical Imaging Interaction Toolkit  2022.04.99-b2814023
Medical Imaging Interaction Toolkit
mitk::CollectionReader Class Reference

#include <mitkCollectionReader.h>

Inheritance diagram for mitk::CollectionReader:
Collaboration diagram for mitk::CollectionReader:

Public Types

typedef std::vector< std::vector< std::string > > FileListType
 

Public Member Functions

DataCollection::Pointer LoadCollection (const std::string &xmlFileName)
 Build up a mitk::DataCollection from a XML resource. More...
 
void AddDataElementIds (std::vector< std::string > dataElemetIds)
 
void AddSubColIds (std::vector< std::string > subColIds)
 
void SetDataItemNames (std::vector< std::string > itemNames)
 
void ClearDataElementIds ()
 
void ClearSubColIds ()
 
void Clear ()
 
 CollectionReader ()
 
 ~CollectionReader () override
 

Static Public Member Functions

static DataCollection::Pointer FolderToCollection (std::string folder, std::vector< std::string > suffixes, std::vector< std::string > seriesNames, bool allowGaps)
 Build up a mitk::DataCollection from a folder providing suffixes to group the files. More...
 
static FileListType GenerateFileLists (std::string folder, std::vector< std::string > suffixes, bool allowGaps=false)
 GenerateFileLists Returns a collection of lists with valid files names in a folder. More...
 
static FileListType SanitizeFileList (FileListType list)
 SanitizeFileList Removes all entries that are lacking at least one modality. More...
 

Protected Member Functions

void StartElement (const char *elementName, const char **atts) override
 Derived from XMLReader. More...
 
void EndElement (const char *elementName) override
 Derived from XMLReader. More...
 

Detailed Description

Definition at line 24 of file mitkCollectionReader.h.

Member Typedef Documentation

◆ FileListType

typedef std::vector<std::vector<std::string> > mitk::CollectionReader::FileListType

Definition at line 28 of file mitkCollectionReader.h.

Constructor & Destructor Documentation

◆ CollectionReader()

mitk::CollectionReader::CollectionReader ( )

◆ ~CollectionReader()

mitk::CollectionReader::~CollectionReader ( )
override

Member Function Documentation

◆ AddDataElementIds()

void mitk::CollectionReader::AddDataElementIds ( std::vector< std::string >  dataElemetIds)

◆ AddSubColIds()

void mitk::CollectionReader::AddSubColIds ( std::vector< std::string >  subColIds)

◆ Clear()

void mitk::CollectionReader::Clear ( )

◆ ClearDataElementIds()

void mitk::CollectionReader::ClearDataElementIds ( )

◆ ClearSubColIds()

void mitk::CollectionReader::ClearSubColIds ( )

◆ EndElement()

void mitk::CollectionReader::EndElement ( const char *  elementName)
overrideprotected

Derived from XMLReader.

◆ FolderToCollection()

static DataCollection::Pointer mitk::CollectionReader::FolderToCollection ( std::string  folder,
std::vector< std::string >  suffixes,
std::vector< std::string >  seriesNames,
bool  allowGaps 
)
static

Build up a mitk::DataCollection from a folder providing suffixes to group the files.

◆ GenerateFileLists()

static FileListType mitk::CollectionReader::GenerateFileLists ( std::string  folder,
std::vector< std::string >  suffixes,
bool  allowGaps = false 
)
static

GenerateFileLists Returns a collection of lists with valid files names in a folder.

The first suffix entry in the vector is used for the reference images which are put in the first list, then the suffixes are interchanged and checked if the file exists; for each suffix a list is returned with filenames, if a file is expected but does not exist an empty string "" is added instead.

Parameters
folder
suffixes
allowGaps
Returns

◆ LoadCollection()

DataCollection::Pointer mitk::CollectionReader::LoadCollection ( const std::string &  xmlFileName)

Build up a mitk::DataCollection from a XML resource.

◆ SanitizeFileList()

static FileListType mitk::CollectionReader::SanitizeFileList ( FileListType  list)
static

SanitizeFileList Removes all entries that are lacking at least one modality.

Parameters
list- sanitized list
Returns

◆ SetDataItemNames()

void mitk::CollectionReader::SetDataItemNames ( std::vector< std::string >  itemNames)

◆ StartElement()

void mitk::CollectionReader::StartElement ( const char *  elementName,
const char **  atts 
)
overrideprotected

Derived from XMLReader.


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