HomePhabricator
Diffusion MITK 2d3fc68a5abb

Moved Dicom2Nrrd to new BasicImageProcessing Module Added Possibility to import…
Concern Raised2d3fc68a5abb

Description

Moved Dicom2Nrrd to new BasicImageProcessing Module Added Possibility to import more than one image.

Details

Auditors
floca
Provenance
goetzmAuthored on Apr 10 2017, 11:24 AM
goetzmPushed on Apr 10 2017, 11:24 AM
Parents
rMITKffa95f1ac76b: Merge branch 'T22588-RasLpsFix2'
Branches
Unknown
Tags
Unknown
References
T22714-Dicom2NrrdIntegration

Event Timeline

floca added a subscriber: floca.

We should use the new DICOM reader code and all its features and bug fixes.

/Modules/BasicImageProcessing/MiniApps/Dicom2Nrrd.cpp
67–87

This should definitly be reworked!

The app uses the old legacy DicomSeriesReader class instead of the new DICOM reading infrastructure.
Therefore we should use e.g. mikt::DICOMFileReaderSelector form module DICOMReader.
Code example:

mitk::DICOMFileReaderSelector::Pointer selector = mitk::DICOMFileReaderSelector::New();
selector->LoadBuiltIn3DConfigs();
selector->SetInputFiles( files );

mitk::DICOMFileReader::Pointer reader = selector->GetFirstReaderWithMinimumNumberOfOutputImages();
reader->SetAdditionalTagsOfInterest(toiSrv->GetTagsOfInterest());

reader->SetInputFiles({ location });
reader->AnalyzeInputFiles();
reader->LoadImages();

if (reader->GetNumberOfOutputs() == 0){
    MITK_ERROR << "Could not determine a DICOM reader for this file" << std::endl;
    return result;
}

for (auto i = 0; i < reader->GetNumberOfOutputs(); ++i=
{
    const mitk::DICOMImageBlockDescriptor& desc = reader->GetOutput(i);
    mitk::Image::Pointer originalImage = desc.GetMitkImage();
 }
This commit now has outstanding concerns.Apr 13 2017, 12:34 PM