changeset 6858:a4f90fb6b3e2 streaming

removed MultipleDicomReader
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 23 May 2026 22:09:26 +0200
parents 58740529b511
children e66251d14156
files OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake OrthancFramework/Sources/DataSource/MultipleDicomReader.cpp OrthancFramework/Sources/DataSource/MultipleDicomReader.h OrthancServer/Sources/ServerContext.cpp OrthancServer/Sources/ServerContext.h
diffstat 5 files changed, 0 insertions(+), 167 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake	Sat May 23 22:07:39 2026 +0200
+++ b/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake	Sat May 23 22:09:26 2026 +0200
@@ -684,7 +684,6 @@
     list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
       ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DataSource/DicomDataSource.cpp
       ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DataSource/DicomSequentialReader.cpp
-      ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DataSource/MultipleDicomReader.cpp
       ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DataSource/TranscoderDataSource.cpp
       ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DicomParsing/TranscodingCallable.cpp
       )
--- a/OrthancFramework/Sources/DataSource/MultipleDicomReader.cpp	Sat May 23 22:07:39 2026 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/**
- * Orthanc - A Lightweight, RESTful DICOM Store
- * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
- * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2023 Osimis S.A., Belgium
- * Copyright (C) 2024-2026 Orthanc Team SRL, Belgium
- * Copyright (C) 2021-2026 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- **/
-
-
-#include "../PrecompiledHeaders.h"
-#include "MultipleDicomReader.h"
-
-#include "../OrthancException.h"
-#include "DataSourceAnswer.h"
-#include "DataSourceReader.h"
-#include "DataSourceRequest.h"
-
-
-namespace Orthanc
-{
-  class MultipleDicomReader::PImpl : public boost::noncopyable
-  {
-  private:
-    boost::shared_ptr<DataSourceReader>  reader_;
-    std::unique_ptr<DataSourceRequest>   request_;
-    boost::shared_ptr<DataSourceAnswer>  answer_;
-
-  public:
-    PImpl(const boost::shared_ptr<DataSourceReader>& reader) :
-      reader_(reader),
-      request_(new DataSourceRequest)
-    {
-    }
-
-    void Enqueue(const FileInfo& attachment)
-    {
-      if (request_.get() == NULL)
-      {
-        throw OrthancException(ErrorCode_BadSequenceOfCalls);
-      }
-      else
-      {
-        request_->Enqueue(DicomDataSource::CreateWholeRequest(attachment));
-      }
-    }
-
-    DicomDataSource::Dicom* Dequeue()
-    {
-      if (answer_.get() == NULL)
-      {
-        assert(request_.get() != NULL);
-        answer_ = reader_->Submit(request_.release());
-      }
-
-      return new DicomDataSource::Dicom(answer_->Dequeue());
-    }
-  };
-
-
-  MultipleDicomReader::MultipleDicomReader(const boost::shared_ptr<DataSourceReader>& reader) :
-    pimpl_(new PImpl(reader))
-  {
-  }
-
-
-  MultipleDicomReader::~MultipleDicomReader()
-  {
-    assert(pimpl_ != NULL);
-    delete pimpl_;
-  }
-
-
-  void MultipleDicomReader::Enqueue(const FileInfo& attachment)
-  {
-    pimpl_->Enqueue(attachment);
-  }
-
-
-  DicomDataSource::Dicom* MultipleDicomReader::Dequeue()
-  {
-    return pimpl_->Dequeue();
-  }
-}
--- a/OrthancFramework/Sources/DataSource/MultipleDicomReader.h	Sat May 23 22:07:39 2026 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/**
- * Orthanc - A Lightweight, RESTful DICOM Store
- * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
- * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2023 Osimis S.A., Belgium
- * Copyright (C) 2024-2026 Orthanc Team SRL, Belgium
- * Copyright (C) 2021-2026 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- **/
-
-
-#pragma once
-
-#if !defined(ORTHANC_ENABLE_DCMTK)
-#  error The macro ORTHANC_ENABLE_DCMTK must be defined
-#endif
-
-#if ORTHANC_ENABLE_DCMTK != 1
-#  error The macro ORTHANC_ENABLE_DCMTK must be set to 1 to use this file
-#endif
-
-#include "DicomDataSource.h"
-
-#include <boost/shared_ptr.hpp>
-
-
-namespace Orthanc
-{
-  class DataSourceReader;
-
-  class MultipleDicomReader : public boost::noncopyable
-  {
-  private:
-    class PImpl;
-    PImpl* pimpl_;
-
-  public:
-    MultipleDicomReader(const boost::shared_ptr<DataSourceReader>& reader);
-
-    ~MultipleDicomReader();
-
-    void Enqueue(const FileInfo& item);
-
-    DicomDataSource::Dicom* Dequeue();
-  };
-}
--- a/OrthancServer/Sources/ServerContext.cpp	Sat May 23 22:07:39 2026 +0200
+++ b/OrthancServer/Sources/ServerContext.cpp	Sat May 23 22:09:26 2026 +0200
@@ -2153,12 +2153,6 @@
   }
 
 
-  MultipleDicomReader* ServerContext::CreateMultipleDicomReader() const
-  {
-    return new MultipleDicomReader(dicomReader_);
-  }
-
-
   DicomSequentialReader* ServerContext::CreateDicomSequentialReader()
   {
     return DicomSequentialReader::CreateForOriginal(
--- a/OrthancServer/Sources/ServerContext.h	Sat May 23 22:07:39 2026 +0200
+++ b/OrthancServer/Sources/ServerContext.h	Sat May 23 22:09:26 2026 +0200
@@ -30,7 +30,6 @@
 #include "ServerJobs/IStorageCommitmentFactory.h"
 
 #include "../../OrthancFramework/Sources/DataSource/DicomDataSource.h"
-#include "../../OrthancFramework/Sources/DataSource/MultipleDicomReader.h"
 #include "../../OrthancFramework/Sources/DataSource/StorageAreaDataSource.h"
 #include "../../OrthancFramework/Sources/DicomParsing/DicomModification.h"
 #include "../../OrthancFramework/Sources/JobsEngine/JobsEngine.h"
@@ -594,8 +593,6 @@
 
     Future* SubmitTranscodingRequest(TranscodingCallable* callable);
 
-    MultipleDicomReader* CreateMultipleDicomReader() const;
-
     DicomSequentialReader* CreateDicomSequentialReader();
 
     DicomSequentialReader* CreateDicomSequentialReader(DicomTransferSyntax transcodingSyntax);