It would be nice to have a method which provides easy access to pixel values in a mitk::Image without using the IpPicdescriptor and the mitkIpPicTypeMultiplex methods outside the image class.
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | None | T2206 Add missing Pixel access Method to mitk::Image | ||
Duplicate | None | T2401 MPR displays pixel brightness mismatch | ||
Resolved | None | T4692 Inconsistent handling of pixel and voxel centers |
Event Timeline
patch contains two convenience methods for mitk::image to access the pixel value.
GetPixelValuebyIndex(...)
GetPixelValuebyWorld(...)
Not committed because test is still missing AND this feature depends on T2401
Hi,
some comments on the change request
- Cause of the bug: does not apply
- how was GetPixelValueByIndex called before?
- for better readability GetPixelValueByWorld should be named GetPixelValueByWorldCoordinate (because the parameter is a coordinate, not a whole world)
What do you mean with the first comment? If you mean that the sentence was incomplete, you are right :) Should be more clear now. It is not really a bug by the way, only the absence of a convenient method.
With regard to name giving, the GetPixelByIndex should than also be called GetPixelByIndexCoordinate.
Discussed with Thomas, we changed the change request minimally:
- changing the paragraph "cause of the bug" to "does not apply"
- changing the new name to Get...WorldCoordinate
And Thomas has already written a test case which will be committed before this bug is closed.
[SVN revision 20887]
ENH (#2206): added a method GetPixelValueByWorldCoordinate to mitkImage that allows retrieving pixel values by providing a world coordinate instead of an index coordinates. GetPixelValue was renamed to GetPixelValueByIndex. mitkImageTest was extended to test the new method using an image containing nonidentity orientation.
[SVN revision 20891]
COMP (#2206): Changed GetPixelValue to GetPixelValueByIndex to solve compiler error.