Skip to content

Commit

Permalink
Refactor and cleanup in SingleChannelTileAccessor
Browse files Browse the repository at this point in the history
Modified the constructor in SingleChannelTileAccessor.cpp to make
roi_raw_sub_block_cs a const IntRect, ensuring immutability.
Removed a commented-out Get method declaration in
SingleChannelTileAccessor.h for improved readability.
  • Loading branch information
ptahmose committed Dec 11, 2024
1 parent 98117a0 commit 9135c59
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions Src/libCZI/SingleChannelTileAccessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ CSingleChannelTileAccessor::CSingleChannelTileAccessor(const std::shared_ptr<ISu

/*virtual*/std::shared_ptr<libCZI::IBitmapData> CSingleChannelTileAccessor::Get(libCZI::PixelType pixeltype, const libCZI::IntRectAndFrameOfReference& roi, const IDimCoordinate* planeCoordinate, const Options* pOptions)
{
//IntRect roi_raw_sub_block_cs = Utils::ConvertToFrameOfReference(roi, this->sbBlkRepository.get(), CZIFrameOfReference::RawSubBlockCoordinateSystem);
IntRect roi_raw_sub_block_cs = this->sbBlkRepository->TransformRectangle(roi, CZIFrameOfReference::RawSubBlockCoordinateSystem).rectangle;
const IntRect roi_raw_sub_block_cs = this->sbBlkRepository->TransformRectangle(roi, CZIFrameOfReference::RawSubBlockCoordinateSystem).rectangle;
auto bmDest = GetSite()->CreateBitmap(pixeltype, roi_raw_sub_block_cs.w, roi_raw_sub_block_cs.h);
this->InternalGet(roi_raw_sub_block_cs.x, roi_raw_sub_block_cs.y, bmDest.get(), planeCoordinate, pOptions);
return bmDest;
Expand Down
1 change: 0 additions & 1 deletion Src/libCZI/SingleChannelTileAccessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class CSingleChannelTileAccessor : public CSingleChannelAccessorBase, public lib

public: // interface ISingleChannelTileAccessor
std::shared_ptr<libCZI::IBitmapData> Get(const libCZI::IntRectAndFrameOfReference& roi, const libCZI::IDimCoordinate* planeCoordinate, const libCZI::ISingleChannelTileAccessor::Options* pOptions) override;
//std::shared_ptr<libCZI::IBitmapData> Get(libCZI::PixelType pixeltype, const libCZI::IntRect& roi, const libCZI::IDimCoordinate* planeCoordinate, const Options* pOptions) override;
std::shared_ptr<libCZI::IBitmapData> Get(libCZI::PixelType pixeltype, const libCZI::IntRectAndFrameOfReference& roi, const libCZI::IDimCoordinate* planeCoordinate, const Options* pOptions) override;
void Get(libCZI::IBitmapData* pDest, int xPos, int yPos, const libCZI::IDimCoordinate* planeCoordinate, const Options* pOptions) override;
private:
Expand Down

0 comments on commit 9135c59

Please sign in to comment.