Sunday, 29 December 2024

Fiji plugin to read Xradia files



This is a plugin for Fiji (ImageJ) that reads *.xrm, *.txrm, and *.txm image files (from Xradia XRM systems, in their proprietary format, a form of OLE container) and opens them as image stacks, along with a text window displaying some metadata parameters. Download and extract the .zip folder and just drop the two jar files (poi-3.7.jar and XRM_Reader.jar) onto the Fiji main window. The program will put them in the right places. Restart Fiji and you should find it under Plugins > XRM_Reader. 


This code is publicly available at this link and free for anyone to use. If you use it in a publication, please cite the Zenodo doi. 

 

Current versioncan also be found here:  https://ucloud.univie.ac.at/index.php/s/RSJ05Nb9FTViCVK




(I modified the above plugin from this one:  https://github.com/mrsutherland/XRM_Reader/releases 
bmrsutherland, 14 Nov 2017) 

---

I have also included an ImageJ macro (XRM_files_thumbnails.ijm) that makes a preview image (PNG) and metadata file (.txt) with the same filename base as each unpreviewable *.xrm, *.txrm, or *.txm image file. The script automatically processes every Xradia-format image in a directory and its subdirectories. 


This is in the ImageJ macro language and requires the XRM Thumbnails plugin, also included in the same archive. This plugin isn't meant to be run on its own, so I put XRM_Thumbnails.jar in the folder Fiji.app/plugins/Utilities, so that it does not appear in the Plugins menu, where it is confusing to see next to the XRM_Reader plugin. 

 

I put the .ijm macro in either Fiji.app/plugins/Scripts/File or Fiji.app/scripts/File, and then it appears in the File pull-down menu. 

 

This version is working pretty well, and it makes an XYZ montage for each reconstructed stack and a 0°90° mugshot for each projection series (really first and middle projection - for a 360° scan it will be front and back images; my machine didn't do full rotations). 

 

I finally figured out how to read the date/time from the txrm files, and this is now incorporated. (Fun fact: the container files *.xrm, *.txrm, or *.txm can be extracted to a bunch of hex files with 7-Zip. I opened some of these with Hex Fiend or HxD to get the format of the date entry.)




If you have questions or comments, feel free to contact me. 

 

Brian Metscher 

Vienna, Dec. 2024

 

 

>> Note that Xradia .txm files can also be opened directly in Amira 6.4 and higher (Windows), and also in Drishti (https://github.com/nci/drishti). (Also in ORS Dragonfly Pro, but not in the free Dragonfly version.)


TXM-Wizard by fmeirerliuyijin can open Xradia files also:  

          https://sourceforge.net/projects/txm-wizard/files/?source=navbar

          https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3284347/ 

 

>> Real progress toward a Python solution can be found here: https://pypi.org/project/xrmreader/

It's based on the dxchange Python code, which seems to cover the reading of the xrm container files better than the Java parser:  https://github.com/data-exchange/dxchange