21 Oct 2019

Average interleaved data

The purpose of this python script object is to average interleaved data.

10-18-2019 1-21-10 PM

Place this file and the associated file in the [$AVIZO_ROOT]/share/python_script_objects folder. The next time you start the software, you can find and invoke the script by right clicking on a scalar field dataset and navigating to the Local/Python Scripts folder

The purpose of this python script object is to average interleaved data. Sometimes, especially with MRI DICOM data collected for DTI experiments, a time series of related images may be formatted in this way, where the letter refers to a time point and the number refers to the slice number in the data:

CN

BN

AN

...

C2

B2

A2

C1

B1

A1

C0

B0

A0

This script would take the number of time points ("# of images to average"; self.avg) and averages these data into one output like this:

AverageN

...

Average2

Average1

Average0

This is achieved using numpy from python.

To test this xtra, download the archive, unzip it and first install the pyscro script following the 'help for script' recommendation. Then load the hx project called Average_Data_ExempleProject.