Category: Internal
While online reconstructions using Gadgetron are always managed via FIRE on the scanner, offline retroreconstruction can be completed through either FIRE at the scanner or from a personal computer. Both approaches are covered below.
Retrorecons at the Scanner
Retrorecons can be run via a single click while at the scanner console, as long as the raw data from your scan session is still present on the Host machine’s local storage database. In order to run a reconstruction using the same settings used during the online reconstruction, open the “Job” window and select the raw dataset you’d like to reconstruct:
(add image/screenshot)
Click the “retroreconstruction” button on the right side of the dataset list entry, and allow the reconstruction to finish processing. Your images will be returned to the scanner console within the same subject registration entry as the initial scan, with the addition of an “RR” tag added to the scan name.
Retrorecons from Your Computer
In order to run a retroreconstruction from your computer, you will need the following software tools:
- Azure CLI: Azure CLI client for authentication to the cluster
- Kubectl: Kubernetes CLI client for interacting with the cluster
To run a reconstruction, you will need to provide an .mrd/.h5 dataset from the scan session. If you have a Siemens .dat raw data file, you will need to convert the .dat file into a .mrd/.h5 file using the siemens_to_ismrmrd tool and the appropriate .xsl stylesheet for your acquisition/reconstruction. The conversion tool is available within the Gadgetron conda environment or within most Gadgetron Docker images.
We’ll use the conda environment for our conversion as well as for our connection to the cluster. First, set up a gadgetron conda environment per the Gadgetron user guide. Then, activate the conda environment within the directory containing your .dat file and .xsl stylesheet and run the following command:
siemens_to_ismrmrd -Z -f {.dat file path} -x {.xsl stylesheet path} -o {output file path}
Once you have your .mrd/.h5 file prepared, open a new terminal and connect to your kubernetes cluster via the Authentication commands provided in Connect section of the cluster’s Azure portal:
Once you are authenticated to the cluster, you can check for existing pods via:
kubectl get pods
I’ll be running my retrorecons on the “newshift-oot-gadgetron” installation instance. In order to run the reconstruction, we need to port-forward the SSH connection from the remote cluster to a local port on our machine using kubectl. The following command maps our local port 9002 to the remote port 9002 on the cluster pod instance:
kubectl port-forward svc/newshift-oot-gadgetron 9002:9002
We can now communicate with our remote Gadgetron instance. Within the conda environment we set up earlier, we can now run the Gadgetron ISMRMRD client to execute a reconstruction:
gadgetron_ismrmrd_client -f {.mrd dataset path} -c {Gadgetron pipeline XML name} -o {output path}
Start the reconstruction process and wait. Note that this may take a while depending on network speed, SSH capability, and dataset size:
In case your reconstruction fails or freezes, you can restart the Gadgetron pod via:
kubectl rollout restart deployment {deployment name}
Once the reconstruction is complete, our reconstructed data will be in the output .mrd/.h5 file, and can be viewed in HDFView or Matlab: