Loading .hg_archival.txt +4 −4 Original line number Diff line number Diff line repo: 3959d33612ccaadc0d4d707227fbed09ac35e5fe node: 169e0920634088ba788ac5816ec96c2b1739e1c8 branch: Orthanc-1.5.2 node: 6f5e38ec1f120b8c0ac9c7bfaeafd50ef819d863 branch: Orthanc-1.5.3 latesttag: dcmtk-3.6.1 latesttagdistance: 660 changessincelatesttag: 768 latesttagdistance: 677 changessincelatesttag: 786 Core/DicomNetworking/DicomFindAnswers.cpp +29 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,35 @@ namespace Orthanc DcmDataset* DicomFindAnswers::ExtractDcmDataset(size_t index) const { return new DcmDataset(*GetAnswer(index).GetDcmtkObject().getDataset()); // As "DicomFindAnswers" stores its content using class // "ParsedDicomFile" (that internally uses "DcmFileFormat" from // DCMTK), the dataset can contain tags that are reserved if // storing the media on the disk, notably tag // "MediaStorageSOPClassUID" (0002,0002). In this function, we // remove all those tags whose group is below 0x0008. The // resulting data set is clean for emission in the C-FIND SCP. // http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1.1.3 // https://groups.google.com/d/msg/orthanc-users/D3kpPuX8yV0/_zgHOzkMEQAJ DcmDataset& source = *GetAnswer(index).GetDcmtkObject().getDataset(); std::auto_ptr<DcmDataset> target(new DcmDataset); for (unsigned long i = 0; i < source.card(); i++) { const DcmElement* element = source.getElement(i); assert(element != NULL); if (element != NULL && element->getTag().getGroup() >= 0x0008 && element->getTag().getElement() != 0x0000) { target->insert(dynamic_cast<DcmElement*>(element->clone())); } } return target.release(); } Loading Core/DicomParsing/FromDcmtkBridge.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -2055,7 +2055,7 @@ DCMTK_TO_CTYPE_CONVERTER(DcmtkToFloat64Converter, Float64, DcmFloatingPointDoubl if (output.type() != Json::objectValue) { throw OrthancException(ErrorCode_LuaBadOutput, "Lua: IncomingFindRequestFilter must return a table"); "Lua: The script must return a table"); } Json::Value::Members members = output.getMemberNames(); Loading @@ -2065,7 +2065,7 @@ DCMTK_TO_CTYPE_CONVERTER(DcmtkToFloat64Converter, Float64, DcmFloatingPointDoubl if (output[members[i]].type() != Json::stringValue) { throw OrthancException(ErrorCode_LuaBadOutput, "Lua: IncomingFindRequestFilter must return a table " "Lua: The script must return a table " "mapping names of DICOM tags to strings"); } Loading Core/HttpServer/FilesystemHttpSender.h +7 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,13 @@ namespace Orthanc Initialize(path); } FilesystemHttpSender(const std::string& path, MimeType contentType) { SetContentType(contentType); Initialize(path); } FilesystemHttpSender(const FilesystemStorage& storage, const std::string& uuid) { Loading Core/HttpServer/HttpOutput.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -407,12 +407,6 @@ namespace Orthanc throw OrthancException(ErrorCode_ParameterOutOfRange); } if (keepAlive_) { throw OrthancException(ErrorCode_NotImplemented, "Multipart answers are not implemented together with keep-alive connections"); } if (state_ != State_WritingHeader) { throw OrthancException(ErrorCode_BadSequenceOfCalls); Loading @@ -428,6 +422,20 @@ namespace Orthanc std::string header = "HTTP/1.1 200 OK\r\n"; if (keepAlive_) { #if ORTHANC_ENABLE_MONGOOSE == 1 throw OrthancException(ErrorCode_NotImplemented, "Multipart answers are not implemented together " "with keep-alive connections if using Mongoose"); #else // Turn off Keep-Alive for multipart answers // https://github.com/civetweb/civetweb/issues/727 stream_.DisableKeepAlive(); header += "Connection: close\r\n"; #endif } // Possibly add the cookies for (std::list<std::string>::const_iterator it = headers_.begin(); it != headers_.end(); ++it) Loading Loading
.hg_archival.txt +4 −4 Original line number Diff line number Diff line repo: 3959d33612ccaadc0d4d707227fbed09ac35e5fe node: 169e0920634088ba788ac5816ec96c2b1739e1c8 branch: Orthanc-1.5.2 node: 6f5e38ec1f120b8c0ac9c7bfaeafd50ef819d863 branch: Orthanc-1.5.3 latesttag: dcmtk-3.6.1 latesttagdistance: 660 changessincelatesttag: 768 latesttagdistance: 677 changessincelatesttag: 786
Core/DicomNetworking/DicomFindAnswers.cpp +29 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,35 @@ namespace Orthanc DcmDataset* DicomFindAnswers::ExtractDcmDataset(size_t index) const { return new DcmDataset(*GetAnswer(index).GetDcmtkObject().getDataset()); // As "DicomFindAnswers" stores its content using class // "ParsedDicomFile" (that internally uses "DcmFileFormat" from // DCMTK), the dataset can contain tags that are reserved if // storing the media on the disk, notably tag // "MediaStorageSOPClassUID" (0002,0002). In this function, we // remove all those tags whose group is below 0x0008. The // resulting data set is clean for emission in the C-FIND SCP. // http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1.1.3 // https://groups.google.com/d/msg/orthanc-users/D3kpPuX8yV0/_zgHOzkMEQAJ DcmDataset& source = *GetAnswer(index).GetDcmtkObject().getDataset(); std::auto_ptr<DcmDataset> target(new DcmDataset); for (unsigned long i = 0; i < source.card(); i++) { const DcmElement* element = source.getElement(i); assert(element != NULL); if (element != NULL && element->getTag().getGroup() >= 0x0008 && element->getTag().getElement() != 0x0000) { target->insert(dynamic_cast<DcmElement*>(element->clone())); } } return target.release(); } Loading
Core/DicomParsing/FromDcmtkBridge.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -2055,7 +2055,7 @@ DCMTK_TO_CTYPE_CONVERTER(DcmtkToFloat64Converter, Float64, DcmFloatingPointDoubl if (output.type() != Json::objectValue) { throw OrthancException(ErrorCode_LuaBadOutput, "Lua: IncomingFindRequestFilter must return a table"); "Lua: The script must return a table"); } Json::Value::Members members = output.getMemberNames(); Loading @@ -2065,7 +2065,7 @@ DCMTK_TO_CTYPE_CONVERTER(DcmtkToFloat64Converter, Float64, DcmFloatingPointDoubl if (output[members[i]].type() != Json::stringValue) { throw OrthancException(ErrorCode_LuaBadOutput, "Lua: IncomingFindRequestFilter must return a table " "Lua: The script must return a table " "mapping names of DICOM tags to strings"); } Loading
Core/HttpServer/FilesystemHttpSender.h +7 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,13 @@ namespace Orthanc Initialize(path); } FilesystemHttpSender(const std::string& path, MimeType contentType) { SetContentType(contentType); Initialize(path); } FilesystemHttpSender(const FilesystemStorage& storage, const std::string& uuid) { Loading
Core/HttpServer/HttpOutput.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -407,12 +407,6 @@ namespace Orthanc throw OrthancException(ErrorCode_ParameterOutOfRange); } if (keepAlive_) { throw OrthancException(ErrorCode_NotImplemented, "Multipart answers are not implemented together with keep-alive connections"); } if (state_ != State_WritingHeader) { throw OrthancException(ErrorCode_BadSequenceOfCalls); Loading @@ -428,6 +422,20 @@ namespace Orthanc std::string header = "HTTP/1.1 200 OK\r\n"; if (keepAlive_) { #if ORTHANC_ENABLE_MONGOOSE == 1 throw OrthancException(ErrorCode_NotImplemented, "Multipart answers are not implemented together " "with keep-alive connections if using Mongoose"); #else // Turn off Keep-Alive for multipart answers // https://github.com/civetweb/civetweb/issues/727 stream_.DisableKeepAlive(); header += "Connection: close\r\n"; #endif } // Possibly add the cookies for (std::list<std::string>::const_iterator it = headers_.begin(); it != headers_.end(); ++it) Loading