diff Core/DicomParsing/DcmtkTranscoder.cpp @ 3909:6762a97deabc transcoding

removed useless abstraction IDicomTranscoder::TranscodeToBuffer()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 May 2020 11:40:12 +0200
parents 1555feda39e2
children 1f71c2f20e16
line wrap: on
line diff
--- a/Core/DicomParsing/DcmtkTranscoder.cpp	Fri May 08 11:30:32 2020 +0200
+++ b/Core/DicomParsing/DcmtkTranscoder.cpp	Fri May 08 11:40:12 2020 +0200
@@ -290,39 +290,6 @@
   }
 
     
-  bool DcmtkTranscoder::TranscodeToBuffer(std::string& target,
-                                          bool& hasSopInstanceUidChanged /* out */,
-                                          const void* buffer,
-                                          size_t size,
-                                          const std::set<DicomTransferSyntax>& allowedSyntaxes,
-                                          bool allowNewSopInstanceUid) 
-  {
-    std::unique_ptr<DcmFileFormat> dicom(FromDcmtkBridge::LoadFromMemoryBuffer(buffer, size));
-    if (dicom.get() == NULL)
-    {
-      throw OrthancException(ErrorCode_BadFileFormat);
-    }
-    
-    std::unique_ptr<TranscodedDicom> transcoded(
-      TranscodeToParsed(*dicom, buffer, size, allowedSyntaxes, allowNewSopInstanceUid));
-
-    if (transcoded.get() == NULL)
-    {
-      return false;
-    }
-    else
-    {
-      if (transcoded->GetDicom().getDataset() == NULL)
-      {
-        throw OrthancException(ErrorCode_InternalError);
-      }          
-        
-      FromDcmtkBridge::SaveToMemoryBuffer(target, *transcoded->GetDicom().getDataset());
-      return true;
-    }
-  }
-
-
   bool DcmtkTranscoder::IsSupported(DicomTransferSyntax syntax)
   {
     if (syntax == DicomTransferSyntax_LittleEndianImplicit ||