This tutorial explains how to use the Intensity Rescaler program in command line.
Requirements
You can download the Intensity Rescaler program in our download
section
You can download sample data here
(zip format - 2.13Mo)
IntensityRescaler can process images with the following format: GIPL (.gipl),
MetaImage (.mha), Analyze (.hdr)
Overview
What you need:
- 1 target image
(.gipl, .hdr or .mha): This image is the reference image
- 1 target segmentation
image: segmentation (Gray matter, White matter and CSF) of the target image.
- N source image(s) (.gipl, .hdr or .mha): Image(s) you want to adjust based
on the target image
- N source segmentation
image(s): Segmentation(s) of the source image(s)
Intensity adjustment in 3 steps
IntensityRescaler adjust images using 3 different steps
|
Original images: |
![]() |
|
Step 1: Target intensity windowing: |
![]() |
|
Step 2: Source intensity windowing: |
![]() |
| Step 3: Class matching: - This is an iterative process which try to adjust mean values for each labels. For example: MeanTarget(White) = MeanSource(White) MeanTarget(Gray) = MeanSource(Gray) MeanTarget(CSF) = MeanSource(CSF) - This is very prowerfull if the source and the target images have the same maximum. |
![]() |
Example
The first thing is to create a configuration file. To do that type:
> IntensityRescaler -create irescalscript.txt
This will create a irescalscript.txt file which is a demonstration script
Important: You have to edit this file before running IntensityRescaler
with it.
Edit
the script file using a text editor
You can see the script generated in the sample data directory.
Execute
IntensityRescaler:
> IntensityRescaler
-input irescalscript.txt
if you want to
rum it in verbose mode:
> IntensityRescaler -input irescalscript.txt -v
Result
These images are generated using the example script
![]() Original images with segmentions (Target image: Left and Source images: 2 image right) |
![]() Original images before Intensity Rescaling |
![]() Original images after Intensity Rescaling |