| 61 | |
| 62 | |
| 63 | IFileIO::ConfidenceLevel LegacyLabelSetImageIO::GetConfidenceLevel() const |
| 64 | { |
| 65 | if (AbstractFileReader::GetConfidenceLevel() == Unsupported) |
| 66 | return Unsupported; |
| 67 | const std::string fileName = this->GetLocalFileName(); |
| 68 | itk::NrrdImageIO::Pointer io = itk::NrrdImageIO::New(); |
| 69 | io->SetFileName(fileName); |
| 70 | io->ReadImageInformation(); |
| 71 | |
| 72 | itk::MetaDataDictionary imgMetaDataDictionary = io->GetMetaDataDictionary(); |
| 73 | std::string value(""); |
| 74 | itk::ExposeMetaData<std::string>(imgMetaDataDictionary, "modality", value); |
| 75 | if (value.compare("org.mitk.image.multilabel") == 0) |
| 76 | { |
| 77 | return Supported; |
| 78 | } |
| 79 | else |
| 80 | return Unsupported; |
| 81 | } |
| 82 | |
| 83 | std::vector<mitk::MultiLabelSegmentation::LabelVectorType> ExtractLabelSetsFromMetaData(const itk::MetaDataDictionary& dictionary) |
| 84 | { |
nothing calls this directly
no test coverage detected