[Gdcm-hackers] gdcm-git:Grassroots DICOM branch release updated. 3d72185d4203b43c79978a8a068cdd96c8
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: malat <ma...@us...> - 2023-05-05 09:31:31
|
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 3d72185d4203b43c79978a8a068cdd96c8c7acae (commit)
from 07e1145ddb3f05fa84d8e209f85bab5fc17e5ebb (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/3d72185d4203b43c79978a8a068cdd96c8c7acae/
commit 3d72185d4203b43c79978a8a068cdd96c8c7acae
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
|