| 25 | namespace mitk |
| 26 | { |
| 27 | void CESTIOActivator::Load(us::ModuleContext *context) |
| 28 | { |
| 29 | us::ServiceProperties props; |
| 30 | props[us::ServiceConstants::SERVICE_RANKING()] = 10; |
| 31 | |
| 32 | m_MimeTypes = mitk::MitkCESTIOMimeTypes::Get(); |
| 33 | for (const auto& mimeType : m_MimeTypes) |
| 34 | { |
| 35 | if (mimeType->GetName() == mitk::MitkCESTIOMimeTypes::CEST_DICOM_WITHOUT_META_FILE_NAME()) |
| 36 | { // "w/o meta" mimetype should only registered with low priority. |
| 37 | context->RegisterService(mimeType); |
| 38 | } |
| 39 | else |
| 40 | { |
| 41 | context->RegisterService(mimeType, props); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | m_CESTDICOMReader = std::make_unique<CESTDICOMReaderService>(); |
| 46 | m_CESTDICOMManualWithMetaFileReader = std::make_unique<CESTDICOMManualReaderService>(MitkCESTIOMimeTypes::CEST_DICOM_WITH_META_FILE_MIMETYPE(), "CEST DICOM Manual Reader"); |
| 47 | m_CESTDICOMManualWithOutMetaFileReader = std::make_unique<CESTDICOMManualReaderService>(MitkCESTIOMimeTypes::CEST_DICOM_WITHOUT_META_FILE_MIMETYPE(), "CEST DICOM Manual Reader"); |
| 48 | |
| 49 | m_Context = context; |
| 50 | |
| 51 | DICOMTagsOfInterestAddHelper::TagsOfInterestVector tags = { mitk::DICOM_IMAGING_FREQUENCY_PATH() }; |
| 52 | m_TagHelper.Activate(m_Context, tags); |
| 53 | } |
| 54 | |
| 55 | void CESTIOActivator::Unload(us::ModuleContext *) |
| 56 | { |
nothing calls this directly
no test coverage detected