MCPcopy Create free account
hub / github.com/MITK/MITK / Read

Method Read

Modules/Core/src/IO/mitkAbstractFileReader.cpp:89–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 ////////////////////// Reading /////////////////////////
88
89 std::vector<BaseData::Pointer> AbstractFileReader::Read()
90 {
91 std::vector<BaseData::Pointer> result = this->DoRead();
92
93 const auto options = this->GetOptions();
94
95 for (auto& data : result)
96 {
97 data->SetProperty(PropertyKeyPathToPropertyName(IOMetaInformationPropertyConstants::READER_DESCRIPTION()), StringProperty::New(d->GetDescription()));
98 data->SetProperty(PropertyKeyPathToPropertyName(IOMetaInformationPropertyConstants::READER_VERSION()), StringProperty::New(MITK_VERSION_STRING));
99 data->SetProperty(PropertyKeyPathToPropertyName(IOMetaInformationPropertyConstants::READER_MIME_NAME()), StringProperty::New(d->GetMimeType()->GetName()));
100 data->SetProperty(PropertyKeyPathToPropertyName(IOMetaInformationPropertyConstants::READER_MIME_CATEGORY()), StringProperty::New(d->GetMimeType()->GetCategory()));
101 if (this->GetInputStream() == nullptr)
102 {
103 data->SetProperty(PropertyKeyPathToPropertyName(IOMetaInformationPropertyConstants::READER_INPUTLOCATION()), StringProperty::New(Utf8Util::Local8BitToUtf8(this->GetInputLocation())));
104 }
105
106 for (const auto& option : options)
107 {
108 auto optionpath = IOMetaInformationPropertyConstants::READER_OPTION_ROOT().AddElement(option.first);
109 data->SetProperty(PropertyKeyPathToPropertyName(optionpath), StringProperty::New(option.second.ToString()));
110 }
111 }
112
113 return result;
114 }
115
116 DataStorage::SetOfObjects::Pointer AbstractFileReader::Read(DataStorage &ds)
117 {

Callers 4

mitkPointSetReaderTestFunction · 0.45
LoadMethod · 0.45
DoReadMethod · 0.45

Calls 15

GetOptionsMethod · 0.95
GetInputStreamMethod · 0.95
GetInputLocationMethod · 0.95
AddElementMethod · 0.80
NewFunction · 0.50
DoReadMethod · 0.45
SetPropertyMethod · 0.45
GetDescriptionMethod · 0.45
GetNameMethod · 0.45
GetMimeTypeMethod · 0.45

Tested by 1

mitkPointSetReaderTestFunction · 0.36