Mercurial > hg > orthanc-stone
changeset 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 | 1dbf2d9ed1e4 |
children | 64ee3033e1ca |
files | Applications/Generic/NativeStoneApplicationContext.cpp Applications/Samples/SingleFrameEditorApplication.h Framework/Layers/GrayscaleFrameRenderer.cpp Framework/Radiography/RadiographyWidget.cpp Framework/Toolbox/DicomStructureSet.cpp Framework/Toolbox/FiniteProjectiveCamera.cpp |
diffstat | 6 files changed, 22 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/Generic/NativeStoneApplicationContext.cpp Mon Mar 11 14:39:31 2019 +0100 +++ b/Applications/Generic/NativeStoneApplicationContext.cpp Tue Mar 12 08:51:15 2019 +0100 @@ -51,7 +51,7 @@ stopped_(true), updateDelayInMs_(100) // By default, 100ms between each refresh of the content { - srand(time(NULL)); + srand(static_cast<unsigned int>(time(NULL))); }
--- a/Applications/Samples/SingleFrameEditorApplication.h Mon Mar 11 14:39:31 2019 +0100 +++ b/Applications/Samples/SingleFrameEditorApplication.h Tue Mar 12 08:51:15 2019 +0100 @@ -130,8 +130,8 @@ { RadiographyScene::LayerAccessor accessor(widget.GetScene(), selected); - Corner corner; - if (accessor.GetLayer().LookupCorner(corner, x, y, view.GetZoom(), GetHandleSize())) + ControlPoint corner; + if (accessor.GetLayer().LookupControlPoint(corner, x, y, view.GetZoom(), GetHandleSize())) { switch (tool_) {
--- a/Framework/Layers/GrayscaleFrameRenderer.cpp Mon Mar 11 14:39:31 2019 +0100 +++ b/Framework/Layers/GrayscaleFrameRenderer.cpp Tue Mar 12 08:51:15 2019 +0100 @@ -121,8 +121,8 @@ bool isFullQuality) : FrameRenderer(framePlane, pixelSpacingX, pixelSpacingY, isFullQuality), frame_(Orthanc::Image::Clone(frame)), - defaultWindowCenter_(converter.GetDefaultWindowCenter()), - defaultWindowWidth_(converter.GetDefaultWindowWidth()), + defaultWindowCenter_(static_cast<float>(converter.GetDefaultWindowCenter())), + defaultWindowWidth_(static_cast<float>(converter.GetDefaultWindowWidth())), photometric_(converter.GetPhotometricInterpretation()) { if (frame_.get() == NULL)
--- 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;
--- a/Framework/Toolbox/DicomStructureSet.cpp Mon Mar 11 14:39:31 2019 +0100 +++ b/Framework/Toolbox/DicomStructureSet.cpp Tue Mar 12 08:51:15 2019 +0100 @@ -754,7 +754,11 @@ double x1, y1, x2, y2; if (polygon->Project(x1, y1, x2, y2, slice)) { - projected.push_back(CreateRectangle(x1, y1, x2, y2)); + projected.push_back(CreateRectangle( + static_cast<float>(x1), + static_cast<float>(y1), + static_cast<float>(x2), + static_cast<float>(y2))); } }
--- a/Framework/Toolbox/FiniteProjectiveCamera.cpp Mon Mar 11 14:39:31 2019 +0100 +++ b/Framework/Toolbox/FiniteProjectiveCamera.cpp Tue Mar 12 08:51:15 2019 +0100 @@ -332,7 +332,7 @@ LOG(INFO) << "Applying raytracer on slice: " << z << "/" << slices->GetSliceCount(); const OrthancStone::CoordinateSystem3D& slice = slices->GetSlice(z); - OrthancStone::ImageBuffer3D::SliceReader sliceReader(source, projection, z); + OrthancStone::ImageBuffer3D::SliceReader sliceReader(source, projection, static_cast<unsigned int>(z)); SourceReader pixelReader(sliceReader.GetAccessor());