Overview
Forum
Mango
iMango
Papaya
Multi-image Analysis GUI
Board Index
Register
Login
Logout
Settings

Java Array Out of Bounds Error Resizing a DICOM Image Volume

Questions or comments about Mango, webMango, iMango or Papaya.

Moderator: Michael Martinez

Java Array Out of Bounds Error Resizing a DICOM Image Volume

Postby haleba » Mon Jul 09, 2018 6:05 pm

I'm new to using DICOM and imaging and Mango is my "goto" DICOM viewer because it is the most accurate at loading my images in the correct orientation: left is left and right is right etc. without a fault and has some very nice measurement tools.

But I can't figure out how to use it to "slice out" data, in 3D in particular, and am in the process of learning dedicated 3D segmentation tools, currently Seg3D and Slicer.

But the DICOM MRI files have to be resliced into isotropic voxels in order to use the other tools' superior 3D rendering and I trust Mango for this because it is fairly "bulletproof", but had an issue with a chest MRI where Mango would appear to be processing and then fail with most of the Image Viewer menu items greyed-out and no sign of an output file.

Perhaps there is a volume issue: this is 512x512x63 voxels going to (on a modest second attempt) 512x512x126 and I had no issues earlier reslicing a 512x512x30 knee MRI to unit voxels.

Fortunately, I thought to use the console feature, which showed a Java error, and the Mango log gave more detail:

Code: Select all
mango console ---------------

Mango: 4.0.1-b1510 (64-bit)
Java: 1.7.0_80 (64-bit) Oracle Corporation [C:\Program Files\Mango\jre7]
OS: WINDOWS 8.1 6.3
Platform: x86_64

Image [MRI Chest Without ContrastSAG T2 F/S] loaded
Error: edu.uthscsa.ric.volume.Volume.doFitPrecision(Volume.java:3132) [63]


mango.log --------------------

ERROR 09 Jul 2018 17:55:43 AWT-EventQueue-0 edu.uthscsa.ric.volume.Volume.doFitPrecision(Volume.java:3132)
java.lang.ArrayIndexOutOfBoundsException: 63
   at edu.uthscsa.ric.volume.Volume.doFitPrecision(Volume.java:3132)
   at edu.uthscsa.ric.volume.Volume.writeFilesAs(Volume.java:2828)
   at edu.uthscsa.ric.mango.viewerslice.SliceViewer.saveImageAs(SliceViewer.java:7503)
   at edu.uthscsa.ric.mango.viewerslice.SliceViewer$48.run(SliceViewer.java:10811)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$300(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
INFO 09 Jul 2018 17:56:09 AWT-EventQueue-0 Image [MRI Chest Without ContrastSAG T2 F/S] closed
INFO 09 Jul 2018 17:56:50 AWT-EventQueue-0 Mango: 4.0.1-b1510 (64-bit)
INFO 09 Jul 2018 17:56:50 AWT-EventQueue-0 Java: 1.7.0_80 (64-bit) Oracle Corporation [C:\Program Files\Mango\jre7]
INFO 09 Jul 2018 17:56:50 AWT-EventQueue-0 OS: WINDOWS 8.1 6.3
INFO 09 Jul 2018 17:56:50 AWT-EventQueue-0 Platform: x86_64
INFO 09 Jul 2018 17:56:50 AWT-EventQueue-0
INFO 09 Jul 2018 17:58:03 AWT-EventQueue-0 Image [MRI Chest Without ContrastSAG T2 F/S] loaded


(the last image load is for the successfully resliced NIFTI output file)

I was finally able to work around this by faultlessly resizing to NIFTI, and I then was able to then save it in DICOM format without errors.

The NIFTI reslice used exactly the same parameters as the DICOM reslice attempt.
haleba
 
Posts: 3
Joined: Fri Jul 06, 2018 9:36 pm

Re: Java Array Out of Bounds Error Resizing a DICOM Image Vo

Postby admin » Sun Jul 29, 2018 5:17 pm

The error points to a line of code that's expecting data scale intercepts. This looks like a reslicing bug dealing specifically with DICOM data. I'll look into this.

The best workaround for now is to first convert it to NIFTI, but it looks like you've already figured that out. Let me know if you encounter any more issues.
admin
Site Admin
 
Posts: 77
Joined: Fri Jul 06, 2007 8:18 am
Location: Research Imaging Center


Return to Mango

Who is online

Users browsing this forum: No registered users and 1 guest

cron