InsightSoftwareConsortium / InsightSoftwareConsortium/ITKPythonPackage
Reading Legacy Converted Enhanced Images
- Lenguaje dominante
- CMake
- Estrellas
- 66
- Forks
- 25
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 2
Descripción
I've converted a DICOM Series of Single-Frame MR Images to a Legacy Converted Enhanced MR Image using [MultiFrameImageFactory](http://www.dclunie.com/pixelmed/software/javadoc/com/pixelmed/dicom/MultiFrameImageFactory.html). When I try to load the generated multi-frame image using ITK's `imread` function, I get the following error:
```None
----> 1 image = itk.imread(input_filename)
~/.pyenvs/imglib/lib/python3.6/site-packages/itkExtras.py in imread(fileName, pixelType)
443 reader = itk.ImageFileReader[ImageType].New(FileName=fileName)
444 else:
--> 445 reader = itk.ImageFileReader.New(FileName=fileName)
446 reader.Update()
447 return reader.GetOutput()
~/.pyenvs/imglib/lib/python3.6/site-packages/itkTemplate.py in New(self, *args, **kwargs)
381 cur = itk.auto_pipeline.current
382 if self.__name__ == "itk::ImageFileReader":
--> 383 return self._NewImageFileReader(*args, **kwargs)
384 primary_input_methods = ('Input', 'InputImage', 'Input1')
385 if len(args) != 0:
~/.pyenvs/imglib/lib/python3.6/site-packages/itkTemplate.py in _NewImageFileReader(self, *args, **kwargs)
418 imageIO = itk.ImageIOFactory.CreateImageIO( inputFileName, itk.ImageIOFactory.ReadMode )
419 if not imageIO:
--> 420 raise RuntimeError("No ImageIO is registered to handle the given file.")
421 componentTypeDic= {"float": itk.F, "double": itk.D,
422 "unsigned_char": itk.UC, "unsigned_short": itk.US, "unsigned_int": itk.UI,
RuntimeError: No ImageIO is registered to handle the given file.
```
Support for Legacy Converted Enhanced Image Storage classes has only recently been added to GDCM:
https://github.com/malaterre/GDCM/blob/513a75c2f4dc704549223b831879c4a5fab00076/Source/DataStructureAndEncodingDefinition/gdcmMediaStorage.cxx#L144
This functionality is not yet in the GDCM code that comes with ITK:
https://github.com/InsightSoftwareConsortium/ITK/blob/6dffe29eb245f77ac27a17d0398fa3073cb6bf4c/Modules/ThirdParty/GDCM/src/gdcm/Source/DataStructureAndEncodingDefinition/gdcmMediaStorage.cxx#L143
Is there a change that the GDCM source code will be updated for the 5.0 release?
See also related [SimpleITK issue](https://github.com/SimpleITK/SimpleITK/issues/440)
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start with itk.imread and the bundled GDCM file Source/DataStructureAndEncodingDefinition/gdcmMediaStorage.cxx, comparing ITK's version with the referenced newer GDCM version. Check the related SimpleITK issue for context, then verify that the generated Legacy Converted Enhanced MR Image is recognized and can be loaded through the ITK Python package.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- build-system, computer-vision
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100