Support for .AIM/.isq files generated on Scanco microCT

I might be the odd one out here working on plants. I am new to Slicer and trying to use Scanco microCT 50 for scanning my plant root samples. Would like to know if you are planning to give support for direct import of .AIM/other formats that Scanco imagers generate.

Very cool.

I’m not sure if you’re familiar with open-source projects, but support is usually given by the people who need a particular feature. You’re correct that we don’t have a lot of people using Slicer for plants, but there could be a lot of useful tools for image analysis here for you.

With regards to file loading support, your two options are to ask the community to implement it for you (someone might say yes, more likely if you can provide a document describing the file format, or any other libraries that already load the file), or to implement it yourself, with the community’s help (you’ll find lots of development support here).

If you’re interested in having a go at it yourself, this is a good start
IO in Slicer
3D models module, which is a fine example of loading 3D model data in Slicer

Edit: closing bracket

2 Likes

Hi @BhanuPetla - I’ll second what @adamrankin said, and just add that you might also get some help if in addition to documentation you could share some cool example data for people to experiment with.

2 Likes

There are many options to build a workflow where you annotate and analyze CT images.

Most often you just acquire images there and then later annotate the images in other software. Do you annotate images on the scanner console? What other software do you use for visualization, annotation, and analysis?

What kind of annotations do you use (points, lines, curves, angles, 3D segmentations, …)?

What would you like to do with the annotations? Just show them, or also edit them, analyze them, compute metrics, etc.?

2 Likes

We might eventually provide a more convenient way to do the import, meanwhile you can look at my tutorial on how to use the metadata from .aim to write a slicer compatible header (.NHDR) and import load it into Slicer:
https://blogs.uw.edu/maga/2018/09/importing-microct-data-from-scanco-into-slicer/

1 Like

@adamrankin @pieper @lassoan @muratmaga Thank you for all your responses and suggestions. I am a plant molecular biologist, very new to CT imaging and have absolutely no experience with coding.

@lassoan Our goal is to trace the vascular bundles (pointed with green arrows) in soybean root nodules, look at their organization and be able to quantify their distribution (area, volume, etc) and branching patterns. We would like to then compare these with the mutants and quantify the differences.

The scanner is located off campus and we decided to use Slicer for feature extraction and constructing vascular models. We are still working on the workflow for quantification. Any suggestions are welcome.
We are installed Linux version of Slicer on visualization node running Centos 7.

@muratmaga I could not access the sample files on the box folder. Can you make them available?

I have included a link to AIM file and a few sample pictures.


54%20Vascular%20bundles
Root nodule .AIM file 54%20PTA%202%25%20EtOH%2070%25%20NO_750-1500

Link must have expired. Try this one. I will update the link later.
https://app.box.com/s/6hee33dgmqp7l4o9k96mk5w7yogaoul6

1 Like

Link doesn’t work. Thanks
34%20PM

Ok. There is something wrong with sharing options.
You really don’t need the files. What you need is the xyz dimension, voxel spacing, data type and the byteskip fields from the log file.

I dont use scanco. In a sample a collaborator provided, there is a section just before Processing Log section that contains all relevant information. See below.

Image data starts at byte offset: 3196
!-------------------------------------------------------------------------------
Volume                        PERCIVAL_370.AIM                                  
AIM Version                                    1.6
!
dim                                  622     642    1085
off                                    0       0       0
pos                                  150     212       4
element size in mm                0.0200  0.0200  0.0200
phys dim in mm                   12.4400 12.8400 21.7000
!
Type of data                        short (16 bit)
!-------------------------------------------------------------------------------
!
! Processing Log
!
!-------------------------------------------------------------------------------
Created by                    ISQ_TO_AIM (IPL)                                  
Time                           9-JAN-2018 09:25:49.87                           
Original file                 dk0:[microct.data.00002195.00006898]c0012945.isq; 
Original Creation-Date         8-JAN-2018 15:07:57.39                           
Orig-ISQ-Dim-p                                   1024       1024       1126
Orig-ISQ-Dim-um                                 20480      20480      22520
!-------------------------------------------------------------------------------
Patient Name                  Percival_370                                      
Index Patient                                    2195
Index Measurement                                6898
!-------------------------------------------------------------------------------
Site                                                4
Scanner ID                                       4241
Scanner type                                       10
Position Slice 1 [um]                           52685
No. samples                                      1024
No. projections per 180                           500
Scan Distance [um]                              20480
Integration time [us]                          300000
Reference line [um]                             52685
Reconstruction-Alg.                                 3
Energy [V]                                      55000
Intensity [uA]                                    145
Angle-Offset [mdeg]                                 0
Default-Eval                                     2060
!-------------------------------------------------------------------------------
Mu_Scaling                                       4096
Calibration Data              55 kV, 1200 mg HA/ccm BH-corr, Scaling 4096
1 Like

I could not run nrrd file in slicer. Can you give me some more pointers for generating .nrrd file? I am including screenshots of AIM file and NRRD file. Can you point me where to get voxel data, data type and byteskip from this? Thank you so much.

My AIM files do not have that data.
I will generate them again and see if this is resolved.

nrrd aim%20file

Looks like something is different between these two log files. Since I don’t have access to a Scanco system, I cannot help you any further. But if you figure it out, please post it here, as it may help other people in future.

As a temporary solution, I think bioformats has some support for .aim format (https://docs.openmicroscopy.org/bio-formats/5.9.2/formats/aim.html). You might be able to use Fiji and then save it as a nrrd, which will work with Slicer. Although figuring out why those fields in the metadata is missing might be a better overall solution.

There is an ITK reader for Scanco isq/rsq/rad/aim files, which should be quite easy to enable in Slicer. @jcfr can you confirm?

According to Scanco’s website, you can also export images in DICOM format. Have you tried to export in DICOM format and load that into Slicer?

In the meantime, you can use @nagy.attila’s RawImageGuess module (not in the Extension manager yet, you need to download and add to module paths manually) to find out image parameters by trial and error. Once you learn what to look for, it takes a only few minutes to determine parameters for any image. It generated this NRRD header file for your data set. If you place this file into the same folder as your C0000156.AIM data file then you can load the image by drag-and-dropping C0000156.nhdr file into Slicer.

image

3 Likes

I was able to load dicom files on Slicer for my data set. But could not do much as the files are too big. I am running slicer on linux, Centos 7, with 188Gb RAM and 100Gb swap. When I try volume rendering, slicer uses up all the memory and swap and crashes. Is there a workaround for this? My dicom stack is 71Gb in size. Is there a way to load a subset of slices? I got following error message.
I couldn’t instal the RawImageGuess module following the instructions.

Thank you all for your responses!

03%20PM 37%20PM

Yes, the std::bad_alloc message means you ran out of memory (usually you need several times more available memory than the size of your volume). You can use the CropVolume module to select a subset and/or resample your data.

While I crop volume can help, I think a general purpose import time data reduction method would be a useful feature to have in Slicer. Not just for dicom, but for all supported image stacks and volume formats.
@smrolfe was testing a prototype type for image sequences but performance was a bit slow.

It couldn’t complete crop volume either. Is there a way to reduce the file size? AIM file is 700Mb.

There is a disconnect here. I thought you are trying to load the AIM file from scanco. If that’s 700MB, then that should perfectly fine with the method @lassoan suggested. You should be able to do everything you need to do with your system.
Where is the 71GB dicom stack coming from, is that a separate dataset? Or 700MB aim file becomes 71GB when you convert it to a dicom from their format?

sorry for the confusion! I could not load AIM file to slicer, because of the missing information in AIM file (parameters before the processing log). Using Scanco program I generated DICOM stack which is 71Gb from AIM file (700Mb).

I couldn’t instal the RawImageGuess module following the instructions.

that is a 100X difference in volume size, which is hard to explain, unless you are setting a volume of interest during the generation of AIM file but not during the DICOM export.

There is really not much in the way of install RawImageGuess. You either clone the repository, or if you don’t know what that means click the green download button and choose as the ZIP file option. Then uncompress the zip file to folder and add that to the slicer modules path (Edit-> Application Settings-> Modules)

We are organizing a week-long workshop on using 3D Slicer in context of biological research in late August. It is free, you may want to consider attending it. You can find more information at https://slicermorph.github.io/2019_Summer_Workshop/