Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
The LabelSetIOHelper is a static helper class that supports serialization of mitk::LabelSetImage. More...
#include <mitkLabelSetIOHelper.h>
Static Public Member Functions | |
static bool | SaveLabelSetImagePreset (std::string &presetFilename, itk::SmartPointer< mitk::LabelSetImage > &inputImage) |
Saves the mitk::LabelSet configuration of inputImage to presetFilename. The preset is stored as "*.lsetp". More... | |
static void | LoadLabelSetImagePreset (std::string &presetFilename, itk::SmartPointer< mitk::LabelSetImage > &inputImage) |
Loads an existing preset for a mitk::LabelSetImage from presetFilename and applies it to inputImage. More... | |
static itk::SmartPointer< mitk::Label > | LoadLabelFromTiXmlDocument (TiXmlElement *labelElem) |
Creates a mitk::Label from a TiXmlElement. More... | |
static TiXmlElement * | GetLabelAsTiXmlElement (Label *label) |
Creates a TiXmlElement from a mitk::Label. More... | |
static TiXmlElement * | PropertyToXmlElem (const std::string &key, const BaseProperty *property) |
Since a mitk::Label is basically a mitk::PropertyList this function coverts the label's properties into XML. More... | |
static bool | PropertyFromXmlElem (std::string &key, itk::SmartPointer< mitk::BaseProperty > &prop, TiXmlElement *elem) |
Since a mitk::Label is basically a mitk::PropertyList this function coverts a XML element into a property. More... | |
The LabelSetIOHelper is a static helper class that supports serialization of mitk::LabelSetImage.
This class provides static functions for converting mitk::Label into XML and also allows the serialization of mitk::LabelSet as presets
Definition at line 37 of file mitkLabelSetIOHelper.h.
|
static |
Creates a TiXmlElement from a mitk::Label.
label | the mitk::Label from which the xml element will be created |
Definition at line 114 of file mitkLabelSetIOHelper.cpp.
References mitk::PropertyList::GetMap().
Referenced by SaveLabelSetImagePreset(), and mitk::LabelSetImageIO::Write().
|
static |
Creates a mitk::Label from a TiXmlElement.
labelElem | the xml element from which a mitk::Label will be created |
Definition at line 131 of file mitkLabelSetIOHelper.cpp.
References mitk::Label::New(), and PropertyFromXmlElem().
Referenced by LoadLabelSetImagePreset(), and mitk::LabelSetImageIO::Read().
|
static |
Loads an existing preset for a mitk::LabelSetImage from presetFilename and applies it to inputImage.
presetFilename | the filename of the preset including the filesystem path |
inputImage | the image to which the loaded preset will be applied |
Definition at line 62 of file mitkLabelSetIOHelper.cpp.
References LoadLabelFromTiXmlDocument(), and MITK_INFO.
|
static |
Since a mitk::Label is basically a mitk::PropertyList this function coverts a XML element into a property.
key | the property's key |
prop | the mitk::BaseProperty that will be created |
elem | the XML elem from which the property will be created |
Definition at line 190 of file mitkLabelSetIOHelper.cpp.
References MITK_ERROR, and MITK_WARN.
Referenced by LoadLabelFromTiXmlDocument().
|
static |
Since a mitk::Label is basically a mitk::PropertyList this function coverts the label's properties into XML.
key | the property's key which will be used in the XML element |
property | the mitk::BaseProperty that should be converted |
Definition at line 150 of file mitkLabelSetIOHelper.cpp.
References MITK_ERROR, and MITK_WARN.
|
static |
Saves the mitk::LabelSet configuration of inputImage to presetFilename. The preset is stored as "*.lsetp".
presetFilename | the filename including the filesystem path |
inputImage | the input image from which the preset should be generated |
Definition at line 23 of file mitkLabelSetIOHelper.cpp.
References GetLabelAsTiXmlElement().