Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkCollectionReader.h>
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... | |
Definition at line 24 of file mitkCollectionReader.h.
typedef std::vector<std::vector<std::string> > mitk::CollectionReader::FileListType |
Definition at line 28 of file mitkCollectionReader.h.
mitk::CollectionReader::CollectionReader | ( | ) |
Definition at line 53 of file mitkCollectionReader.cpp.
|
override |
Definition at line 61 of file mitkCollectionReader.cpp.
References Clear().
void mitk::CollectionReader::AddDataElementIds | ( | std::vector< std::string > | dataElemetIds | ) |
Definition at line 81 of file mitkCollectionReader.cpp.
Referenced by main().
void mitk::CollectionReader::AddSubColIds | ( | std::vector< std::string > | subColIds | ) |
Definition at line 86 of file mitkCollectionReader.cpp.
Referenced by main().
void mitk::CollectionReader::Clear | ( | ) |
Definition at line 106 of file mitkCollectionReader.cpp.
Referenced by ~CollectionReader().
void mitk::CollectionReader::ClearDataElementIds | ( | ) |
Definition at line 96 of file mitkCollectionReader.cpp.
Referenced by main().
void mitk::CollectionReader::ClearSubColIds | ( | ) |
Definition at line 101 of file mitkCollectionReader.cpp.
Referenced by main().
|
overrideprotected |
Derived from XMLReader.
Definition at line 209 of file mitkCollectionReader.cpp.
References DATA, mitk::DataCollection::New(), and SUBCOLLECTION.
|
static |
Build up a mitk::DataCollection from a folder providing suffixes to group the files.
Definition at line 113 of file mitkCollectionReader.cpp.
References GenerateFileLists(), GetDate(), GetName(), image, k(), mitk::DataCollection::New(), and SanitizeFileList().
|
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.
folder | |
suffixes | |
allowGaps |
Definition at line 273 of file mitkCollectionReader.cpp.
References MITK_ERROR.
Referenced by FolderToCollection(), mitk::CollectionWriter::FolderToXml(), and mitk::CollectionWriter::SingleFolderToXml().
mitk::DataCollection::Pointer mitk::CollectionReader::LoadCollection | ( | const std::string & | xmlFileName | ) |
Build up a mitk::DataCollection from a XML resource.
Loads the xml file filename and generates the necessary instances.
Definition at line 70 of file mitkCollectionReader.cpp.
Referenced by main().
|
static |
SanitizeFileList Removes all entries that are lacking at least one modality.
list | - sanitized list |
Definition at line 354 of file mitkCollectionReader.cpp.
References MITK_ERROR, and MITK_INFO.
Referenced by FolderToCollection(), mitk::CollectionWriter::FolderToXml(), and mitk::CollectionWriter::SingleFolderToXml().
void mitk::CollectionReader::SetDataItemNames | ( | std::vector< std::string > | itemNames | ) |
Definition at line 91 of file mitkCollectionReader.cpp.
Referenced by main().
|
overrideprotected |
Derived from XMLReader.
Definition at line 139 of file mitkCollectionReader.cpp.
References COLLECTION, DATA, ID, image, ITEM, LINK, MITK_ERROR, MITK_WARN, NAME, mitk::DataCollection::New(), and SUBCOLLECTION.