comparison Framework/Oracle/ParseDicomFileCommand.h @ 1134:87fbeb823375 broker

allocating messages from oracle commands on the stack
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 Nov 2019 15:16:45 +0100
parents 8e3763d1736a
children a0a33e5ea5bb
comparison
equal deleted inserted replaced
1133:0e3a3be313fd 1134:87fbeb823375
39 namespace OrthancStone 39 namespace OrthancStone
40 { 40 {
41 class ParseDicomFileCommand : public OracleCommandBase 41 class ParseDicomFileCommand : public OracleCommandBase
42 { 42 {
43 public: 43 public:
44 class SuccessMessage : public OriginMessage<ParseDicomFileCommand> 44 class SuccessMessage : public OracleMessageBase
45 { 45 {
46 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__); 46 ORTHANC_STONE_MESSAGE(__FILE__, __LINE__);
47 47
48 private: 48 private:
49 boost::shared_ptr<Orthanc::ParsedDicomFile> dicom_; 49 Orthanc::ParsedDicomFile& dicom_;
50 size_t fileSize_; 50 size_t fileSize_;
51 bool hasPixelData_; 51 bool hasPixelData_;
52 std::string sopInstanceUid_; 52 std::string sopInstanceUid_;
53 53
54 void Setup();
55
56 public: 54 public:
57 SuccessMessage(const ParseDicomFileCommand& command, 55 SuccessMessage(ParseDicomFileCommand& command,
58 DcmFileFormat& dicom, 56 Orthanc::ParsedDicomFile& dicom,
59 size_t fileSize, 57 size_t fileSize,
60 bool hasPixelData); 58 bool hasPixelData);
61 59
62 SuccessMessage(const ParseDicomFileCommand& command, 60 Orthanc::ParsedDicomFile& GetDicom() const
63 boost::shared_ptr<Orthanc::ParsedDicomFile> dicom,
64 size_t fileSize,
65 bool hasPixelData);
66
67 boost::shared_ptr<Orthanc::ParsedDicomFile> GetDicom() const
68 { 61 {
69 return dicom_; 62 return dicom_;
70 } 63 }
71 64
72 size_t GetFileSize() const 65 size_t GetFileSize() const