[Gdcm-hackers] gdcm-git:Grassroots DICOM branch release updated. 030230f53e1bb660d5464d31464648df9c
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: malat <ma...@us...> - 2023-05-02 11:57:48
|
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 030230f53e1bb660d5464d31464648df9c186a03 (commit)
from 4a82c4b6f8d287116633b4a768652d4368fd290d (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/030230f53e1bb660d5464d31464648df9c186a03/
commit 030230f53e1bb660d5464d31464648df9c186a03
Author: Sean McBride <se...@ro...>
Date: Fri Apr 7 13:37:07 2023 -0400
Auto-fixed most clang-tidy readability-redundant-string-cstr warnings
diff --git a/Applications/Cxx/gdcmgendir.cxx b/Applications/Cxx/gdcmgendir.cxx
index 4ef09eb48..fea3d97ba 100644
--- a/Applications/Cxx/gdcmgendir.cxx
+++ b/Applications/Cxx/gdcmgendir.cxx
@@ -208,9 +208,9 @@ int main(int argc, char *argv[])
&& outfilename.empty()
)
{
- filename = files[0].c_str();
+ filename = files[0];
filenames = files;
- outfilename = files[ files.size() - 1 ].c_str();
+ outfilename = files[ files.size() - 1 ];
filenames.pop_back();
}
else
diff --git a/Applications/Cxx/gdcmscanner.cxx b/Applications/Cxx/gdcmscanner.cxx
index bf037fc4d..3e563c88a 100644
--- a/Applications/Cxx/gdcmscanner.cxx
+++ b/Applications/Cxx/gdcmscanner.cxx
@@ -324,7 +324,7 @@ int main(int argc, char *argv[])
}
gdcm::Directory d;
- unsigned int nfiles = d.Load( dirname.c_str(), recursive );
+ unsigned int nfiles = d.Load( dirname, recursive );
if( !nfiles )
{
std::cerr << "No files found in: " << dirname << std::endl;
diff --git a/Applications/Cxx/gdcmtar.cxx b/Applications/Cxx/gdcmtar.cxx
index 9a8808e34..c8949f91b 100644
--- a/Applications/Cxx/gdcmtar.cxx
+++ b/Applications/Cxx/gdcmtar.cxx
@@ -459,7 +459,7 @@ static int MakeImageEnhanced( std::string const & filename, std::string const &o
}
gdcm::Directory d;
- d.Load( filename.c_str(), true ); // recursive !
+ d.Load( filename, true ); // recursive !
gdcm::Scanner s;
s.AddTag( gdcm::T0 );
diff --git a/Examples/Cxx/DiscriminateVolume.cxx b/Examples/Cxx/DiscriminateVolume.cxx
index 46bea6a26..ec21294d4 100644
--- a/Examples/Cxx/DiscriminateVolume.cxx
+++ b/Examples/Cxx/DiscriminateVolume.cxx
@@ -260,7 +260,7 @@ int main(int argc, char *argv[])
}
gdcm::Directory d;
- d.Load( dir1.c_str(), true ); // recursive !
+ d.Load( dir1, true ); // recursive !
gdcm::Scanner s;
s.AddTag( gdcm::t1 );
diff --git a/Examples/Cxx/VolumeSorter.cxx b/Examples/Cxx/VolumeSorter.cxx
index 8aa377f17..faec1000c 100644
--- a/Examples/Cxx/VolumeSorter.cxx
+++ b/Examples/Cxx/VolumeSorter.cxx
@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
}
gdcm::Directory d;
- d.Load( dir1.c_str(), true ); // recursive !
+ d.Load( dir1, true ); // recursive !
const gdcm::Directory::FilenamesType &l1 = d.GetFilenames();
const size_t nfiles = l1.size();
std::cout << nfiles << std::endl;
diff --git a/Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx b/Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx
index 657ff111e..df8d0047f 100644
--- a/Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx
+++ b/Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx
@@ -41,7 +41,8 @@ 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()).c_str();
+ std::string owner = std::string(bv->GetPointer(),bv->GetLength());
+ owner.erase(owner.find('\0'));
// 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/MediaStorageAndFileFormat/gdcmDirectoryHelper.cxx b/Source/MediaStorageAndFileFormat/gdcmDirectoryHelper.cxx
index 4d1fac972..84f67ac24 100644
--- a/Source/MediaStorageAndFileFormat/gdcmDirectoryHelper.cxx
+++ b/Source/MediaStorageAndFileFormat/gdcmDirectoryHelper.cxx
@@ -38,7 +38,7 @@ Directory::FilenamesType DirectoryHelper::GetSeriesUIDsBySOPClassUID(const std::
size_t endpos = theSOPClassUID.find_last_not_of(' '); // Find the first character position from reverse af
if( std::string::npos != endpos )
theSOPClassUID = theSOPClassUID.substr( 0, endpos+1 );
- if (theSOPClassUID == inSOPClassUID.c_str()){
+ if (theSOPClassUID == inSOPClassUID){
theReturn.push_back(theSeriesValues[i]);
}
}
diff --git a/Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx b/Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx
index 3084ed17b..c889373cb 100644
--- a/Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx
+++ b/Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx
@@ -36,9 +36,10 @@ void ULWritingCallback::HandleDataSet(const DataSet& inDataSet)
{
const DataElement &de = inDataSet.GetDataElement(Tag(0x0008,0x0018));
const ByteValue *bv = de.GetByteValue();
- const std::string sopclassuid_str( bv->GetPointer(), bv->GetLength() );
+ std::string sopclassuid_str( bv->GetPointer(), bv->GetLength() );
+ sopclassuid_str.erase( sopclassuid_str.find('\0'));
Writer w;
- std::string theLoc = mDirectoryName + "/" + sopclassuid_str.c_str() + ".dcm";
+ std::string theLoc = mDirectoryName + "/" + sopclassuid_str + ".dcm";
w.SetFileName(theLoc.c_str());
File &f = w.GetFile();
f.SetDataSet(inDataSet);
-----------------------------------------------------------------------
Summary of changes:
Applications/Cxx/gdcmgendir.cxx | 4 ++--
Applications/Cxx/gdcmscanner.cxx | 2 +-
Applications/Cxx/gdcmtar.cxx | 2 +-
Examples/Cxx/DiscriminateVolume.cxx | 2 +-
Examples/Cxx/VolumeSorter.cxx | 2 +-
Source/DataStructureAndEncodingDefinition/gdcmDataSet.cxx | 3 ++-
Source/MediaStorageAndFileFormat/gdcmDirectoryHelper.cxx | 2 +-
Source/MessageExchangeDefinition/gdcmULWritingCallback.cxx | 5 +++--
8 files changed, 12 insertions(+), 10 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|