Compressed DICOM images not being opened correctly
Posted: 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.
Any ideas?
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?