On Thu, Jul 13, 2017 at 5:32 PM, Yaroslav Halchenko <y...@debian.org> wrote:
>
> On Thu, 13 Jul 2017, Mathieu Malaterre wrote:
>> Step:
>
>> $ cd /tmp
>> $ wget 
>> "https://sourceforge.net/p/gdcm/gdcmdata/ci/master/tree/SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm?format=raw";
>> $ mkdir bug
>> $ gdcmconv --raw SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm* bug/raw.dcm
>> $ nib-dicomfs /tmp/bug /tmp/demo
>
>> In another shell:
>
>> $ find /tmp/demo/
>
>
> Great -- thanks!  but seems to work  for me just fine

Right. It seems my steps were missing an important parts. Full steps are as

$ cd /tmp
$ wget 
"https://sourceforge.net/p/gdcm/gdcmdata/ci/master/tree/SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm?format=raw";
$ mkdir bug1
$ gdcmconv --raw SIEMENS_MOSAIC_12BitsStored-16BitsJPEG.dcm* bug1/raw.dcm
$ nib-dicomfs /tmp/bug1 /tmp/demo
$ find /tmp/demo

At this point output should be clean. Now let's try again with an
intermediate step:

$ sudo umount /tmp/demo
$ mkdir bug2
$ cp ~/buggy.dcm bug2/jpeg.dcm
$ nib-dicomfs /tmp/bug2 /tmp/demo
$ find /tmp/demo

At this point it is expected to get a funky output since it is
explitely mentionned that JPEG is not supported. But now that we have
made nib-dicomfs failed at least once, let's try original steps again:

$ sudo umount /tmp/demo
$ nib-dicomfs /tmp/bug1 /tmp/demo
$ find /tmp/demo
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/fuse.py", line 362, in __call__
    return apply(self.func, args, kw)
  File "/usr/bin/nib-dicomfs", line 141, in getattr
    st.st_size = matched_path[0]()
  File "/usr/lib/python2.7/dist-packages/nibabel/dft.py", line 156, in png_size
    return len(self.as_png(index=index, scale_to_slice=scale_to_slice))
  File "/usr/lib/python2.7/dist-packages/nibabel/dft.py", line 137, in as_png
    data = d.pixel_array.copy()
  File "/usr/lib/python2.7/dist-packages/dicom/dataset.py", line 417,
in pixel_array
    return self._get_pixel_array()
  File "/usr/lib/python2.7/dist-packages/dicom/dataset.py", line 399,
in _get_pixel_array
    raise NotImplementedError("Pixel Data is compressed in a format
pydicom does not yet handle. Cannot return array")
NotImplementedError: Pixel Data is compressed in a format pydicom does
not yet handle. Cannot return array
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/fuse.py", line 362, in __call__
    return apply(self.func, args, kw)
  File "/usr/bin/nib-dicomfs", line 141, in getattr
    st.st_size = matched_path[0]()
  File "/usr/lib/python2.7/dist-packages/nibabel/dft.py", line 156, in png_size
    return len(self.as_png(index=index, scale_to_slice=scale_to_slice))
  File "/usr/lib/python2.7/dist-packages/nibabel/dft.py", line 137, in as_png
    data = d.pixel_array.copy()
  File "/usr/lib/python2.7/dist-packages/dicom/dataset.py", line 417,
in pixel_array
    return self._get_pixel_array()
  File "/usr/lib/python2.7/dist-packages/dicom/dataset.py", line 399,
in _get_pixel_array
    raise NotImplementedError("Pixel Data is compressed in a format
pydicom does not yet handle. Cannot return array")
NotImplementedError: Pixel Data is compressed in a format pydicom does
not yet handle. Cannot return array

Let me try to find an example of dataset that I can share.

-M

Reply via email to