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

**URL:** <https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261>\
**Category:** Development\
**Created:** [March 24, 2019, 2:23pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261 "2019-03-24T14:23:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![BhanuPetla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bhanupetla/32/3282_2.png) [@BhanuPetla](https://discourse.slicer.org/u/BhanuPetla)\
**Post date:** [March 24, 2019, 2:23pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/1 "2019-03-24T14:23:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [March 24, 2019, 2:38pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/2 "2019-03-24T14:38:54Z")

</div>

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](https://www.slicer.org/wiki/Documentation/Nightly/Developers/IO)  
[3D models module](https://github.com/Slicer/Slicer/tree/master/Modules/Loadable/Models), which is a fine example of loading 3D model data in Slicer

Edit: closing bracket

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 24, 2019, 3:58pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/3 "2019-03-24T15:58:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 24, 2019, 6:37pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/4 "2019-03-24T18:37:16Z")

</div>

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.?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 24, 2019, 9:02pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/5 "2019-03-24T21:02:39Z")

</div>

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/](https://blogs.uw.edu/maga/2018/09/importing-microct-data-from-scanco-into-slicer/)

---

<div class="post-metadata">

**Author:** ![BhanuPetla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bhanupetla/32/3282_2.png) [@BhanuPetla](https://discourse.slicer.org/u/BhanuPetla)\
**Post date:** [March 24, 2019, 10:40pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/6 "2019-03-24T22:40:43Z")

</div>

@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.

 ![Nodule%20vasculature%20model](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/8/a8be7d3e2519bdf42d07b2c2cbf2d5f239a9393c.jpeg)  
 ![54%20Vascular%20bundles](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/4/f491e05ee432392f7e81927ac1bb1898e1dc7dd3.jpeg)  
[Root nodule .AIM file](https://sdsu.box.com/s/ie5tqhv1lcxsazaqp7fdblcwvppm7tin) ![54%20PTA%202%25%20EtOH%2070%25%20NO_750-1500](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/4/24d44cea83da47db3981b00396fad132d356e489.jpeg)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 24, 2019, 10:51pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/7 "2019-03-24T22:51:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BhanuPetla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bhanupetla/32/3282_2.png) [@BhanuPetla](https://discourse.slicer.org/u/BhanuPetla)\
**Post date:** [March 24, 2019, 10:55pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/8 "2019-03-24T22:55:58Z")

</div>

Link doesn’t work. Thanks  
 ![34%20PM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/8/98e2aadc27d1ff12006f5b856540e1fa17cc2d0b.png)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 25, 2019, 12:14am UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/9 "2019-03-25T00:14:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 25, 2019, 1:34am UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/10 "2019-03-25T01:34:03Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![BhanuPetla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bhanupetla/32/3282_2.png) [@BhanuPetla](https://discourse.slicer.org/u/BhanuPetla)\
**Post date:** [March 25, 2019, 1:53am UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/11 "2019-03-25T01:53:14Z")

</div>

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](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/0/207c6893e0514f9d09ba4b701f094dadaf80f923.png)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 25, 2019, 5:30am UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/12 "2019-03-25T05:30:17Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 25, 2019, 3:50pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/13 "2019-03-25T15:50:42Z")

</div>

There is an [ITK reader for Scanco isq/rsq/rad/aim files](https://github.com/KitwareMedical/ITKIOScanco), 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](http://www.scanco.ch/en/support/customer-login/faq-customers/faq-customers-import-export.html). Have you tried to export in DICOM format and load that into Slicer?

In the meantime, you can use @nagy.attila’s [RawImageGuess module](https://github.com/lassoan/SlicerRawImageGuess) (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](https://1drv.ms/u/s!Arm_AFxB9yqHt5BnNqgDzRCtUv86oQ) 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](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/a/1a13dab897d1bf1c5b39d4c81aa770afee6d8f67.png)

---

<div class="post-metadata">

**Author:** ![BhanuPetla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bhanupetla/32/3282_2.png) [@BhanuPetla](https://discourse.slicer.org/u/BhanuPetla)\
**Post date:** [March 29, 2019, 11:03pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/14 "2019-03-29T23:03:47Z")

</div>

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](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/b/ab91da13ed147bc57c6450f19ac424b84bab3dc9.jpeg)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 30, 2019, 12:27am UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/15 "2019-03-30T00:27:27Z")

</div>

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](https://www.slicer.org/wiki/Documentation/Nightly/Modules/CropVolume) module to select a subset and/or resample your data.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 30, 2019, 3:43am UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/16 "2019-03-30T03:43:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BhanuPetla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bhanupetla/32/3282_2.png) [@BhanuPetla](https://discourse.slicer.org/u/BhanuPetla)\
**Post date:** [March 30, 2019, 2:22pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/17 "2019-03-30T14:22:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 30, 2019, 4:31pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/18 "2019-03-30T16:31:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![BhanuPetla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bhanupetla/32/3282_2.png) [@BhanuPetla](https://discourse.slicer.org/u/BhanuPetla)\
**Post date:** [March 30, 2019, 5:08pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/19 "2019-03-30T17:08:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 30, 2019, 5:17pm UTC](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261/20 "2019-03-30T17:17:20Z")

</div>

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/](https://slicermorph.github.io/2019_Summer_Workshop/)

[Next page](https://discourse.slicer.org/t/support-for-aim-isq-files-generated-on-scanco-microct/6261.md?page=2)
