[Gdcm-hackers] gdcm-git:Grassroots DICOM branch master updated. fc2461c9081bfcd6f419e0dedf0c7b6d86a
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: malat <ma...@us...> - 2023-05-05 09:32:24
|
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, master has been updated
via fc2461c9081bfcd6f419e0dedf0c7b6d86a102ee (commit)
from f89a99e41435daffbdde829cf3e196df78ba619c (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/fc2461c9081bfcd6f419e0dedf0c7b6d86a102ee/
commit fc2461c9081bfcd6f419e0dedf0c7b6d86a102ee
Author: Mathieu Malaterre <mat...@gm...>
Date: Fri May 5 11:30:53 2023 +0200
Prefer working code
diff --git a/Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx b/Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx
index df8d0047f..657ff111e 100644
--- a/Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx
+++ b/Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx
@@ -41,8 +41,7 @@ std::string DataSet::GetPrivateCreator(const Tag &t) const
if( de.IsEmpty() ) return "";
const ByteValue *bv = de.GetByteValue();
assert( bv );
- std::string owner = std::string(bv->GetPointer(),bv->GetLength());
- owner.erase(owner.find('\0'));
+ std::string owner = std::string(bv->GetPointer(),bv->GetLength()).c_str();
// There should not be any trailing space character...
// TODO: tmp.erase(tmp.find_last_not_of(' ') + 1);
while( !owner.empty() && owner[owner.size()-1] == ' ' )
diff --git a/Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx b/Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx
index c889373cb..3084ed17b 100644
--- a/Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx
+++ b/Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx
@@ -36,10 +36,9 @@ void ULWritingCallback::HandleDataSet(const DataSet& inDataSet)
{
const DataElement &de = inDataSet.GetDataElement(Tag(0x0008,0x0018));
const ByteValue *bv = de.GetByteValue();
- std::string sopclassuid_str( bv->GetPointer(), bv->GetLength() );
- sopclassuid_str.erase( sopclassuid_str.find('\0'));
+ const std::string sopclassuid_str( bv->GetPointer(), bv->GetLength() );
Writer w;
- std::string theLoc = mDirectoryName + "/" + sopclassuid_str + ".dcm";
+ std::string theLoc = mDirectoryName + "/" + sopclassuid_str.c_str() + ".dcm";
w.SetFileName(theLoc.c_str());
File &f = w.GetFile();
f.SetDataSet(inDataSet);
-----------------------------------------------------------------------
Summary of changes:
Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx | 3 +--
Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx | 5 ++---
2 files changed, 3 insertions(+), 5 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|