comparison Framework/Deprecated/Loaders/OrthancMultiframeVolumeLoader.h @ 1314:9b126de2cde2 broker

Since the observer system now uses shared_ptr and many registrations are done in the constructors, and since we cannot called shared_from_this() in the constructors, it is mandatory to split construction from registration. This has been done by making many ctors protected and replacing them by factory methods that directly return shared_ptrs + added PostConstructor method when base classes perform shared_from_this() calls too.
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 16 Mar 2020 11:19:50 +0100
parents 9bea7e15b519
children
comparison
equal deleted inserted replaced
1313:f30905f5d246 1314:9b126de2cde2
91 void SetUncompressedPixelData(const std::string& pixelData); 91 void SetUncompressedPixelData(const std::string& pixelData);
92 92
93 bool HasGeometry() const; 93 bool HasGeometry() const;
94 const OrthancStone::VolumeImageGeometry& GetImageGeometry() const; 94 const OrthancStone::VolumeImageGeometry& GetImageGeometry() const;
95 95
96 public: 96 protected:
97 OrthancMultiframeVolumeLoader( 97 OrthancMultiframeVolumeLoader(
98 OrthancStone::ILoadersContext& loadersContext, 98 OrthancStone::ILoadersContext& loadersContext,
99 boost::shared_ptr<OrthancStone::DicomVolumeImage> volume, 99 boost::shared_ptr<OrthancStone::DicomVolumeImage> volume,
100 float outliersHalfRejectionRate);
101 public:
102
103 static boost::shared_ptr<OrthancMultiframeVolumeLoader> Create(
104 OrthancStone::ILoadersContext& loadersContext,
105 boost::shared_ptr<OrthancStone::DicomVolumeImage> volume,
100 float outliersHalfRejectionRate = 0.0005); 106 float outliersHalfRejectionRate = 0.0005);
101 107
102 virtual ~OrthancMultiframeVolumeLoader(); 108 virtual ~OrthancMultiframeVolumeLoader();
103 109
104 bool IsPixelDataLoaded() const 110 bool IsPixelDataLoaded() const
105 { 111 {
106 return pixelDataLoaded_; 112 return pixelDataLoaded_;