Skip to content
/ FALCON Public
forked from ENHANCE-PET/FALCON

FALCON is a Python-based software application designed to facilitate PET motion correction, both for head and total-body scans. Our program is built around the fast 'greedy' registration toolkit, which serves as the registration engine. With FALCON, users can enjoy a streamlined experience for implementing motion correction.

License

Notifications You must be signed in to change notification settings

Keyn34/FALCON

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦… About FALCON

Shows an illustrated MOOSE story board adopted to different themes

FALCON (Fast Algorithms for motion correction) is a powerful and fully-automatic tool for motion correction in dynamic total-body or whole-body PET imaging. It is designed to be flexible and reliable for a wide range of applications, regardless of vendor, tracer, or organ.

We are pleased to announce that FALCON is free for academic use, making it an accessible and valuable resource for researchers and clinicians alike. With cutting-edge algorithms and minimal user input, FALCON improves the quality of PET images and delivers clearer, more reliable results even in challenging imaging scenarios.

Built on top of the fast and efficient greedy registration toolkit, FALCON is easily integrated into existing workflows and an essential tool for anyone working with dynamic brain, total-body or whole-body PET imaging. If you appreciate the work we've put into FALCON, please consider leaving a star on our GitHub repository. Your feedback and support are greatly appreciated.

Whether you're working in research, clinical care, or industry, FALCON is the ideal choice for motion correction in dynamic total-body or whole-body PET imaging. Try it today and experience the benefits of state-of-the-art image processing technology.

We would love to know how you are utilizing FALCON for your academic work. Please feel free to share your use-cases and feedback with us in the discussions section of our GitHub repository here!

πŸ₯ Commercial availability

We are thrilled to announce that a CE-certified commercial version of FALCON is currently under development. If you are interested in leveraging the advanced capabilities of this state-of-the-art technology, we cordially invite you to reach out to us. Please send us an email at [email protected] to learn more about this exciting opportunity. We cannot wait to hear from you and collaborate on your next project.

πŸš€ FALCON's motion correction in action

Shows an illustrated MOOSE story board adopted to different themes

In this analysis, we are examining the mean image of 20 dynamic frames of a 68Ga-PSMA study both before and after motion correction. By comparing the two mean images, we can clearly see the significant improvement that results from motion correction. The mean image after motion correction appears noticeably sharper and more defined than the one before correction.

⛔️ Hard requirements

To run FALCON, you'll need a system running Linux OS (e.g.Ubuntu 20.04.4 LTS), with Python version 3.8 or higher installed. There are no special hardware requirements for running FALCON, but we recommend using a system with at least 16 GB of RAM and a modern CPU to achieve optimal performance. The speed of FALCON increases with the number of CPU cores, as the greedy registration library effectively uses all the available cores.

We're also working on a pip package and also adding support for macOS (both ARM and Intel) and Windows. Stay tuned for updates on these platforms.

If you have any questions or concerns about hardware or software compatibility, please don't hesitate to contact us. We're here to help ensure that you get the most out of FALCON, no matter what platform you're using.

βš™οΈ Installation

To install FALCON on Ubuntu, ensure that your system meets the software and hardware requirements (see the "Hardware Requirements" section above) and follow these simple steps:

1.) Open a terminal and run the following command to ensure that Git is configured correctly:

sudo git config --global url."https://".insteadOf git://

2.) Clone the FALCON repository from GitHub by running the following command:

git clone https://github.com/Keyn34/FALCON.git

3.) Navigate to the FALCON directory:

cd FALCON

4.) Run the FALCON installer script to set up the necessary dependencies:

sudo bash falcon_installer.sh

Note: If you already have read/write access, you don't need to use sudo.

The entire installation process should take approximately 3-5 minutes. Once the installation is complete, you can start using FALCON to perform motion correction in your dynamic total-body or whole-body PET images.

If you encounter any issues during the installation process, please don't hesitate to contact us for assistance. We're here to help ensure that you can use FALCON effectively and efficiently.

πŸ–₯ Usage

FALCON supports DICOM, Nifti, Analyze, and Metaimage file formats, whether it's a single 4D image or multiple 3D images. Simply specify the directory where the files are located and indicate the registration type. FALCON will take care of the rest.

  • To use FALCON, use the following syntax:
falcon -m path_to_4d_images -r <rigid | affine | deformable> -i <number_of_iterations_per_level> -sf <starting_frame_from_which_moco_should_be_performed> -rf <reference_frame>
  • To use FALCON cardiac, use the following syntax:
falcon-cardiac -rfd path_to_reference_frames -sfd path_to_sequence_frames -gi gate_index_for_reference_frames -r <rigid | affine | deformable> -i <number_of_iterations_per_level>
  • Here's an example of using FALCON in Pro mode:
falcon -m /Documents/Sub001 -r deformable -i 100x50x25 -sf 0 -rf -1 # -1 indicates the last frame of the series

In the example above, FALCON is performing deformable registration with 100, 50, and 25 iterations at each level of the multi-scale registration. The registration will start from the 1st frame and use the last frame as the reference.

  • Here's an example of using FALCON in lazy mode:
falcon -m /Documents/Sub001 -r deformable # for whole-body registration
falcon -m /Documents/Sub001 -r rigid # for brain only studies (much faster processing)

As you can see from above, you don't need to specify a lot of additional parameters. The rest of the parameters are either inferred or set automatically based on common standards.

  • Here's an example of using FALCON cardiac:
falcon-cardiac -rfd /Documents/Sub001/reference_frames -sfd /Documents/Sub001/sequence_frames -gi 4

-gi uses a 1-based indexing, so -gi 4 will use the fourth frame in the specified -rfd directory.

⚠️ Note

If you are not happy with the 'inferred' start frame, you can always set it on your own (we have set the internal threshold to be quite safe). Refer manuscript for more information.

  • If you need help with FALCON or want to review the command line options, you can use the following command:
falcon --help

Please note that the number of iterations is specified as a string of values seperated by 'x' in the -i option. For example, to perform 50 iterations at each level, you would use -i 50x50x50.

πŸ—‚ Required folder structure

FALCON only requires the dynamic PET images of a subject. Once the path is set, along with the minimalistic arguments, FALCON takes care of the rest.

Here's an example of the required folder structure:

└── PET_WB_DYNAMIC_(QC)_0005  # Main folder containing the dynamic PET images to motion correct
    └── XXX.dcm or XXX.ima or XXX.mha or XXX.nii.gz or XXX.img/hdr # The input images can be DICOM, Nifti, Analyze, or Metaimage files (and can be either a single 4D image or multiple 3D images)
        

In the example above, the main folder contains the dynamic PET images to be motion corrected. The input images can be DICOM, Nifti, Analyze, or Metaimage files, and they can be either a single 4D image or multiple 3D images.

πŸ“ˆ Results

At present, FALCON splits the motion-corrected images into Nifti files (.nii.gz). Work is currently underway to convert the motion-corrected images to their original file formats. The motion-corrected images will be stored in dynamic_pet_folder/nifti/split3d/moco.

Here's an example of the resulting folder structure:

└── PET_WB_DYNAMIC_(QC)_0005 # Main folder containing the dynamic PET images to motion correct
    β”œβ”€β”€ XX.dcm or XXX.ima or XXX.mha # Input images to motion correct
    β”œβ”€β”€ nifti # If the input images are non-Nifti, they will be converted to Nifti and stored here
        └── split3d # The 4D Nifti file will be split into 3D Nifti files and stored here for easy processing
            └── moco # All the motion-corrected images will be stored here
                β”œβ”€β”€ 4d-moco.nii.gz # Motion-corrected images combined into a single 4D image
                β”œβ”€β”€ moco-vol0000.nii.gz # Individual motion-corrected images are found here
                β”œβ”€β”€ moco-vol0001.nii.gz
                β”œβ”€β”€ moco-vol0002.nii.gz
                β”œβ”€β”€ ...
                β”œβ”€β”€ moco-vol000x.nii.gz
                └── transform # All the rigid/affine (*.mat) files and (*warp.nii.gz) files will be stored here
                    β”œβ”€β”€ vol0000.nii.gz_affine.mat
                    β”œβ”€β”€ vol0000.nii.gz_inverse_warp.nii.gz
                    β”œβ”€β”€ vol0000.nii.gz_warp.nii.gz
                    β”œβ”€β”€ vol0001.nii.gz_affine.mat
                    β”œβ”€β”€ vol0001.nii.gz_inverse_warp.nii.gz
                    β”œβ”€β”€ vol0001.nii.gz_warp.nii.gz
                    β”œβ”€β”€ vol0002.nii.gz_affine.mat
                    β”œβ”€β”€ vol0002.nii.gz_inverse_warp.nii.gz
                    β”œβ”€β”€ vol0002.nii.gz_warp.nii.gz
                    β”œβ”€β”€ ...
                    β”œβ”€β”€ vol000x.nii.gz_affine.mat
                    β”œβ”€β”€ vol000x.nii.gz_inverse_warp.nii.gz
                    └── vol000x.nii.gz_warp.nii.gz

In the example above, the resulting folder structure shows the main folder containing the dynamic PET images that have been motion corrected. The input images can be DICOM, Nifti, Analyze, or Metaimage files. If the input images are not Nifti, they will be converted to Nifti and stored in the "nifti" folder. The 4D Nifti file will be split into 3D Nifti files and stored in the "split3d" folder, with the motion-corrected images being stored in the "moco" folder. The individual motion-corrected images are stored in Nifti format, and the rigid/affine (*.mat) and (*warp.nii.gz) files will be stored in the "transform" folder.

❀️ Citations

If you find our work useful, kindly cite the following articles!

Total-body studies evaluation (FALCON)

Lalith Kumar Shiyam Sundar, Martin Lyngby Lassen, Sebastain Gutschmayer, Daria Ferrara, anna calabro, Josef Yu, Killian Kluge, Yiran Wang, lorenzo Nardo, Phillip Hasbak, Andreas Kjaer, Yasser Abdelhafez, Guobao Wang, Simon R. Cherry, Benjamin A. Spencer, Ramsey Derek Badawi, Thomas Beyer, and Otto Muzik 
β€œ Fully-automated, fast motion correction of dynamic whole and total-body PET/CT imaging studies, Accepted JNM 2023"

Brain studies evaluation (FALCON)

Gutschmayer S, Muzik O, Chalampalakis Z, et al. A scale space theory based motion correction approach for dynamic PET brain imaging studies. Frontiers in Physics. 2022;10:1034783.

Greedy registration

Venet L, Pati S, Feldman MD, Nasrallah MP, Yushkevich P, Bakas S. Accurate and Robust Alignment of Differently Stained Histologic Images Based on Greedy Diffeomorphic Registration. Appl Sci. 2021;11.

🎦 Videos

πŸ™πŸ½ Acknowledgements

πŸ›  To do

πŸ¦… FALCON: An ENHANCE-PET project

Above image generated by dall-e

About

FALCON is a Python-based software application designed to facilitate PET motion correction, both for head and total-body scans. Our program is built around the fast 'greedy' registration toolkit, which serves as the registration engine. With FALCON, users can enjoy a streamlined experience for implementing motion correction.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.2%
  • Shell 5.1%
  • Dockerfile 0.7%