Mercurial > hg > orthanc-stone
diff Framework/Radiography/RadiographyWidget.cpp @ 516:11fa6f00e33c bgo-commands-codegen
Dummy changes (warnings, dummy dtor to check proper deletion, line wrapping) +
fixes for AM changes (Corner renamed to ControlPoint...)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 12 Mar 2019 08:51:15 +0100 |
parents | 64d90190a08c |
children | 1201b12eb9f8 |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyWidget.cpp Mon Mar 11 14:39:31 2019 +0100 +++ b/Framework/Radiography/RadiographyWidget.cpp Tue Mar 12 08:51:15 2019 +0100 @@ -32,10 +32,14 @@ bool RadiographyWidget::IsInvertedInternal() const { - return (scene_->GetPreferredPhotomotricDisplayMode() == PhotometricDisplayMode_Monochrome1) ^ invert_; // MONOCHROME1 images must be inverted and the user can invert the image too -> XOR the two + // MONOCHROME1 images must be inverted and the user can invert the + // image, too -> XOR the two + return (scene_->GetPreferredPhotomotricDisplayMode() == + PhotometricDisplayMode_Monochrome1) ^ invert_; } - void RadiographyWidget::RenderBackground(Orthanc::ImageAccessor& image, float minValue, float maxValue) + void RadiographyWidget::RenderBackground( + Orthanc::ImageAccessor& image, float minValue, float maxValue) { // wipe background before rendering float backgroundValue = minValue; @@ -59,7 +63,7 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); } - Orthanc::ImageProcessing::Set(image, backgroundValue); + Orthanc::ImageProcessing::Set(image, static_cast<int64_t>(backgroundValue)); } bool RadiographyWidget::RenderInternal(unsigned int width, @@ -82,7 +86,8 @@ floatBuffer_->GetWidth() != width || floatBuffer_->GetHeight() != height) { - floatBuffer_.reset(new Orthanc::Image(Orthanc::PixelFormat_Float32, width, height, false)); + floatBuffer_.reset(new Orthanc::Image( + Orthanc::PixelFormat_Float32, width, height, false)); } if (cairoBuffer_.get() == NULL || @@ -168,7 +173,8 @@ if (hasSelection_) { - scene_->DrawBorder(context, selectedLayer_, view.GetZoom()); + scene_->DrawBorder( + context, static_cast<unsigned int>(selectedLayer_), view.GetZoom()); } return true;