We're Hiring!

Compressed DICOM images not being opened correctly

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Compressed DICOM images not being opened correctly

Postby JoMo1970 » Tue May 08, 2018 1:39 pm

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?
JoMo1970
 
Posts: 7
Joined: Tue May 08, 2018 3:52 am

Re: Compressed DICOM images not being opened correctly

Postby dgault » Wed May 09, 2018 10:58 am

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
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm

Re: Compressed DICOM images not being opened correctly

Postby JoMo1970 » Wed May 09, 2018 12:51 pm

Thanks David. I have asked the client if it is ok to upload the image. I will keep you posted if/when this happens.
JoMo1970
 
Posts: 7
Joined: Tue May 08, 2018 3:52 am

Re: Compressed DICOM images not being opened correctly

Postby JoMo1970 » Thu May 10, 2018 4:11 pm

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.
JoMo1970
 
Posts: 7
Joined: Tue May 08, 2018 3:52 am

Re: Compressed DICOM images not being opened correctly

Postby dgault » Fri May 11, 2018 1:18 pm

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"
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm

Re: Compressed DICOM images not being opened correctly

Postby JoMo1970 » Fri May 11, 2018 3:51 pm

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.
JoMo1970
 
Posts: 7
Joined: Tue May 08, 2018 3:52 am

Re: Compressed DICOM images not being opened correctly

Postby JoMo1970 » Tue May 15, 2018 2:45 pm

Hi David,

Any update on this issue? Thanks in advance.
JoMo1970
 
Posts: 7
Joined: Tue May 08, 2018 3:52 am

Re: Compressed DICOM images not being opened correctly

Postby dgault » Tue May 15, 2018 3:51 pm

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
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm

Re: Compressed DICOM images not being opened correctly

Postby JoMo1970 » Tue May 15, 2018 7:56 pm

Ok, understood. Thanks. You wouldn't happen to have an ETA on when this will be resolved??
JoMo1970
 
Posts: 7
Joined: Tue May 08, 2018 3:52 am

Re: Compressed DICOM images not being opened correctly

Postby dgault » Wed May 16, 2018 3:25 pm

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.
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm

Next

Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest

cron