# HG changeset patch # User Alain Mazy # Date 1674820615 -3600 # Node ID 2df546a76e17f82e480ca049011ef36bbe2b5d88 # Parent 19ccae2e0371166d8ffc1fc435653fa301aaac45 If specifying 'Transcode' option to /modify or /anonymize, this value will take over the 'IngestTranscoding' global configuration diff -r 19ccae2e0371 -r 2df546a76e17 NEWS --- a/NEWS Fri Jan 27 11:49:28 2023 +0100 +++ b/NEWS Fri Jan 27 12:56:55 2023 +0100 @@ -26,6 +26,8 @@ tags (PatientName, PatientBirthDate, ...) * Automatically reconstruct the modified resources at the end of the DICOM modifications job to ensure improved consistency of the DICOM model. +* If specifying 'Transcode' option to /modify or /anonymize, this value will take over the 'IngestTranscoding' + global configuration * Allow the HTTP server to return responses > 2GB (fixes asynchronous download of zip studies > 2GB) * /modalities/.../store now accepts "CalledAet", "Host", "Port" to override the modality configuration from the configuration file for a specific operation. diff -r 19ccae2e0371 -r 2df546a76e17 OrthancServer/Sources/DicomInstanceToStore.h --- a/OrthancServer/Sources/DicomInstanceToStore.h Fri Jan 27 11:49:28 2023 +0100 +++ b/OrthancServer/Sources/DicomInstanceToStore.h Fri Jan 27 12:56:55 2023 +0100 @@ -47,6 +47,11 @@ MetadataMap metadata_; DicomInstanceOrigin origin_; + bool skipIngestTranscoding_; + + DicomInstanceToStore() + : skipIngestTranscoding_(false) + {} public: virtual ~DicomInstanceToStore() @@ -64,8 +69,16 @@ static DicomInstanceToStore* CreateFromDcmDataset(DcmDataset& dataset); + void SetSkipIngestTranscoding(bool value) + { + skipIngestTranscoding_ = value; + } - + bool SkipIngestTranscoding() const + { + return skipIngestTranscoding_; + } + void SetOrigin(const DicomInstanceOrigin& origin) { origin_ = origin; diff -r 19ccae2e0371 -r 2df546a76e17 OrthancServer/Sources/OrthancRestApi/OrthancRestAnonymizeModify.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestAnonymizeModify.cpp Fri Jan 27 11:49:28 2023 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestAnonymizeModify.cpp Fri Jan 27 12:56:55 2023 +0100 @@ -111,6 +111,9 @@ { // Check out "DicomModification::ParseAnonymizationRequest()" call.GetDocumentation() + .SetRequestField(TRANSCODE, RestApiCallDocumentation::Type_String, + "Transcode the DICOM instances to the provided DICOM transfer syntax: " + "https://book.orthanc-server.com/faq/transcoding.html", false) .SetRequestField(FORCE, RestApiCallDocumentation::Type_Boolean, "Allow the modification of tags related to DICOM identifiers, at the risk of " "breaking the DICOM model of the real world", false) diff -r 19ccae2e0371 -r 2df546a76e17 OrthancServer/Sources/ServerContext.cpp --- a/OrthancServer/Sources/ServerContext.cpp Fri Jan 27 11:49:28 2023 +0100 +++ b/OrthancServer/Sources/ServerContext.cpp Fri Jan 27 12:56:55 2023 +0100 @@ -762,7 +762,7 @@ bool isReconstruct) { - if (!isIngestTranscoding_) + if (!isIngestTranscoding_ || dicom->SkipIngestTranscoding()) { // No automated transcoding. This was the only path in Orthanc <= 1.6.1. return StoreAfterTranscoding(resultPublicId, *dicom, mode, isReconstruct); diff -r 19ccae2e0371 -r 2df546a76e17 OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp --- a/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Fri Jan 27 11:49:28 2023 +0100 +++ b/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Fri Jan 27 12:56:55 2023 +0100 @@ -273,6 +273,7 @@ std::unique_ptr toStore(DicomInstanceToStore::CreateFromParsedDicomFile(*modified)); toStore->SetOrigin(origin_); + toStore->SetSkipIngestTranscoding(transcode_); // do not apply IngestTranscoding if you have forced the transfer syntax during the modification/anonymization /**