You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RGBPixel doesn't include subtraction or addition operators #24
In Book 1, Chapter 4, it says the following (here)
ITK introduces the itk::RGBPixel type as a support for representing the values of an RGB color space. As such, the RGBPixel class embodies a different concept from the one of an itk::Vector in space. For this reason, the RGBPixel lacks many of the operators that may be naively expected from it. In particular, there are no defined operations for subtraction or addition.
According to the Doxygen for RGBPixel, there are addition and subtraction operators for the RGBPixel class. I'm not sure the information is correct. Maybe in the past this was not the case however.
I guess the description needs to change. We need these operators for making averages etc. And otherwise to make RGBPixel as similar to other possible pixel types (float, short etc) for easier use in generic (templated) code.
Activity
albert-github commentedon Mar 24, 2025
From the current documentation of
RGBPixel(https://insightsoftwareconsortium.github.io/ITKDoxygen/classitk_1_1RGBPixel.html) we see:So I think the text should be revised.
Please advise / change.
dzenanz commentedon Mar 24, 2025
I guess the description needs to change. We need these operators for making averages etc. And otherwise to make
RGBPixelas similar to other possible pixel types (float,shortetc) for easier use in generic (templated) code.