Skip to content

Commit

Permalink
Merge pull request #1180 from thewtex/output-components-per-pixel
Browse files Browse the repository at this point in the history
fix(OutputImage): dataSize needs components per pixel
  • Loading branch information
thewtex authored Jul 17, 2024
2 parents 5d0a84a + 4feee16 commit 55dc91e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/itkOutputImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ITK_TEMPLATE_EXPORT OutputImage

const auto dataAddress = reinterpret_cast< size_t >( wasmImage->GetImage()->GetBufferPointer() );
using ConvertPixelTraits = DefaultConvertPixelTraits<typename ImageType::PixelType>;
const auto dataSize = wasmImage->GetImage()->GetPixelContainer()->Size() * sizeof(typename ConvertPixelTraits::ComponentType);
const auto dataSize = wasmImage->GetImage()->GetPixelContainer()->Size() * sizeof(typename ConvertPixelTraits::ComponentType) * ConvertPixelTraits::GetNumberOfComponents();
setMemoryStoreOutputArray(0, index, 0, dataAddress, dataSize);

const auto directionAddress = reinterpret_cast< size_t >( wasmImage->GetImage()->GetDirection().GetVnlMatrix().begin() );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const defaultImageTag = '20240713-c8dabc4b'
const defaultImageTag = '20240717-6891d4df'
export default defaultImageTag

0 comments on commit 55dc91e

Please sign in to comment.