Mercurial > hg > orthanc-stone
changeset 1306:fef1ec42a7db broker
Some docs + headers added to CMake for easier VS browsing + tiny predecl
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 04 Mar 2020 10:07:14 +0100 |
parents | a5326ce4f24b |
children | 8a28a9bf8876 |
files | Framework/Loaders/LoadedDicomResources.h Framework/Scene2DViewport/PredeclaredTypes.h Framework/Toolbox/GenericToolbox.h Framework/Viewport/IViewport.h Resources/CMake/OrthancStoneConfiguration.cmake |
diffstat | 5 files changed, 93 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Loaders/LoadedDicomResources.h Wed Mar 04 09:45:38 2020 +0100 +++ b/Framework/Loaders/LoadedDicomResources.h Wed Mar 04 10:07:14 2020 +0100 @@ -26,6 +26,10 @@ namespace OrthancStone { + /** + Stores an indexed collection of DicomMap objects. The index is a + user-specified DicomTag. + */ class LoadedDicomResources : public boost::noncopyable { private:
--- a/Framework/Scene2DViewport/PredeclaredTypes.h Wed Mar 04 09:45:38 2020 +0100 +++ b/Framework/Scene2DViewport/PredeclaredTypes.h Wed Mar 04 10:07:14 2020 +0100 @@ -38,4 +38,5 @@ class MeasureCommand; class ViewportController; class LayerHolder; + class IViewport; }
--- a/Framework/Toolbox/GenericToolbox.h Wed Mar 04 09:45:38 2020 +0100 +++ b/Framework/Toolbox/GenericToolbox.h Wed Mar 04 10:07:14 2020 +0100 @@ -29,6 +29,12 @@ { namespace GenericToolbox { + /** + Fast floating point string validation. + No trimming applied, so the input must match regex + /^[-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/ + The following are allowed as edge cases: "" and "-" + */ inline bool LegitDoubleString(const char* text) { const char* p = text; @@ -70,6 +76,11 @@ return true; } + /** + Fast integer string validation. + No trimming applied, so the input must match regex /^-?[0-9]*$/ + The following are allowed as edge cases: "" and "-" + */ inline bool LegitIntegerString(const char* text) { const char* p = text; @@ -86,6 +97,9 @@ } /* + Fast string --> double conversion. + Must pass the LegitDoubleString test + String to doubles with at most 18 digits */ inline bool StringToDouble(double& r, const char* text) @@ -210,10 +224,17 @@ return StringToDouble(r, text.c_str()); } + /** + Fast string to integer conversion. Leading zeroes and minus are accepted, + but a leading + sign is NOT. + Must pass the LegitIntegerString function test. + In addition, an empty string (or lone minus sign) yields 0. + */ + template<typename T> inline bool StringToInteger(T& r, const char* text) { - if (!LegitDoubleString(text)) + if (!LegitIntegerString(text)) return false; r = 0; @@ -244,21 +265,27 @@ } /** - "rgb(12,23,255)" --> red, green, blue and returns true - "everything else" --> returns false (other values left untouched) + if input is "rgb(12,23,255)" --> function fills `red`, `green` and `blue` and returns true + else ("everything else") --> function returns false and leaves all values untouched */ bool GetRgbValuesFromString(uint8_t& red, uint8_t& green, uint8_t& blue, const char* text); /** - See other overload + See main overload */ inline bool GetRgbValuesFromString(uint8_t& red, uint8_t& green, uint8_t& blue, const std::string& text) { return GetRgbValuesFromString(red, green, blue, text.c_str()); } + /** + Same as GetRgbValuesFromString + */ bool GetRgbaValuesFromString(uint8_t& red, uint8_t& green, uint8_t& blue, uint8_t& alpha, const char* text); + /** + Same as GetRgbValuesFromString + */ inline bool GetRgbaValuesFromString(uint8_t& red, uint8_t& green, uint8_t& blue, uint8_t& alpha, const std::string& text) { return GetRgbaValuesFromString(red, green, blue, alpha, text.c_str());
--- a/Framework/Viewport/IViewport.h Wed Mar 04 09:45:38 2020 +0100 +++ b/Framework/Viewport/IViewport.h Wed Mar 04 10:07:14 2020 +0100 @@ -48,8 +48,16 @@ virtual bool HasCompositor() const = 0; + /** + Do not store the result! Only access the compositor interface through + the lock. + */ virtual ICompositor& GetCompositor() = 0; + /** + Do not store the result! Only access the compositor interface through + the lock. + */ virtual ViewportController& GetController() = 0; virtual void Invalidate() = 0;
--- a/Resources/CMake/OrthancStoneConfiguration.cmake Wed Mar 04 09:45:38 2020 +0100 +++ b/Resources/CMake/OrthancStoneConfiguration.cmake Wed Mar 04 10:07:14 2020 +0100 @@ -308,6 +308,7 @@ list(APPEND PLATFORM_SOURCES ${ORTHANC_STONE_ROOT}/Platforms/Generic/OracleWebService.cpp ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/CairoFont.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/CairoFont.h ) endif() @@ -350,17 +351,36 @@ list(APPEND ORTHANC_STONE_SOURCES ${ORTHANC_STONE_ROOT}/Applications/IStoneApplication.h ${ORTHANC_STONE_ROOT}/Applications/StoneApplicationContext.cpp + + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/dev.h + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/SmartLoader.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/SmartLoader.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/CircleMeasureTracker.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/CircleMeasureTracker.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ColorFrameRenderer.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ColorFrameRenderer.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomSeriesVolumeSlicer.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomStructureSetSlicer.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/DicomStructureSetSlicer.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/FrameRenderer.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/FrameRenderer.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/GrayscaleFrameRenderer.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/GrayscaleFrameRenderer.h + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/ILayerRenderer.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/IVolumeSlicer.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineLayerRenderer.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineLayerRenderer.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineMeasureTracker.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/LineMeasureTracker.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/RenderStyle.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/RenderStyle.h + # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SeriesFrameRendererFactory.cpp + # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SeriesFrameRendererFactory.h + # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SingleFrameRendererFactory.cpp + # ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SingleFrameRendererFactory.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SliceOutlineRenderer.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Layers/SliceOutlineRenderer.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/DicomStructureSetLoader.cpp ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/DicomStructureSetLoader.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/DicomStructureSetLoader2.cpp @@ -373,39 +393,66 @@ ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/OrthancMultiframeVolumeLoader.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Loaders/OrthancSeriesVolumeProgressiveLoader.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/SmartLoader.cpp ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/BaseWebService.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/BaseWebService.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DicomFrameConverter.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DicomFrameConverter.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DownloadStack.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/DownloadStack.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IDelayedCallExecutor.h + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ISeriesLoader.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IWebService.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/IWebService.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/MessagingToolbox.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/MessagingToolbox.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancApiClient.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancApiClient.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancSlicesLoader.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/OrthancSlicesLoader.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlices.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlices.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlicesCursor.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ParallelSlicesCursor.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/Slice.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/Slice.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ViewportGeometry.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Toolbox/ViewportGeometry.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IMouseTracker.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IStatusBar.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IViewport.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/WidgetViewport.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/WidgetViewport.h + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/IGeometryProvider.h + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/ISlicedVolume.h + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/IVolumeLoader.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/StructureSetLoader.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/StructureSetLoader.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/CairoWidget.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/CairoWidget.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/EmptyWidget.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/EmptyWidget.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWidget.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWorldSceneInteractor.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/IWorldSceneMouseTracker.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/LayoutWidget.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/LayoutWidget.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanMouseTracker.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanMouseTracker.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanZoomMouseTracker.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/PanZoomMouseTracker.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/SliceViewerWidget.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/SliceViewerWidget.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestCairoWidget.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestCairoWidget.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestWorldSceneWidget.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/TestWorldSceneWidget.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WidgetBase.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WidgetBase.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WorldSceneWidget.cpp + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/WorldSceneWidget.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/ZoomMouseTracker.cpp - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/dev.h + ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Widgets/ZoomMouseTracker.h + ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyAlphaLayer.cpp ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyDicomLayer.cpp ${ORTHANC_STONE_ROOT}/Framework/Radiography/RadiographyLayer.cpp