[Gdcm-hackers] gdcm-git:Grassroots DICOM branch release updated. 2d867a1f6582daa8e7953371a7a619276b
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mathieu M. <ma...@us...> - 2021-02-02 08:30:29
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grassroots DICOM".
The branch, release has been updated
via 2d867a1f6582daa8e7953371a7a619276b2cfa20 (commit)
from e9a117b015c31074cef04e8634b285bd191dd026 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceforge.net/p/gdcm/gdcm/ci/2d867a1f6582daa8e7953371a7a619276b2cfa20/
commit 2d867a1f6582daa8e7953371a7a619276b2cfa20
Author: Mathieu Malaterre <mat...@gm...>
Date: Tue Feb 2 09:30:09 2021 +0100
Sanitize values
diff --git a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
index 45809542d..5d066b26d 100644
--- a/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx
@@ -1435,7 +1435,15 @@ std::vector<double> ImageHelper::GetSpacingValue(File const & f)
el.SetLength( entry.GetVM().GetLength() * entry.GetVR().GetSizeof() );
el.Read( ss );
for(unsigned int i = 0; i < el.GetLength(); ++i)
- sp.push_back( el.GetValue(i) );
+ {
+ if( el.GetValue(i) )
+ sp.push_back( el.GetValue(i) );
+ else
+ {
+ gdcmWarningMacro( "Cant have a spacing of 0" );
+ sp.push_back( 1.0 );
+ }
+ }
std::swap( sp[0], sp[1]);
assert( sp.size() == (unsigned int)entry.GetVM() );
}
-----------------------------------------------------------------------
Summary of changes:
Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
hooks/post-receive
--
Grassroots DICOM
|