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
Describe the bug CSingleChannelTileAccessor::Get (and probably also the other accessor implementations) returns uninitialized memory if called with pOptions=nullptr or if passing ISingleChannelTileAccessor::Options where backGroundColor has not been set to finite values explicitly. (Note that ISingleChannelTileAccessor::Options::Clear() sets the backGroundColor values to NaN.)
auto reader = libCZI::CreateCZIReader();
reader->open(/* some stream */);
auto accessor = reader->CreateSingleChannelTileAccessor();
libCZI::CDimCoordinate coord;
// set some coordinatesauto bitmap = accessor->Get(/* some ROI which is not fully covered by tiles */, &coords, nullptr);
auto lock_info = bitmap->Lock();
// enjoy random values in regions not covered by tiles
bitmap->Unlock();
Expected behavior
Background pixels are initialized with a predictable value by default.
Desktop (please complete the following information):
OS: Linux
The text was updated successfully, but these errors were encountered:
Describe the bug
CSingleChannelTileAccessor::Get
(and probably also the other accessor implementations) returns uninitialized memory if called withpOptions=nullptr
or if passingISingleChannelTileAccessor::Options
wherebackGroundColor
has not been set to finite values explicitly. (Note thatISingleChannelTileAccessor::Options::Clear()
sets thebackGroundColor
values to NaN.)The reason is that
CSingleChannelAccessorBase::Clear()
, which is called byCSingleChannelTileAccessor::InternalGet()
, only fills the bitmap if all values ofbackGroundColor
are not NaN.To Reproduce
Expected behavior
Background pixels are initialized with a predictable value by default.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: