comparison OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp @ 4140:0ddc5297a8ab

centralization of default parameters for JSON/DicomMap conversions from DCMTK
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Aug 2020 10:46:50 +0200
parents a4f28efdfccf
children d962a2996637
comparison
equal deleted inserted replaced
4139:a4f28efdfccf 4140:0ddc5297a8ab
570 * Retrieve a summary of the DICOM tags, which is 570 * Retrieve a summary of the DICOM tags, which is
571 * necessary to deal with MONOCHROME1 photometric 571 * necessary to deal with MONOCHROME1 photometric
572 * interpretation, and with windowing parameters. 572 * interpretation, and with windowing parameters.
573 **/ 573 **/
574 ServerContext::DicomCacheLocker locker(context, publicId); 574 ServerContext::DicomCacheLocker locker(context, publicId);
575 locker.GetDicom().ExtractDicomSummary(dicom, ORTHANC_MAXIMUM_TAG_LENGTH); 575 OrthancConfiguration::DefaultExtractDicomSummary(dicom, locker.GetDicom());
576 } 576 }
577 } 577 }
578 catch (OrthancException& e) 578 catch (OrthancException& e)
579 { 579 {
580 if (e.GetErrorCode() == ErrorCode_ParameterOutOfRange || 580 if (e.GetErrorCode() == ErrorCode_ParameterOutOfRange ||
1994 // speed up things here 1994 // speed up things here
1995 1995
1996 ParsedDicomFile dicom(dicomContent); 1996 ParsedDicomFile dicom(dicomContent);
1997 1997
1998 Json::Value header; 1998 Json::Value header;
1999 dicom.HeaderToJson(header, DicomToJsonFormat_Full); 1999 OrthancConfiguration::DefaultDicomHeaderToJson(header, dicom);
2000 2000
2001 AnswerDicomAsJson(call, header); 2001 AnswerDicomAsJson(call, header);
2002 } 2002 }
2003 2003
2004 2004