Mercurial > hg > orthanc-stone
comparison Framework/Radiography/RadiographyDicomLayer.cpp @ 1279:7ec8fea061b9 broker
integration mainline->broker
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Feb 2020 15:20:08 +0100 |
parents | b519c1c878f1 a989c7d46b9a |
children | 68579a31eeb4 |
comparison
equal
deleted
inserted
replaced
1271:0ca50d275b9a | 1279:7ec8fea061b9 |
---|---|
111 ApplyConverter(); | 111 ApplyConverter(); |
112 | 112 |
113 BroadcastMessage(RadiographyLayer::LayerEditedMessage(*this)); | 113 BroadcastMessage(RadiographyLayer::LayerEditedMessage(*this)); |
114 } | 114 } |
115 | 115 |
116 void RadiographyDicomLayer::SetSourceImage(Orthanc::ImageAccessor* image, double newPixelSpacingX, double newPixelSpacingY) // Takes ownership | 116 void RadiographyDicomLayer::SetSourceImage(Orthanc::ImageAccessor* image, double newPixelSpacingX, double newPixelSpacingY, bool emitLayerEditedEvent) // Takes ownership |
117 { | 117 { |
118 std::auto_ptr<Orthanc::ImageAccessor> raii(image); | 118 std::auto_ptr<Orthanc::ImageAccessor> raii(image); |
119 | 119 |
120 if (image == NULL) | 120 if (image == NULL) |
121 { | 121 { |
122 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); | 122 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); |
123 } | 123 } |
124 | 124 |
125 SetSize(image->GetWidth(), image->GetHeight()); | 125 SetSize(image->GetWidth(), image->GetHeight(), false); |
126 | 126 |
127 source_ = raii; | 127 source_ = raii; |
128 ApplyConverter(); | 128 ApplyConverter(); |
129 | 129 |
130 SetPixelSpacing(newPixelSpacingX, newPixelSpacingY, false); | 130 SetPixelSpacing(newPixelSpacingX, newPixelSpacingY, false); |
131 | 131 |
132 BroadcastMessage(RadiographyLayer::LayerEditedMessage(*this)); | 132 if (emitLayerEditedEvent) |
133 { | |
134 BroadcastMessage(RadiographyLayer::LayerEditedMessage(*this)); | |
135 } | |
133 } | 136 } |
134 | 137 |
135 | 138 |
136 void RadiographyDicomLayer::SetDicomFrameConverter(Deprecated::DicomFrameConverter* converter) | 139 void RadiographyDicomLayer::SetDicomFrameConverter(Deprecated::DicomFrameConverter* converter) |
137 { | 140 { |