I have lung CT data and I want all the scans to be in the range (-1024 to 3000). I’m using the Sigmoid filter, my first question is how to choose alpha and beta parameters?
I’m using SimpleITK, I wrote this script to perform the transformation
I got this error (TypeError: Execute() missing 1 required positional argument: ‘image1’),
I’m passing the image as a parameter, so what’s missing here?!
If you are trying to make you CT values more predictable, sigmoid filter is not the best solution. While it would be a good solution for the upper end of intensities, it would necessarily distort values on your relatively tight lower end.
As for choosing alpha and beta parameters, look at the intensity transformation formula in the documentation, then try plotting it in range (-2000…5000) for a few combinations of alpha and beta parameters to get a feel for how they influence the transfomation.
The sigmoid mapping in ITK/SimpleITK is f(I) = (max_{output} - min_{output}) \frac{1}{1+ e^{-\frac{I-\beta}{\alpha}}} + min_{output}
\beta is the intensity value for the sigmoid midpoint, \alpha is the curve steepness. For an example see this Jupyter notebook.
The more common mapping is IntensityWindowingImageFilter (a.k.a. Window-Level), linear mapping inside interval, with values below the lower bound mapped to a constant and values above the upper bound mapped to another constant.