Medical Imaging Interaction Toolkit
2016.11.0
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 () | |
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) |
Derived from XMLReader. More... | |
void | EndElement (const char *elementName) |
Derived from XMLReader. More... | |
Definition at line 28 of file mitkCollectionReader.h.
typedef std::vector<std::vector<std::string> > mitk::CollectionReader::FileListType |
Definition at line 32 of file mitkCollectionReader.h.
mitk::CollectionReader::CollectionReader | ( | ) |
Definition at line 57 of file mitkCollectionReader.cpp.
mitk::CollectionReader::~CollectionReader | ( | ) |
Definition at line 65 of file mitkCollectionReader.cpp.
void mitk::CollectionReader::AddDataElementIds | ( | std::vector< std::string > | dataElemetIds | ) |
Definition at line 85 of file mitkCollectionReader.cpp.
Referenced by main().
void mitk::CollectionReader::AddSubColIds | ( | std::vector< std::string > | subColIds | ) |
Definition at line 90 of file mitkCollectionReader.cpp.
Referenced by main().
void mitk::CollectionReader::Clear | ( | ) |
Definition at line 110 of file mitkCollectionReader.cpp.
void mitk::CollectionReader::ClearDataElementIds | ( | ) |
Definition at line 100 of file mitkCollectionReader.cpp.
Referenced by main().
void mitk::CollectionReader::ClearSubColIds | ( | ) |
Definition at line 105 of file mitkCollectionReader.cpp.
Referenced by main().
|
protected |
Derived from XMLReader.
Definition at line 244 of file mitkCollectionReader.cpp.
References DATA, mitk::New(), and SUBCOLLECTION.
|
static |
Build up a mitk::DataCollection from a folder providing suffixes to group the files.
Definition at line 117 of file mitkCollectionReader.cpp.
References GetDate(), GetName(), mitk::BaseDataIO::LoadBaseDataFromFile(), mitk::IOUtil::LoadImage(), MITK_INFO, and mitk::New().
|
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 308 of file mitkCollectionReader.cpp.
References MITK_ERROR.
Referenced by 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 74 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 389 of file mitkCollectionReader.cpp.
References MITK_ERROR, and MITK_INFO.
Referenced by mitk::CollectionWriter::FolderToXml(), and mitk::CollectionWriter::SingleFolderToXml().
void mitk::CollectionReader::SetDataItemNames | ( | std::vector< std::string > | itemNames | ) |
Definition at line 95 of file mitkCollectionReader.cpp.
Referenced by main().
|
protected |
Derived from XMLReader.
Definition at line 159 of file mitkCollectionReader.cpp.
References COLLECTION, DATA, ID, ITEM, LINK, mitk::BaseDataIO::LoadBaseDataFromFile(), mitk::IOUtil::LoadImage(), MITK_ERROR, MITK_INFO, MITK_WARN, NAME, mitk::New(), and SUBCOLLECTION.