List of my modules...
Script Module: Load_Reconstructions
Description:
Loads the result of a reconstruction, i.e. a stack of reconstructed slices, into a 3D object either directly in Avizo, or, historically, into a raw file.
For the latter, it also creates a hx file for easily loading the volume in Avizo (as a Raw as External data, i.e. doesn't load it in RAM). Both files (raw and hx) are created in the directory where the slices are.
The module can handle reconstructions from different softwares:
- NRecon (Bruker) generates bmp, tif, png, or jpg files, along with a log file. The module should find the image dimensions and pixel size automatically, respectively from the header in the image file and from the log file.
- DigiXCT (Digisens) generates raw files and an *export.html file, which allows to automatically find the image dimensions and number of rectructed images.
- Other assumes jpg files are created. The image dimensions are found in the jpg headers.
Notes:
- For loading the data into a file, each slice is loaded in RAM, stacked, and removed from RAM, meaning that you need only a minimal amount of free memory, so you can do this on any machine.
- For NRecon reconstructions, simply stacking the reconstructed cross-sections will create a 3D mirror image. To resolve this and still keep the upwards Z-axis, the Y-axis is flipped before stacking. This mirroring has only been verified for the Skyscan/NRecon system. For the other systems, check your data to make sure!
Connections:
Ports:
Software

Select the source of the reconstructions. Each software creates different formats and different log files.
Files

Select one on the reconstructed images (any image) in this port. The file format to choose from will depend on the reconstruction software chosen.
Dimensions

Dimensions of the images. This should fill in correctly and automatically in all handled cases, i.e. those mentioned in the description above.
Pixel_Size

Specifies the pixel size of the reconstruction. This plays absolutely no role in the creation of the raw file (since it contains only the raw data), but does in the hx file, in order to load it in Avizo with the correct size.
Output

Computer used to have less RAM, so loading the whole raw reconstruction was usually impractical. So instead of directly stacking and loading the reconstruction as a HxUniformField3 object in Avizo (the second option), you can choose to create a raw file on disk without having to load the whole thing.
Options

If the file output is selected, some simple procedure to reduce data size can be directly applied during the stacking, namely cropping and scaling the pixel values (resulting in a 8-bit data type).
Scale

If Scale is ticked in the Options port, in practice, applies the HxCastField module on the input, the output being 8-bit.
Crop_X

If Crop is ticked, specifies the lower and upper bound in the X direction to crop each slice.
Crop_Y

If Crop is ticked, specifies the lower and upper bound in the Y direction to crop each slice.
Compute

Push this button to start the stacking.
The output datatype will depend on the parameters:
- If scaling is performed, the output will always be in 8 bits.
- If no scaling and input is NRecon tif files, then output is little endian unsigned 16 bits.
- If no scaling and input is DigiXCT raw files, then output is little endian 32-bit floats.
Commands:
Additional options can be accessed when typing in the console Load_Reconstructions COMMAND_NAME.
create
Runs the computation. Returns the name of the output, so it can be used in a script, such as set RESULT [Load_Reconstructions create].
verbose
Displays additional information.