Mercurial > hg > orthanc-stone
comparison Framework/Layers/SingleFrameRendererFactory.h @ 32:517c46f527cd
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 19 Dec 2016 11:00:23 +0100 |
parents | 9aace933cb64 |
children | 7207a407bcd8 |
comparison
equal
deleted
inserted
replaced
31:9aace933cb64 | 32:517c46f527cd |
---|---|
31 | 31 |
32 | 32 |
33 #pragma once | 33 #pragma once |
34 | 34 |
35 #include "ILayerRendererFactory.h" | 35 #include "ILayerRendererFactory.h" |
36 #include "../../Resources/Orthanc/Plugins/Samples/Common/IOrthancConnection.h" | |
36 | 37 |
37 namespace OrthancStone | 38 namespace OrthancStone |
38 { | 39 { |
39 class SingleFrameRendererFactory : public ILayerRendererFactory | 40 class SingleFrameRendererFactory : public ILayerRendererFactory |
40 { | 41 { |
41 private: | 42 private: |
42 OrthancPlugins::IOrthancConnection& orthanc_; | 43 OrthancPlugins::IOrthancConnection& orthanc_; |
44 std::auto_ptr<OrthancPlugins::IDicomDataset> dicom_; | |
43 | 45 |
44 DicomDataset dicom_; | |
45 std::string instance_; | 46 std::string instance_; |
46 unsigned int frame_; | 47 unsigned int frame_; |
47 Orthanc::PixelFormat format_; | 48 Orthanc::PixelFormat format_; |
48 | 49 |
49 public: | 50 public: |
50 SingleFrameRendererFactory(OrthancPlugins::IOrthancConnection& orthanc, | 51 SingleFrameRendererFactory(OrthancPlugins::IOrthancConnection& orthanc, |
51 const std::string& instanceId, | 52 const std::string& instanceId, |
52 unsigned int frame); | 53 unsigned int frame); |
53 | 54 |
54 const DicomDataset& GetDataset() const | 55 const OrthancPlugins::IDicomDataset& GetDataset() const |
55 { | 56 { |
56 return dicom_; | 57 return *dicom_; |
57 } | 58 } |
58 | 59 |
59 SliceGeometry GetSliceGeometry(); | 60 SliceGeometry GetSliceGeometry() |
61 { | |
62 return SliceGeometry(*dicom_); | |
63 } | |
60 | 64 |
61 virtual bool GetExtent(double& x1, | 65 virtual bool GetExtent(double& x1, |
62 double& y1, | 66 double& y1, |
63 double& x2, | 67 double& x2, |
64 double& y2, | 68 double& y2, |