Editing
Scanco Administration
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Data Export= Often collaborators or users may need to access their image data using other tools. The challenge is that the format for RSQ, ISQ and AIM files are proprietary. However, we have some options that can be useful. Most frequently people want the raw image data, and that is most efficiently offered as an AIM file. The ISQ file often includes extra space around the image of interest and results in very large files. Cutting an AIM file from the ISQ is much more efficient and provides the data of interest while minimizing disk space. An AIM file is typically stored as 'short' or 'char'. The 'short' is the raw image data and the 'char' is segmented data. An AIM containing 'short' data is not compressed, so it is easier to read by third-party tools. The AIM containing 'char' is stored as a compressed file (run-length-encoded) by default, and is not as easy to read by third-party software. The exception is using the built-in AIM reader that made available through the publicly available Bonelab git repository (https://github.com/Bonelab/Bonelab). You can force a 'char' file to not be stored as a compressed file using IPL. The following example shows how to read in a compressed file and save it as uncompressed: <pre> ipl> read in VITD_SUB.AIM /read -name in -filename VITD_SUB.AIM !> Reading AimVersion020 !> Image size after D1charCmp (run-length) uncompression will be: !> Type of data Char 1 byte/voxel !> Total memory size 410.2 Kbyte !% /read completed: CPU: 00:00.01 ELAP: 00:00.01 ipl> write in VITD_SUB.AIM -compress_type [bin] > none -version_020 [true] > /write_v020 -name in -filename VITD_SUB.AIM -compress_type none -version_020 true !> Writing AimVersion020 requested... approved. !> Total size on disk: 425.0 Kbyte !% /write_v020 completed: CPU: 00:00.00 ELAP: 00:00.04 </pre> Note that the file size of the uncompressed file is larger than the compressed file, as you would expect: <pre> Uncompressed: VITD_SUB.AIM 425KB Compressed: VITD_SUB.AIM 70KB </pre> ==DICOM== To convert aim files to DICOM using IPL interactively, first use /read to read in the AIM file, then /todicom_from_aim to convert them to a DICOM format, then exit. The DICOM files will be saved in the same directory as the original AIM file. /read -name [in] > -filename [default_file_name] > SAMPLE_1.AIM /todicom_from_aim -aim_name [in] > -dicom_filename [default_file_name] > SAMPLE_1.dcm -multifiles [true] > -global_slicename [false] > Next ftp the DICOM series to your local computer using either the command line or FileZilla, making sure to transfer them in a Binary format. Before opening it on your local computer make sure to scrub the file extensions if you have no already done so in the file transfer. Open the .dcm files using an image reader for example ITKSnap or HOROS. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ==ImageJ== There is a plugin to read AIM ISQ RSQ files. ImageJ (<code>https://imagej.nih.gov/ij/</code>) is good for Viewing, Converting, and Custom Analyses on Scanco images after installing the following plugin and importing AIM, ISQ, and RSQ files. *AIM Reader v1.02, reads uncompressed (short) AIM files v020, sets scale and calibration *ISQ Reader v1.01, reads ISQ files, sets scale *RSQ Reader v1.01, reads RSQ files, sets scale You can obtain the <code>ImageJ_Plugins_SCANCO_Files.zip</code> from <code>BoydDrive:\\04 - Resources\04 - Software\ImageJ_Plugin</code>. Feel free to share this with others. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ==BoneJ== This is a useful tool used by many to read in images and perform image processing. We don't use it much in the Bone Imaging Lab, but it's important to others. It can be downloaded here: https://bonej.org To read in a sample file, say <code>MYFILE.AIM</code>, you would need to ensure that the file is <b>not</b> compressed. Running <code>aix</code> is a quick way to check if it's compressed. The <code>BinCmp</code> means that the data is compressed, but other types such as <code>short</code> or <code>char</code> are OK. This file is an example of something that cannot be read by BoneJ until you convert it to being uncompressed using IPL first: <pre> !------------------------------------------------------------------------------- !> Volume myfile.aim !> AIM Version 1.6 !> !> dim 100 100 100 !> off 0 0 0 !> pos 0 0 0 !> element size in mm 1.0000 1.0000 1.0000 !> phys dim in mm 100.0000 100.0000 100.0000 !> !> Type of data BinCmp 1 byte/voxel !> Total memory size 976.6 Kbyte !------------------------------------------------------------------------------- </pre> Here is an example of a file that <b>can</b> be read by BoneJ: <pre> !------------------------------------------------------------------------------- !> Volume myfile.aim !> AIM Version 1.6 !> !> dim 50 50 168 !> off 0 0 0 !> pos 1427 850 0 !> element size in mm 0.0607 0.0607 0.0607 !> phys dim in mm 3.0350 3.0350 10.1970 !> !> Type of data Char 1 byte/voxel !> Total memory size 410.2 Kbyte !------------------------------------------------------------------------------- </pre> In addition to providing the AIM file, you need to create a text file that shows the person information about the file. Do that using <code>aix</code> as follows on VMS: <pre> $ fda/output= MYFILE.TXT aix MYFILE.AIM </pre> This will store the following information in <code>MYFILE.TXT</code>: <pre> !% Image Data starts at byte offset 15202 !> Reading AimVersion020 !------------------------------------------------------------------------------- !> Volume myfile.aim !> AIM Version 1.6 !> !> dim 50 50 168 !> off 0 0 0 !> pos 1427 850 0 !> element size in mm 0.0607 0.0607 0.0607 !> phys dim in mm 3.0350 3.0350 10.1970 !> !> Type of data Char 1 byte/voxel !> Total memory size 410.2 Kbyte !------------------------------------------------------------------------------- </pre> Now save that information in a text file called <code>MYFILE.TXT</code> and provide it along with the original AIM file <code>MYFILE.AIM</code> to the person. In BoneJ, select <code>File -> Import -> Raw</code> and using the information in <code>MYFILE.TXT</code> select the parameters for the input. Done! [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']] ==Bonelab Git Repository== You can download the repository from here: <code>https://github.com/Bonelab/Bonelab</code> *Read the README.md file and follow instructions to install it (MacOS, Windows, Linux). *Once installed, look at some examples in the <code>Bonelab > bonelab > cli</code> directory on how you could write your own python script to manipulate AIM files. For example, the python script <code>aix.py</code> is an example that reads an AIM file. [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']]
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information