Ideas for converting DICOM to high-resolution tiff?

fiji
imagej
dicom

#1

Hi all,

I am attempting to perform threshold-based analysis on MRI scans that were burned to a CD in DICOM format. They are part of a study that includes scans of the same subjects from two other time points 3 and 4 years ago. Those “old” scans were burned to a CD in .avi format, which Fiji automatically opened in high-resolution and I easily converted to tiff. I wrote a custom plugin for the analysis and it works beautifully on the “old” images (from time points 1 and 2).

I would like to run the same plugin on the most recently acquired images, but I have only been able to open DICOM files in Fiji as low resolution 256 x 128 pixel images. I can open them in Horos (open-source DICOM viewing/analysis software for Mac) and get the high resolution that I want. So then I tried exporting them from Horos into .mp4 or even .tiff, but they still open in Fiji as the low-resolution versions. I’ve poked around for “DICOM to avi” converting software, but some of them seem a little sketchy.

Has anyone encountered this problem or have any ideas? For reference, I have a Mac running Mojave OS but can access a Windows machine if necessary. Thanks in advance for your advice!


#2

Have you tried using the Bioformats plugin Importer to select a specific series within the image?

You can then use the Bioformats exporter to export as a OME-TIFF:
https://docs.openmicroscopy.org/ome-model/5.6.4/ome-tiff/


#3

Thanks for the suggestion – I had tried the Bioformats Importer before, but not the Exporter. I just tried it now (Imported desired series then immediately Exported to OME-TIFF, then opened OME-TIFF) and still have the low resolution image.


#4

Was the file exported via Bioformats a lot smaller in terms of disk space than the original file?

Perhaps trying loading them with
http://santec.tudor.lu/project/dicom
and then exporting them using Bioformats Exporter.

I am also curious what the pixel size in Horos might be. By resolution, do you really mean imaging system resolution or pixel resolution? Might Horos be upsampling the image somehow? How do you export them from Horos?

If the source data is actually 256 x 128, you could try interpolating the image using splines:
http://bigwww.epfl.ch/algorithms/ijplugins/resize/

That’s interesting that Horos is open source. That makes it possible to possibly figure out why that works and not Bioformats:

Looks like it uses OsiriX to open Dicom:


#5

Update: Thanks for the suggestion to check file sizes – I think this will help narrow down the issue. I checked the original vs. exported files (via Bioformats or Horos), and the original is much larger (~20MB vs ~3MB). The exported file types I’ve tried are avi, mp4, mjpeg, nifti, and tiff (I don’t remember exactly which ones I got from Horos vs Bioformats, but I do remember the nifti file type is from a different software called MRIcro).

I then tried downloading the free trial of OsiriX but found it didn’t really give any different options than Horos (makes sense). I also tried playing with tudor but had difficulties opening it on my Mac and wanted to try other troubleshooting ideas before switching to a Windows machine.

I think there may be some promise with a different method I tried in Horos, which was to export to a DICOM and make sure that the “uncompressed” option was selected. Now the file is a .dcm (the original was Unix executable), and the file size is still at the original, larger size. However, when I tried importing with Bio-Formats, I got this error message:

java.lang.ArrayIndexOutOfBoundsException: 4369
at loci.formats.ImageTools.indexedToRGB(ImageTools.java:569)
at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:184)
at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:148)
at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:198)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:348)
at loci.formats.DimensionSwapper.openBytes(DimensionSwapper.java:249)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:348)
at loci.formats.MinMaxCalculator.openBytes(MinMaxCalculator.java:269)
at loci.formats.MinMaxCalculator.openBytes(MinMaxCalculator.java:260)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:334)
at loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:186)
at loci.plugins.in.ImagePlusReader.readProcessors(ImagePlusReader.java:422)
at loci.plugins.in.ImagePlusReader.readPlanes(ImagePlusReader.java:387)
at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:282)
at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:243)
at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:221)
at loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:116)
at loci.plugins.in.Importer.readPixels(Importer.java:149)
at loci.plugins.in.Importer.run(Importer.java:86)
at loci.plugins.LociImporter.run(LociImporter.java:78)
at ij.IJ.runUserPlugIn(IJ.java:228)
at ij.IJ.runPlugIn(IJ.java:192)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:745)

Any more thoughts with this new information? Thanks so much for your help so far, by the way.


#6

Good day!

The way you try to open the file now invokes a conversion from index color to RGB and this fails.

Not perfectly sure, but I doubt that a MRI-image is in index color format, at least not, if it is the original image data from the scanner.

Did you try to export the images from the scanner with other than the present format options/settings?

I must admit I have no experience with DICOM-images.

Regards

Herbie


#7

Hi Herbie – thanks for your input “translating” the error. Re-exporting the images from the scanner is an option, but I have some unrelated issues with accessing the scanner that make it tricky. I was hoping to find a quicker solution by converting the file types I currently have, but I’m about to switch back to the export-from-scanner option since it doesn’t seem like there’s an easy solution to the conversion problem.


#8

This looks more like a Bioformats bug more likely in the metadata processing. It might think the image is larger than it is. I believe the Bioformats support for DICOM is limited.

What is the problem with Tudor on your Mac? Are you using it as an ImageJ plugin?

Mark


#9

For Tudor, I just downloaded the zip file and then tried to open the Dicom_Viewer application, but I received an error message saying “You can’t open the application “DIcom_Viewer” because it is not supported on this type of Mac.” I’ve tried running the .exe but they also get cranky about Mac not being Windows. The only thing I can open (besides the .txt) is the .sh file, but I have no idea what to do with a shell.

I hadn’t tried loading anything into ImageJ as a plugin yet – do you think that would be a good next step or should I just switch to the Windows machine?


#10

Did you follow the instructions given here?

The

tudordicom_plugin_1.9.30.zip 19.0 MiB 2016/01/22 09:49

is easy to install in ImageJ on a Mac.

Regards

Herbie


#11

Update: at this point I’ve tried going back to the source and Tudor plugin, but neither are working for me. Anytime I load the product of a new conversion method in Fiji, it’s the same tiny low resolution image that I can’t work with.

The method I’ve decided on is to take screenshots of each slice of each scan in Horos, since that’s the only way I’ve found to display in high-resolution. I then save the images as tiff in Fiji and the plugin works well now. It’s cumbersome and time-consuming, but at least it works and I’m able to move forward with the project. My guess is that something has happened in software somewhere in the pipeline (from the MRI acquisition station to Fiji) between 2015 and now that makes this task suddenly more difficult.

Thank you everyone for your input and help with this issue.


#12

I use dicom images a lot, and have never seen that problem! With anything I’ve looked at, imagej has no problems with dicom files.

Why/how are the old studies in avi format??? avi is a movie format, not an image format.

it’s also very strange you have fiji opening them as non square images - I have never ever seen or heard of a non square MR image!

what type of MR image are they?

you could try posting (or looking at) the dicom headers to see what they way - in particular are they multi-part images. in the header you can also see what resolution the dicom file actually says it is. You can view the images in image->show info.

another option is to use the dcmtk toolkit (…google it). It will work without any problems on a mac, and gives you a bunch of tools for reading dicom files and converting to other formats