Biologically-motivated normalization techniques
The module bio_intensity_norm implements three biologically-motivated normalization techniques:
- The fat-based normalization method
- The muscle-based normalization method
- The single tissue (fat or muscle) piece-wise normalization method
The input of the module is a path with the raw unnormalized images and the output is the normalized images, which are saved to a path specified by the user.
In the module, the N4ITK bias field correction method is applied to the image to create images free from artefacts and identify the fat or the muscle tissue, before applying each one of the available intensity normalization techniques.
How to run the code
The code is implemented to run with docker.
To build the docker image, run the following command:
docker build -t bio_intensity_norm:1.3 .
To load the docker image, run the following command:
docker load -i bio_intensity_norm_v1.3.tar
Then, run the following command in order to create a container and instantiate the docker image:
docker run -it
-v "your_input_path:/usr/procancer/bio_int_norm/data_in"
-v "your_output_path:/usr/procancer/bio_int_norm/data_out"
bio_intensity_norm:1.3
[-h] [-f] [-m] [-p]
where your_input_path is the path that contains the folders with the original nifti image of each patient
your_output_path is the path where the normalized image of each patient will be saved
available arguments:
-h, --help: show this help message and exit
-f, --fat-based: If specified, the fat-based normalization algorithm is applied
-m, --muscle-based: If specified, the muscle-based normalization algorithm is applied
-p, --piece-wise: If specified, the single tissue piece-wise normalization algorithm is applied,
Default = fat tissue piece-wise
For instance, if the user wants to apply the single muscle tissue piece-wise normalization method, the arguments -p -m should be specified. If the user specifies only the argument -p, then the fat tissue piece-wise normalization method will be applied by default.
Description of input and output
Input
The required input is the images, which should be in Nifti format.
Only for the piece-wise normalization techniques, the input path should contain 2 folders, i.e. train and test folder. The train folder contains the folders of the patients that are used for the training of the algorithm, while the test folder contains the folders of the patients whose images will be normalized.
Two volumes are attached to the docker container in order to run the module. The one volume of the docker container should be a path that contains the folders of the patients. Each folder contains the corresponding nifti raw image of the patient. The second volume of the docker container is an output path, which is the path that the normalized images will be stored in the same format. For each patient, a folder will be created and the normalized image in Nifti format will be stored within the folder.
Examples of the required format of the input path:
For the fat- and muscle- based normalization techniques:
-- Patient 1 (folder)
-- file.nii (file)
-- Patient 2 (folder)
-- file.nii (file)
.
.
.
For the piece-wise (fat or muscle) normalization techniques:
-- train (folder)
-- Patient 1 (folder)
-- file.nii (file)
-- Patient 2 (folder)
-- file.nii (file)
.
.
.
-- test (folder)
-- Patient 1 (folder)
-- file.nii (file)
-- Patient 2 (folder)
-- file.nii (file)
.
.
.
Output
The output is the normalized images, which are stored in the specified output path.
Requirements
The following python libraries are required:
numpy openpyxl pandas==1.3.4 matplotlib==3.5.0 scikit-learn==1.0.1 pydicom==2.2.2 SimpleITK nibabel scikit_image opencv_python==4.5.1.48 boto3 tensorflow==2.2.0 protobuf==3.20.0 mlflow==1.20 keras_unet_collection==0.1.11 scipy
Contact info: Dovrou Aikaterini, dovrou@ics.forth.gr