Page 1 of 2

Compressed DICOM images not being opened correctly

PostPosted: Tue May 08, 2018 1:39 pm
by JoMo1970
Good morning all,

I am using the bioformats jar to decompress a DICOM image. For most DICOM images, the jar works without an issue. However, I have three batches of images that when the file is opened using the BioFormats jar, the picture does not render like it should. I know that the image is valid because I can open it within a Windows DICOM viewer. Can anybody provide to me any insight as to why this image may fail? Is there a configuration I might be missing? Is only a specific version of DICOM supported within BioFormats? Any help would be greatly appreciated.

Below is a code snippet that I am using to parse out the images. I have tried two different ways to open the image as you can see in the code and both provide the same result. There are no exceptions being thrown. The image just does not render. I would also supply a sample image but I have to be careful with posting content like this because of possible HIPAA violations.

Code: Select all
//this function will open the compressed images
   private void processCompressedImages(String fileName) throws IOException {
      String errMsg = "ImageJ cannot open compressed DICOM images.\n \n";      
      try {
           /*ImporterOptions options = new ImporterOptions();
           options.setAutoscale(true);
           options.setId(fileName);
           ImagePlus[] imps = BF.openImagePlus(options);*/
            ImagePlus[] imps = BF.openImagePlus(fileName);
            ImagePlus imp = imps[0];
            setProperty("Info", (String) imp.getProperty("Info"));
            imp.show();
       }
       catch (FormatException exc) {
        IJ.error("Sorry, an error occurred: " + exc.getMessage());
        throw new IOException(errMsg);
       }
       catch (IOException exc) {
        IJ.error("Sorry, an error occurred: " + exc.getMessage());
        throw new IOException(errMsg);
       }
   }


Any ideas?

Re: Compressed DICOM images not being opened correctly

PostPosted: Wed May 09, 2018 10:58 am
by dgault
Hi,

The code snippet you supplied is correct and should be enough to read the images fine. We are not currently aware of any existing bugs or limitations with the reading of DICOM files so this looks to be a new issue which we will need to investigate further.

If you do have a sample image which we can test then you can upload it to https://www.openmicroscopy.org/qa2/qa/upload/

David Gault

Re: Compressed DICOM images not being opened correctly

PostPosted: Wed May 09, 2018 12:51 pm
by JoMo1970
Thanks David. I have asked the client if it is ok to upload the image. I will keep you posted if/when this happens.

Re: Compressed DICOM images not being opened correctly

PostPosted: Thu May 10, 2018 4:11 pm
by JoMo1970
David,

I have requested image files that are clean and show the issue in regards to the topic. Please see attached sample image zip file. As mentioned in the original topic, these files load but they do not render the content like they should. When I open these files within a Windows Dicom viewer, everything works normal. Not all compressed dicom files act like this. This batch and a couple of others show this issue.

Please let me know what you think. Thanks.

Re: Compressed DICOM images not being opened correctly

PostPosted: Fri May 11, 2018 1:18 pm
by dgault
Thank you for providing the sample files, I can certainly reproduce the issue with the latest Bio-Formats release. I have debugged through the reading of the file but have not yet got to the bottom of the issue. Is there any of the metadata below which looks incorrect?

SignificantBits="16"
SizeC="1"
SizeT="1"
SizeX="128"
SizeY="96"
SizeZ="1"
Type="uint16"
BigEndian="false"
Interleaved="false"
Compression= "JPEG2K"
Photometric Interpretation = "MONOCHROME2"

Re: Compressed DICOM images not being opened correctly

PostPosted: Fri May 11, 2018 3:51 pm
by JoMo1970
Thanks for the response, David. I am not sure. The data that I do see coming from the file I am only rendering to a grid for review by the user which easily works. The main problem here is that when I use the BioFormats jar to read the image, it does not look right. This type of image is the only one that I see with this problem because other compressed images work normal.

Thanks for the help on this.

Re: Compressed DICOM images not being opened correctly

PostPosted: Tue May 15, 2018 2:45 pm
by JoMo1970
Hi David,

Any update on this issue? Thanks in advance.

Re: Compressed DICOM images not being opened correctly

PostPosted: Tue May 15, 2018 3:51 pm
by dgault
Just as a follow up to this issue, I have been carrying out further testing and have identified that some of the parameters Bio-Formats is reading are incorrect. I still do not yet have a fix in place for the issue but I have opened a Trello card on the Bio-Formats Inbox to keep track of it: https://trello.com/c/f4r7sbke/240-dicom ... ted-images

Re: Compressed DICOM images not being opened correctly

PostPosted: Tue May 15, 2018 7:56 pm
by JoMo1970
Ok, understood. Thanks. You wouldn't happen to have an ETA on when this will be resolved??

Re: Compressed DICOM images not being opened correctly

PostPosted: Wed May 16, 2018 3:25 pm
by dgault
Im afraid I don't have any ETA at the moment. Once a solution is found it will have to be tested and reviewed before being scheduled for a release cycle. I will keep this thread and the Trello card updated with any progress.