mitk::image::GetPixelValueByIndex cannot be called from coinstPointer.
Only from normal mitk::Image::Pointer
Description
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | None | T11536 mitk::image::GetPixelValueByIndex cannot be called from const pointer | ||
Resolved | None | T13324 GetChannelData() in Image needs to be const | ||
Wontfix | None | T16381 Redesign storage of ImageDataItems in Image |
Event Timeline
Comment Actions
Declaring the GetData() as const method, which would be the best solution is not quite easy, since there are multiple non-const methods on the object called and they cannot be declared as const.
Comment Actions
No it is not. Due to a missing const-correctness in Image and ImageDataItem, ImageAccessors also need a non-const pointer. One reason for this problem is T13324
Image::GetPixelValueByIndex is actually deprecated, but the same problem occurs with ImagePixelReadAccessor::GetPixelByIndexSafe, since the constructor of ImageAccessorBase needs a non-const image pointer.