Page MenuHomePhabricator

GetChannelData() in Image needs to be const
Closed, ResolvedPublic

Description

In order to allow image read access from const images, it is necessary to get rid of on-demand data structure initialization in Image::GetChannelData() and related methods like GetSliceData() and GetVolumeData().

The return type should be ImageDataItem* as well, but the method should not be allowed to change anything in Image.

Many members of Image are affected in those methods, therefore "mutable" seems to be inappropriate.