|
STIR 6.4.0
|
Gamma correction filter for 2D slices in a 3D volume. More...
#include "stir/GammaArrayFilter2D.h"

Public Member Functions | |
| bool | is_trivial () const override |
| Should return true when the operations won't modify the object at all. | |
Public Member Functions inherited from stir::ArrayFunctionObject_2ArgumentImplementation< 3, elemT > | |
| void | operator() (Array< num_dimensions, elemT > &array) const override |
| in-place modification of array, implemented inline | |
| void | operator() (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const override |
| result stored in another array | |
Public Member Functions inherited from stir::ArrayFunctionObject< num_dimensions, elemT > | |
| virtual Succeeded | get_influencing_indices (IndexRange< num_dimensions > &influencing_indices, const IndexRange< num_dimensions > &output_indices) const |
| sets the range of indices that influences the result in a set of coordinates output_indices | |
| virtual Succeeded | get_influenced_indices (IndexRange< num_dimensions > &influenced_indices, const IndexRange< num_dimensions > &input_indices) const |
| sets the range of indices that gets influenced by a set of coordinate input_indices | |
Additional Inherited Members | |
Protected Member Functions inherited from stir::ArrayFunctionObject_2ArgumentImplementation< 3, elemT > | |
| virtual void | do_it (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array) const=0 |
Gamma correction filter for 2D slices in a 3D volume.
This filter enhances image contrast by adjusting pixel intensities using gamma correction. The algorithm operates on each 2D slice (axial direction) independently and involves:
![\[ \textrm{normalized}(i, j) = \frac{\textrm{input}(i, j) - \textrm{min\_val}}{\textrm{max\_val} - \textrm{min\_val}}
\]](form_17.png)
min_val and max_val are the minimum and maximum pixel values in the slice.
![\[ \gamma = \frac{\log(0.25)}{\log(\textrm{averagePixelValue})}
\]](form_18.png)
0.25 is the target average intensity level for contrast adjustment.
![\[ \textrm{corrected}(i, j) = \textrm{normalized}(i, j)^{\gamma}
\]](form_19.png)
![\[ \textrm{output}(i, j) = \textrm{corrected}(i, j) \times (\textrm{max\_val} - \textrm{min\_val}) + \textrm{min\_val}
\]](form_20.png)
This filter is fully automated and does not require any parameters. To enable it in the reconstruction process, include the following in the parameter file:
|
overridevirtual |
Should return true when the operations won't modify the object at all.
For the 2 argument version, elements in out_array will be set to corresponding elements in in_array. Elements in out_array that do not occur in in_array will be set to 0.
Implements stir::ArrayFunctionObject< num_dimensions, elemT >.
References is_trivial().
Referenced by is_trivial().