Mercurial > hg > orthanc
changeset 62:a70bb32802ae orthanc-renaming
renaming Server
line wrap: on
line diff
--- a/OrthancServer/DicomIntegerPixelAccessor.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomIntegerPixelAccessor.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -24,12 +24,12 @@ #define NOMINMAX #endif -#include "../Core/PalanthirException.h" +#include "../Core/OrthancException.h" #include "FromDcmtkBridge.h" #include <boost/lexical_cast.hpp> #include <limits> -namespace Palanthir +namespace Orthanc { DicomIntegerPixelAccessor::DicomIntegerPixelAccessor(const DicomMap& values, const void* pixelData, @@ -54,7 +54,7 @@ } catch (boost::bad_lexical_cast) { - throw PalanthirException(ErrorCode_NotImplemented); + throw OrthancException(ErrorCode_NotImplemented); } frame_ = 0; @@ -62,38 +62,38 @@ { numberOfFrames_ = boost::lexical_cast<unsigned int>(FromDcmtkBridge::GetValue(values, "NumberOfFrames").AsString()); } - catch (PalanthirException) + catch (OrthancException) { // If the tag "NumberOfFrames" is absent, assume there is a single frame numberOfFrames_ = 1; } catch (boost::bad_lexical_cast) { - throw PalanthirException(ErrorCode_NotImplemented); + throw OrthancException(ErrorCode_NotImplemented); } if ((bitsAllocated != 8 && bitsAllocated != 16 && bitsAllocated != 24 && bitsAllocated != 32) || numberOfFrames_ == 0) { - throw PalanthirException(ErrorCode_NotImplemented); + throw OrthancException(ErrorCode_NotImplemented); } if (bitsAllocated > 32 || bitsStored >= 32) { // Not available, as the accessor internally uses int32_t values - throw PalanthirException(ErrorCode_NotImplemented); + throw OrthancException(ErrorCode_NotImplemented); } if (samplesPerPixel_ != 1) { - throw PalanthirException(ErrorCode_NotImplemented); + throw OrthancException(ErrorCode_NotImplemented); } if (width_ * height_ * bitsAllocated / 8 * numberOfFrames_ != size) { - throw PalanthirException(ErrorCode_NotImplemented); + throw OrthancException(ErrorCode_NotImplemented); } /*printf("%d %d %d %d %d %d %d %d\n", width_, height_, samplesPerPixel_, bitsAllocated, @@ -165,7 +165,7 @@ if (v & signMask_) { // Signed value: Not implemented yet - //throw PalanthirException(ErrorCode_NotImplemented); + //throw OrthancException(ErrorCode_NotImplemented); v = 0; } @@ -177,7 +177,7 @@ { if (frame >= numberOfFrames_) { - throw PalanthirException(ErrorCode_ParameterOutOfRange); + throw OrthancException(ErrorCode_ParameterOutOfRange); } frame_ = frame;
--- a/OrthancServer/DicomIntegerPixelAccessor.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomIntegerPixelAccessor.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -24,7 +24,7 @@ #include <stdint.h> -namespace Palanthir +namespace Orthanc { class DicomIntegerPixelAccessor {
--- a/OrthancServer/DicomProtocol/DicomFindAnswers.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/DicomFindAnswers.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -22,7 +22,7 @@ #include "../FromDcmtkBridge.h" -namespace Palanthir +namespace Orthanc { void DicomFindAnswers::Clear() {
--- a/OrthancServer/DicomProtocol/DicomFindAnswers.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/DicomFindAnswers.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -25,7 +25,7 @@ #include <vector> #include <json/json.h> -namespace Palanthir +namespace Orthanc { class DicomFindAnswers {
--- a/OrthancServer/DicomProtocol/DicomServer.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/DicomServer.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -20,7 +20,7 @@ #include "DicomServer.h" -#include "../../Core/PalanthirException.h" +#include "../../Core/OrthancException.h" #include "../../Core/Toolbox.h" #include "../Internals/CommandDispatcher.h" @@ -28,7 +28,7 @@ #include <dcmtk/dcmdata/dcdict.h> -namespace Palanthir +namespace Orthanc { struct DicomServer::PImpl { @@ -64,7 +64,7 @@ { OFString temp_str; OFLOG_ERROR(Internals::Logger, "cannot create network: " << DimseCondition::dump(temp_str, cond)); - throw PalanthirException("Cannot create network"); + throw OrthancException("Cannot create network"); } OFLOG_WARN(Internals::Logger, "DICOM server started"); @@ -170,14 +170,14 @@ { if (aet.size() == 0) { - throw PalanthirException("Too short AET"); + throw OrthancException("Too short AET"); } for (size_t i = 0; i < aet.size(); i++) { if (!isalnum(aet[i]) && aet[i] != '-') { - throw PalanthirException("Only alphanumeric characters are allowed in AET"); + throw OrthancException("Only alphanumeric characters are allowed in AET"); } } @@ -209,7 +209,7 @@ } else { - throw PalanthirException("No C-FIND request handler factory"); + throw OrthancException("No C-FIND request handler factory"); } } @@ -232,7 +232,7 @@ } else { - throw PalanthirException("No C-MOVE request handler factory"); + throw OrthancException("No C-MOVE request handler factory"); } } @@ -255,7 +255,7 @@ } else { - throw PalanthirException("No C-STORE request handler factory"); + throw OrthancException("No C-STORE request handler factory"); } } @@ -278,7 +278,7 @@ } else { - throw PalanthirException("No application entity filter"); + throw OrthancException("No application entity filter"); } }
--- a/OrthancServer/DicomProtocol/DicomServer.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/DicomServer.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -29,7 +29,7 @@ #include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> -namespace Palanthir +namespace Orthanc { class DicomServer : public boost::noncopyable {
--- a/OrthancServer/DicomProtocol/DicomUserConnection.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/DicomUserConnection.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -20,7 +20,7 @@ #include "DicomUserConnection.h" -#include "../../Core/PalanthirException.h" +#include "../../Core/OrthancException.h" #include "../ToDcmtkBridge.h" #include "../FromDcmtkBridge.h" @@ -46,7 +46,7 @@ #endif -namespace Palanthir +namespace Orthanc { struct DicomUserConnection::PImpl { @@ -70,7 +70,7 @@ { if (cond.bad()) { - throw PalanthirException("DicomUserConnection: " + std::string(cond.text())); + throw OrthancException("DicomUserConnection: " + std::string(cond.text())); } } @@ -78,7 +78,7 @@ { if (!IsOpen()) { - throw PalanthirException("DicomUserConnection: First open the connection"); + throw OrthancException("DicomUserConnection: First open the connection"); } } @@ -170,7 +170,7 @@ DIC_UI sopInstance; if (!DU_findSOPClassAndInstanceInDataSet(dcmff.getDataset(), sopClass, sopInstance)) { - throw PalanthirException("DicomUserConnection: Unable to find the SOP class and instance"); + throw OrthancException("DicomUserConnection: Unable to find the SOP class and instance"); } // Figure out which of the accepted presentation contexts should be used @@ -180,7 +180,7 @@ const char *modalityName = dcmSOPClassUIDToModality(sopClass); if (!modalityName) modalityName = dcmFindNameOfUID(sopClass); if (!modalityName) modalityName = "unknown SOP class"; - throw PalanthirException("DicomUserConnection: No presentation context for modality " + + throw OrthancException("DicomUserConnection: No presentation context for modality " + std::string(modalityName)); } @@ -306,14 +306,14 @@ break; default: - throw PalanthirException(ErrorCode_ParameterOutOfRange); + throw OrthancException(ErrorCode_ParameterOutOfRange); } // Figure out which of the accepted presentation contexts should be used int presID = ASC_findAcceptedPresentationContextID(pimpl_->assoc_, sopClass); if (presID == 0) { - throw PalanthirException("DicomUserConnection: The C-FIND command is not supported by the distant AET"); + throw OrthancException("DicomUserConnection: The C-FIND command is not supported by the distant AET"); } T_DIMSE_C_FindRQ request; @@ -403,7 +403,7 @@ int presID = ASC_findAcceptedPresentationContextID(pimpl_->assoc_, sopClass); if (presID == 0) { - throw PalanthirException("DicomUserConnection: The C-MOVE command is not supported by the distant AET"); + throw OrthancException("DicomUserConnection: The C-MOVE command is not supported by the distant AET"); } T_DIMSE_C_MoveRQ request; @@ -471,7 +471,7 @@ { if (host.size() > HOST_NAME_MAX - 10) { - throw PalanthirException("Distant host name is too long"); + throw OrthancException("Distant host name is too long"); } Close(); @@ -519,7 +519,7 @@ if (ASC_countAcceptedPresentationContexts(pimpl_->params_) == 0) { - throw PalanthirException("DicomUserConnection: No Acceptable Presentation Contexts"); + throw OrthancException("DicomUserConnection: No Acceptable Presentation Contexts"); } }
--- a/OrthancServer/DicomProtocol/DicomUserConnection.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/DicomUserConnection.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -26,7 +26,7 @@ #include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> -namespace Palanthir +namespace Orthanc { class DicomUserConnection : public boost::noncopyable {
--- a/OrthancServer/DicomProtocol/IApplicationEntityFilter.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/IApplicationEntityFilter.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -22,7 +22,7 @@ #include <string> -namespace Palanthir +namespace Orthanc { class IApplicationEntityFilter {
--- a/OrthancServer/DicomProtocol/IFindRequestHandler.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/IFindRequestHandler.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -26,7 +26,7 @@ #include <string> -namespace Palanthir +namespace Orthanc { class IFindRequestHandler {
--- a/OrthancServer/DicomProtocol/IFindRequestHandlerFactory.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/IFindRequestHandlerFactory.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -22,7 +22,7 @@ #include "IFindRequestHandler.h" -namespace Palanthir +namespace Orthanc { class IFindRequestHandlerFactory {
--- a/OrthancServer/DicomProtocol/IMoveRequestHandler.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/IMoveRequestHandler.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -26,7 +26,7 @@ #include <string> -namespace Palanthir +namespace Orthanc { class IMoveRequestIterator {
--- a/OrthancServer/DicomProtocol/IMoveRequestHandlerFactory.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/IMoveRequestHandlerFactory.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -22,7 +22,7 @@ #include "IMoveRequestHandler.h" -namespace Palanthir +namespace Orthanc { class IMoveRequestHandlerFactory {
--- a/OrthancServer/DicomProtocol/IStoreRequestHandler.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/IStoreRequestHandler.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -26,7 +26,7 @@ #include <string> #include <json/json.h> -namespace Palanthir +namespace Orthanc { class IStoreRequestHandler {
--- a/OrthancServer/DicomProtocol/IStoreRequestHandlerFactory.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/DicomProtocol/IStoreRequestHandlerFactory.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -22,7 +22,7 @@ #include "IStoreRequestHandler.h" -namespace Palanthir +namespace Orthanc { class IStoreRequestHandlerFactory {
--- a/OrthancServer/FromDcmtkBridge.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/FromDcmtkBridge.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -22,7 +22,7 @@ #include "ToDcmtkBridge.h" #include "DicomIntegerPixelAccessor.h" -#include "../Core/PalanthirException.h" +#include "../Core/OrthancException.h" #include "../Core/PngWriter.h" #include "../Core/DicomFormat/DicomString.h" #include "../Core/DicomFormat/DicomNullValue.h" @@ -45,7 +45,7 @@ #include <boost/math/special_functions/round.hpp> -namespace Palanthir +namespace Orthanc { void FromDcmtkBridge::Convert(DicomMap& target, DcmDataset& dataset) { @@ -73,7 +73,7 @@ { if (!element.isLeaf()) { - throw PalanthirException("Only applicable to leaf elements"); + throw OrthancException("Only applicable to leaf elements"); } if (element.isaString()) @@ -370,7 +370,7 @@ DcmFileFormat dicom; if (!dicom.loadFile(path.c_str()).good()) { - throw PalanthirException(ErrorCode_BadFileFormat); + throw OrthancException(ErrorCode_BadFileFormat); } else { @@ -473,7 +473,7 @@ break; default: - throw PalanthirException(ErrorCode_NotImplemented); + throw OrthancException(ErrorCode_NotImplemented); } if (accessor.get() == NULL || @@ -500,7 +500,7 @@ break; default: - throw PalanthirException(ErrorCode_NotImplemented); + throw OrthancException(ErrorCode_NotImplemented); } } } @@ -525,7 +525,7 @@ } else { - throw PalanthirException(ErrorCode_BadFileFormat); + throw OrthancException(ErrorCode_BadFileFormat); } } @@ -556,7 +556,7 @@ if (entry == NULL) { dcmDataDict.unlock(); - throw PalanthirException("Unknown DICOM tag"); + throw OrthancException("Unknown DICOM tag"); } else { @@ -585,7 +585,7 @@ { if (result.type() != Json::objectValue) { - throw PalanthirException(ErrorCode_BadParameterType); + throw OrthancException(ErrorCode_BadParameterType); } result.clear();
--- a/OrthancServer/FromDcmtkBridge.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/FromDcmtkBridge.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -24,7 +24,7 @@ #include <dcmtk/dcmdata/dcdatset.h> #include <json/json.h> -namespace Palanthir +namespace Orthanc { enum ImageExtractionMode {
--- a/OrthancServer/Internals/CommandDispatcher.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/Internals/CommandDispatcher.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -30,7 +30,7 @@ static OFBool opt_rejectWithoutImplementationUID = OFFalse; -namespace Palanthir +namespace Orthanc { namespace Internals {
--- a/OrthancServer/Internals/CommandDispatcher.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/Internals/CommandDispatcher.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -26,7 +26,7 @@ #include <dcmtk/dcmnet/assoc.h> #include <dcmtk/dcmnet/dimse.h> -namespace Palanthir +namespace Orthanc { namespace Internals {
--- a/OrthancServer/Internals/FindScp.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/Internals/FindScp.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -22,7 +22,7 @@ #include "../FromDcmtkBridge.h" #include "../ToDcmtkBridge.h" -#include "../../Core/PalanthirException.h" +#include "../../Core/OrthancException.h" #include <dcmtk/dcmdata/dcfilefo.h> #include <dcmtk/dcmdata/dcmetinf.h> @@ -31,7 +31,7 @@ #include <dcmtk/dcmnet/diutil.h> -namespace Palanthir +namespace Orthanc { namespace Internals { @@ -74,7 +74,7 @@ { data.handler_->Handle(data.input_, data.answers_); } - catch (PalanthirException& e) + catch (OrthancException& e) { // Internal error! OFLOG_ERROR(Internals::Logger, "IFindRequestHandler Failed: " << e.What());
--- a/OrthancServer/Internals/FindScp.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/Internals/FindScp.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -25,7 +25,7 @@ #include <dcmtk/dcmnet/assoc.h> #include <dcmtk/dcmnet/dimse.h> -namespace Palanthir +namespace Orthanc { namespace Internals {
--- a/OrthancServer/Internals/MoveScp.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/Internals/MoveScp.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -24,7 +24,7 @@ #include "../FromDcmtkBridge.h" #include "../ToDcmtkBridge.h" -#include "../../Core/PalanthirException.h" +#include "../../Core/OrthancException.h" #include <dcmtk/dcmdata/dcfilefo.h> #include <dcmtk/dcmdata/dcmetinf.h> @@ -33,7 +33,7 @@ #include <dcmtk/dcmnet/diutil.h> -namespace Palanthir +namespace Orthanc { namespace Internals { @@ -84,7 +84,7 @@ data.failureCount_ = 0; data.warningCount_ = 0; } - catch (PalanthirException& e) + catch (OrthancException& e) { // Internal error! OFLOG_ERROR(Internals::Logger, "IMoveRequestHandler Failed: " << e.What()); @@ -113,7 +113,7 @@ { status = data.iterator_->DoNext(); } - catch (PalanthirException& e) + catch (OrthancException& e) { // Internal error! OFLOG_ERROR(Internals::Logger, "IMoveRequestHandler Failed: " << e.What());
--- a/OrthancServer/Internals/MoveScp.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/Internals/MoveScp.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -25,7 +25,7 @@ #include <dcmtk/dcmnet/assoc.h> #include <dcmtk/dcmnet/dimse.h> -namespace Palanthir +namespace Orthanc { namespace Internals {
--- a/OrthancServer/Internals/StoreScp.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/Internals/StoreScp.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -22,7 +22,7 @@ #include "../FromDcmtkBridge.h" #include "../ToDcmtkBridge.h" -#include "../../Core/PalanthirException.h" +#include "../../Core/OrthancException.h" #include <dcmtk/dcmdata/dcfilefo.h> #include <dcmtk/dcmdata/dcmetinf.h> @@ -31,7 +31,7 @@ #include <dcmtk/dcmnet/diutil.h> -namespace Palanthir +namespace Orthanc { namespace Internals { @@ -188,7 +188,7 @@ { cbdata->handler->Handle(buffer, summary, dicomJson, cbdata->distantAET); } - catch (PalanthirException& e) + catch (OrthancException& e) { rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources; OFLOG_ERROR(Internals::Logger, "Exception while storing DICOM: " << e.What());
--- a/OrthancServer/Internals/StoreScp.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/Internals/StoreScp.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -25,7 +25,7 @@ #include <dcmtk/dcmnet/assoc.h> #include <dcmtk/dcmnet/dimse.h> -namespace Palanthir +namespace Orthanc { namespace Internals {
--- a/OrthancServer/OrthancInitialization.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/OrthancInitialization.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -18,9 +18,9 @@ **/ -#include "PalanthirInitialization.h" +#include "OrthancInitialization.h" -#include "../Core/PalanthirException.h" +#include "../Core/OrthancException.h" #include "../Core/Toolbox.h" #include <boost/lexical_cast.hpp> @@ -28,7 +28,7 @@ #include <curl/curl.h> #include <boost/thread.hpp> -namespace Palanthir +namespace Orthanc { static const char* CONFIGURATION_FILE = "Configuration.json"; @@ -50,8 +50,8 @@ { try { -#if PALANTHIR_STANDALONE == 0 - boost::filesystem::path p = PALANTHIR_PATH; +#if ORTHANC_STANDALONE == 0 + boost::filesystem::path p = ORTHANC_PATH; p /= "Resources"; p /= CONFIGURATION_FILE; Toolbox::ReadFile(content, p.string()); @@ -59,7 +59,7 @@ Toolbox::ReadFile(content, CONFIGURATION_FILE); #endif } - catch (PalanthirException&) + catch (OrthancException&) { // No configuration file found, give up with empty configuration return; @@ -69,12 +69,12 @@ Json::Reader reader; if (!reader.parse(content, *configuration_)) { - throw PalanthirException("Unable to read the configuration file"); + throw OrthancException("Unable to read the configuration file"); } } - void PalanthirInitialize(const char* configurationFile) + void OrthancInitialize(const char* configurationFile) { boost::mutex::scoped_lock lock(globalMutex_); ReadGlobalConfiguration(configurationFile); @@ -83,7 +83,7 @@ - void PalanthirFinalize() + void OrthancFinalize() { boost::mutex::scoped_lock lock(globalMutex_); curl_global_cleanup(); @@ -150,14 +150,14 @@ if (!configuration_->isMember("DicomModalities")) { - throw PalanthirException(""); + throw OrthancException(""); } const Json::Value& modalities = (*configuration_) ["DicomModalities"]; if (modalities.type() != Json::objectValue || !modalities.isMember(name)) { - throw PalanthirException(""); + throw OrthancException(""); } try @@ -168,7 +168,7 @@ } catch (...) { - throw PalanthirException("Badly formatted DICOM modality"); + throw OrthancException("Badly formatted DICOM modality"); } } @@ -188,7 +188,7 @@ const Json::Value& modalities = (*configuration_) ["DicomModalities"]; if (modalities.type() != Json::objectValue) { - throw PalanthirException("Badly formatted list of DICOM modalities"); + throw OrthancException("Badly formatted list of DICOM modalities"); } Json::Value::Members members = modalities.getMemberNames(); @@ -198,7 +198,7 @@ { if (!isalnum(members[i][j]) && members[i][j] != '-') { - throw PalanthirException("Only alphanumeric and dash characters are allowed in the names of the modalities"); + throw OrthancException("Only alphanumeric and dash characters are allowed in the names of the modalities"); } } @@ -222,7 +222,7 @@ const Json::Value& users = (*configuration_) ["RegisteredUsers"]; if (users.type() != Json::objectValue) { - throw PalanthirException("Badly formatted list of users"); + throw OrthancException("Badly formatted list of users"); } Json::Value::Members usernames = users.getMemberNames();
--- a/OrthancServer/OrthancInitialization.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/OrthancInitialization.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -25,11 +25,11 @@ #include <json/json.h> #include "../Core/HttpServer/MongooseServer.h" -namespace Palanthir +namespace Orthanc { - void PalanthirInitialize(const char* configurationFile = NULL); + void OrthancInitialize(const char* configurationFile = NULL); - void PalanthirFinalize(); + void OrthancFinalize(); std::string GetGlobalStringParameter(const std::string& parameter, const std::string& defaultValue);
--- a/OrthancServer/OrthancRestApi.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/OrthancRestApi.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -18,9 +18,9 @@ **/ -#include "PalanthirRestApi.h" +#include "OrthancRestApi.h" -#include "PalanthirInitialization.h" +#include "OrthancInitialization.h" #include "FromDcmtkBridge.h" #include "../Core/Uuid.h" @@ -28,7 +28,7 @@ #include <dcmtk/dcmdata/dcfilefo.h> #include <boost/lexical_cast.hpp> -namespace Palanthir +namespace Orthanc { static void SendJson(HttpOutput& output, const Json::Value& value) @@ -96,14 +96,14 @@ Json::Reader reader; if (!reader.parse(s, source)) { - throw PalanthirException("Corrupted JSON file"); + throw OrthancException("Corrupted JSON file"); } SimplifyTagsRecursion(target, source); } - bool PalanthirRestApi::Store(Json::Value& result, + bool OrthancRestApi::Store(Json::Value& result, const std::string& postData) { // Prepare an input stream for the memory buffer @@ -156,20 +156,20 @@ return false; } - void PalanthirRestApi::ConnectToModality(DicomUserConnection& c, + void OrthancRestApi::ConnectToModality(DicomUserConnection& c, const std::string& name) { std::string aet, address; int port; GetDicomModality(name, aet, address, port); - c.SetLocalApplicationEntityTitle(GetGlobalStringParameter("DicomAet", "PALANTHIR")); + c.SetLocalApplicationEntityTitle(GetGlobalStringParameter("DicomAet", "ORTHANC")); c.SetDistantApplicationEntityTitle(aet); c.SetDistantHost(address); c.SetDistantPort(port); c.Open(); } - bool PalanthirRestApi::MergeQueryAndTemplate(DicomMap& result, + bool OrthancRestApi::MergeQueryAndTemplate(DicomMap& result, const std::string& postData) { Json::Value query; @@ -191,7 +191,7 @@ return true; } - bool PalanthirRestApi::DicomFindPatient(Json::Value& result, + bool OrthancRestApi::DicomFindPatient(Json::Value& result, DicomUserConnection& c, const std::string& postData) { @@ -208,7 +208,7 @@ return true; } - bool PalanthirRestApi::DicomFindStudy(Json::Value& result, + bool OrthancRestApi::DicomFindStudy(Json::Value& result, DicomUserConnection& c, const std::string& postData) { @@ -231,7 +231,7 @@ return true; } - bool PalanthirRestApi::DicomFindSeries(Json::Value& result, + bool OrthancRestApi::DicomFindSeries(Json::Value& result, DicomUserConnection& c, const std::string& postData) { @@ -255,7 +255,7 @@ return true; } - bool PalanthirRestApi::DicomFind(Json::Value& result, + bool OrthancRestApi::DicomFind(Json::Value& result, DicomUserConnection& c, const std::string& postData) { @@ -325,7 +325,7 @@ - bool PalanthirRestApi::DicomStore(Json::Value& result, + bool OrthancRestApi::DicomStore(Json::Value& result, DicomUserConnection& c, const std::string& postData) { @@ -371,7 +371,7 @@ } - PalanthirRestApi::PalanthirRestApi(ServerIndex& index, + OrthancRestApi::OrthancRestApi(ServerIndex& index, const std::string& path) : index_(index), storage_(path) @@ -380,7 +380,7 @@ } - void PalanthirRestApi::Handle( + void OrthancRestApi::Handle( HttpOutput& output, const std::string& method, const UriComponents& uri, @@ -426,7 +426,7 @@ } else { - output.SendHeader(Palanthir_HttpStatus_415_UnsupportedMediaType); + output.SendHeader(Orthanc_HttpStatus_415_UnsupportedMediaType); return; } } @@ -647,13 +647,13 @@ } else { - throw PalanthirException(ErrorCode_InternalError); + throw OrthancException(ErrorCode_InternalError); } output.AnswerBufferWithContentType(png, "image/png"); return; } - catch (PalanthirException&) + catch (OrthancException&) { output.Redirect("/app/images/Unsupported.png"); return; @@ -681,7 +681,7 @@ } catch (boost::bad_lexical_cast) { - output.SendHeader(Palanthir_HttpStatus_400_BadRequest); + output.SendHeader(Orthanc_HttpStatus_400_BadRequest); return; } @@ -692,7 +692,7 @@ if (!index_.GetChanges(result, since, filter, limit)) { - output.SendHeader(Palanthir_HttpStatus_400_BadRequest); + output.SendHeader(Orthanc_HttpStatus_400_BadRequest); return; } @@ -782,7 +782,7 @@ (uri[2] == "find" && !DicomFind(result, connection, postData)) || (uri[2] == "store" && !DicomStore(result, connection, postData))) { - output.SendHeader(Palanthir_HttpStatus_400_BadRequest); + output.SendHeader(Orthanc_HttpStatus_400_BadRequest); return; } } @@ -796,7 +796,7 @@ } else { - output.SendHeader(Palanthir_HttpStatus_404_NotFound); + output.SendHeader(Orthanc_HttpStatus_404_NotFound); } } }
--- a/OrthancServer/OrthancRestApi.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/OrthancRestApi.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -27,9 +27,9 @@ #include <set> -namespace Palanthir +namespace Orthanc { - class PalanthirRestApi : public HttpHandler + class OrthancRestApi : public HttpHandler { private: typedef std::set<std::string> Modalities; @@ -68,7 +68,7 @@ const std::string& postData); public: - PalanthirRestApi(ServerIndex& index, + OrthancRestApi(ServerIndex& index, const std::string& path); virtual bool IsServedUri(const UriComponents& uri)
--- a/OrthancServer/ServerIndex.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/ServerIndex.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -20,7 +20,7 @@ #include "ServerIndex.h" -using namespace Palanthir; +using namespace Orthanc; #ifndef NOMINMAX #define NOMINMAX @@ -36,7 +36,7 @@ #include <boost/lexical_cast.hpp> #include <stdio.h> -namespace Palanthir +namespace Orthanc { namespace Internals { @@ -109,7 +109,7 @@ case 3: return "series"; default: - throw PalanthirException(ErrorCode_InternalError); + throw OrthancException(ErrorCode_InternalError); } } @@ -526,7 +526,7 @@ return StoreStatus_Success; //t.Rollback(); } - catch (PalanthirException& e) + catch (OrthancException& e) { std::cout << "EXCEPT2 [" << e.What() << "]" << " " << db_.GetErrorMessage() << std::endl; }
--- a/OrthancServer/ServerIndex.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/ServerIndex.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -26,7 +26,7 @@ #include "../Core/FileStorage.h" -namespace Palanthir +namespace Orthanc { enum SeriesStatus {
--- a/OrthancServer/ToDcmtkBridge.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/ToDcmtkBridge.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -25,7 +25,7 @@ #include <dcmtk/dcmnet/diutil.h> -namespace Palanthir +namespace Orthanc { DcmTagKey ToDcmtkBridge::Convert(const DicomTag& tag) {
--- a/OrthancServer/ToDcmtkBridge.h Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/ToDcmtkBridge.h Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -24,7 +24,7 @@ #include <dcmtk/dcmdata/dcdatset.h> -namespace Palanthir +namespace Orthanc { class ToDcmtkBridge {
--- a/OrthancServer/main.cpp Sun Sep 16 09:30:31 2012 +0200 +++ b/OrthancServer/main.cpp Sun Sep 16 09:33:19 2012 +0200 @@ -1,5 +1,5 @@ /** - * Palanthir - A Lightweight, RESTful DICOM Store + * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012 Medical Physics Department, CHU of Liege, * Belgium * @@ -18,7 +18,7 @@ **/ -#include "PalanthirRestApi.h" +#include "OrthancRestApi.h" #include <stdio.h> @@ -26,10 +26,10 @@ #include "../Core/HttpServer/FilesystemHttpHandler.h" #include "../Core/HttpServer/MongooseServer.h" #include "DicomProtocol/DicomServer.h" -#include "PalanthirInitialization.h" +#include "OrthancInitialization.h" -using namespace Palanthir; +using namespace Orthanc; class MyDicomStore : public IStoreRequestHandler @@ -99,14 +99,14 @@ { if (argc >= 2) { - PalanthirInitialize(argv[1]); + OrthancInitialize(argv[1]); } else { - PalanthirInitialize(); + OrthancInitialize(); } - std::string storageDirectory = GetGlobalStringParameter("StorageDirectory", "PalanthirStorage"); + std::string storageDirectory = GetGlobalStringParameter("StorageDirectory", "OrthancStorage"); ServerIndex index(storageDirectory); MyDicomStoreFactory storeScp(index, storageDirectory); @@ -116,7 +116,7 @@ dicomServer.SetCalledApplicationEntityTitleCheck(GetGlobalBoolParameter("DicomCheckCalledAet", false)); dicomServer.SetStoreRequestHandlerFactory(storeScp); dicomServer.SetPortNumber(GetGlobalIntegerParameter("DicomPort", 4242)); - dicomServer.SetApplicationEntityTitle(GetGlobalStringParameter("DicomAet", "PALANTHIR")); + dicomServer.SetApplicationEntityTitle(GetGlobalStringParameter("DicomAet", "ORTHANC")); // HTTP server MongooseServer httpServer; @@ -137,13 +137,13 @@ httpServer.SetSslEnabled(false); } -#if PALANTHIR_STANDALONE == 1 - httpServer.RegisterHandler(new EmbeddedResourceHttpHandler("/app", EmbeddedResources::PALANTHIR_EXPLORER)); +#if ORTHANC_STANDALONE == 1 + httpServer.RegisterHandler(new EmbeddedResourceHttpHandler("/app", EmbeddedResources::ORTHANC_EXPLORER)); #else - httpServer.RegisterHandler(new FilesystemHttpHandler("/app", PALANTHIR_PATH "/PalanthirExplorer")); + httpServer.RegisterHandler(new FilesystemHttpHandler("/app", ORTHANC_PATH "/OrthancExplorer")); #endif - httpServer.RegisterHandler(new PalanthirRestApi(index, storageDirectory)); + httpServer.RegisterHandler(new OrthancRestApi(index, storageDirectory)); // GO !!! httpServer.Start(); @@ -158,12 +158,12 @@ storeScp.Done(); } - catch (PalanthirException& e) + catch (OrthancException& e) { std::cout << "EXCEPT [" << e.What() << "]" << std::endl; } - PalanthirFinalize(); + OrthancFinalize(); return 0; }