Skip to content
Snippets Groups Projects
Commit 1a172bb9 authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Workaround to compute the buffer size without calling...

BUG: Workaround to compute the buffer size without calling GetImageSizeInBytes() which returns a negative number for image > 2 Gb. This version seems better anyway
parent 048f482b
No related branches found
No related tags found
No related merge requests found
......@@ -170,8 +170,8 @@ ImageFileReader<TOutputImage>
ImageRegionType region = output->GetBufferedRegion();
// Adapte the image size with the region
std::streamoff nbBytes = (this->m_ImageIO->GetImageSizeInBytes() / this->m_ImageIO->GetImageSizeInPixels())
* static_cast<std::streamoff>(region.GetNumberOfPixels());
std::streamoff nbBytes = (this->m_ImageIO->GetComponentSize() * this->m_ImageIO->GetNumberOfComponents())
* static_cast<std::streamoff>(region.GetNumberOfPixels());
char * loadBuffer = new char[nbBytes];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment