Mercurial > hg > orthanc
comparison Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 3916:0e3849268a55 transcoding
new plugin SDK primitives related to OrthancPluginDicomInstance
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 11 May 2020 21:07:36 +0200 |
parents | 7e33516965f8 |
children | 6f11b3233a06 |
comparison
equal
deleted
inserted
replaced
3915:7e33516965f8 | 3916:0e3849268a55 |
---|---|
384 | 384 |
385 OrthancImage(OrthancPluginPixelFormat format, | 385 OrthancImage(OrthancPluginPixelFormat format, |
386 uint32_t width, | 386 uint32_t width, |
387 uint32_t height, | 387 uint32_t height, |
388 uint32_t pitch, | 388 uint32_t pitch, |
389 void* buffer | 389 void* buffer); |
390 ); | |
391 | 390 |
392 ~OrthancImage() | 391 ~OrthancImage() |
393 { | 392 { |
394 Clear(); | 393 Clear(); |
395 } | 394 } |
1137 const char* sopInstanceUid); | 1136 const char* sopInstanceUid); |
1138 | 1137 |
1139 static void Destructor(void* rawHandler); | 1138 static void Destructor(void* rawHandler); |
1140 }; | 1139 }; |
1141 #endif | 1140 #endif |
1141 | |
1142 | |
1143 class DicomInstance : public boost::noncopyable | |
1144 { | |
1145 private: | |
1146 bool toFree_; | |
1147 | |
1148 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 6, 1) | |
1149 const OrthancPluginDicomInstance* instance_; | |
1150 #else | |
1151 OrthancPluginDicomInstance* instance_; | |
1152 #endif | |
1153 | |
1154 public: | |
1155 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 6, 1) | |
1156 DicomInstance(const OrthancPluginDicomInstance* instance); | |
1157 #else | |
1158 DicomInstance(OrthancPluginDicomInstance* instance); | |
1159 #endif | |
1160 | |
1161 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0) | |
1162 DicomInstance(const void* buffer, | |
1163 size_t size); | |
1164 #endif | |
1165 | |
1166 ~DicomInstance(); | |
1167 | |
1168 std::string GetRemoteAet() const; | |
1169 | |
1170 const void* GetBuffer() const | |
1171 { | |
1172 return OrthancPluginGetInstanceData(GetGlobalContext(), instance_); | |
1173 } | |
1174 | |
1175 size_t GetSize() const | |
1176 { | |
1177 return OrthancPluginGetInstanceSize(GetGlobalContext(), instance_); | |
1178 } | |
1179 | |
1180 void GetJson(Json::Value& target) const; | |
1181 | |
1182 void GetSimplifiedJson(Json::Value& target) const; | |
1183 | |
1184 OrthancPluginInstanceOrigin GetOrigin() const | |
1185 { | |
1186 return OrthancPluginGetInstanceOrigin(GetGlobalContext(), instance_); | |
1187 } | |
1188 | |
1189 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 6, 1) | |
1190 std::string GetTransferSyntaxUid() const; | |
1191 #endif | |
1192 | |
1193 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 6, 1) | |
1194 bool HasPixelData() const; | |
1195 #endif | |
1196 | |
1197 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0) | |
1198 unsigned int GetFramesCount() const | |
1199 { | |
1200 return OrthancPluginGetInstanceFramesCount(GetGlobalContext(), instance_); | |
1201 } | |
1202 #endif | |
1203 | |
1204 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0) | |
1205 void GetRawFrame(std::string& target, | |
1206 unsigned int frameIndex) const; | |
1207 #endif | |
1208 | |
1209 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0) | |
1210 OrthancImage* GetDecodedFrame(unsigned int frameIndex) const; | |
1211 #endif | |
1212 }; | |
1142 } | 1213 } |