comparison Framework/Radiography/RadiographyScene.h @ 417:aee3d7941c9b

preparing to load images using DICOMweb
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Nov 2018 17:28:15 +0100
parents 6decc0ba9da5
children f87f28624b96 087237703d63 b70e9be013e4
comparison
equal deleted inserted replaced
415:c0589c3173fd 417:aee3d7941c9b
72 class AlphaLayer; 72 class AlphaLayer;
73 class DicomLayer; 73 class DicomLayer;
74 74
75 typedef std::map<size_t, RadiographyLayer*> Layers; 75 typedef std::map<size_t, RadiographyLayer*> Layers;
76 76
77 OrthancApiClient& orthanc_; 77 size_t countLayers_;
78 size_t countLayers_; 78 bool hasWindowing_;
79 bool hasWindowing_; 79 float windowingCenter_;
80 float windowingCenter_; 80 float windowingWidth_;
81 float windowingWidth_; 81 Layers layers_;
82 Layers layers_;
83 82
84 RadiographyLayer& RegisterLayer(RadiographyLayer* layer); 83 RadiographyLayer& RegisterLayer(RadiographyLayer* layer);
85 84
86 void OnTagsReceived(const OrthancApiClient::BinaryResponseReadyMessage& message); 85 void OnTagsReceived(const OrthancApiClient::BinaryResponseReadyMessage& message);
87 86
88 void OnFrameReceived(const OrthancApiClient::BinaryResponseReadyMessage& message); 87 void OnFrameReceived(const OrthancApiClient::BinaryResponseReadyMessage& message);
89 88
90 void OnDicomExported(const OrthancApiClient::JsonResponseReadyMessage& message); 89 void OnDicomExported(const OrthancApiClient::JsonResponseReadyMessage& message);
91 90
91 void OnDicomWebReceived(const IWebService::HttpRequestSuccessMessage& message);
92
92 public: 93 public:
93 RadiographyScene(MessageBroker& broker, 94 RadiographyScene(MessageBroker& broker);
94 OrthancApiClient& orthanc);
95 95
96 virtual ~RadiographyScene(); 96 virtual ~RadiographyScene();
97 97
98 bool GetWindowing(float& center, 98 bool GetWindowing(float& center,
99 float& width) const; 99 float& width) const;
108 const std::string& utf8); 108 const std::string& utf8);
109 109
110 RadiographyLayer& LoadTestBlock(unsigned int width, 110 RadiographyLayer& LoadTestBlock(unsigned int width,
111 unsigned int height); 111 unsigned int height);
112 112
113 RadiographyLayer& LoadDicomFrame(const std::string& instance, 113 RadiographyLayer& LoadDicomFrame(OrthancApiClient& orthanc,
114 const std::string& instance,
114 unsigned int frame, 115 unsigned int frame,
115 bool httpCompression); 116 bool httpCompression);
117
118 RadiographyLayer& LoadDicomWebFrame(IWebService& web);
116 119
117 Extent2D GetSceneExtent() const; 120 Extent2D GetSceneExtent() const;
118 121
119 void Render(Orthanc::ImageAccessor& buffer, 122 void Render(Orthanc::ImageAccessor& buffer,
120 const AffineTransform2D& viewTransform, 123 const AffineTransform2D& viewTransform,
131 void GetRange(float& minValue, 134 void GetRange(float& minValue,
132 float& maxValue) const; 135 float& maxValue) const;
133 136
134 // Export using PAM is faster than using PNG, but requires Orthanc 137 // Export using PAM is faster than using PNG, but requires Orthanc
135 // core >= 1.4.3 138 // core >= 1.4.3
136 void ExportDicom(const Orthanc::DicomMap& dicom, 139 void ExportDicom(OrthancApiClient& orthanc,
140 const Orthanc::DicomMap& dicom,
137 double pixelSpacingX, 141 double pixelSpacingX,
138 double pixelSpacingY, 142 double pixelSpacingY,
139 bool invert, 143 bool invert,
140 ImageInterpolation interpolation, 144 ImageInterpolation interpolation,
141 bool usePam); 145 bool usePam);