# HG changeset patch # User Sebastien Jodogne # Date 1745329250 -7200 # Node ID b66c827a4a5c9c02e3a7bf4b5fab4ccb9161aaa8 # Parent 9672a22d013d3455b4250ecefab08db5277a54cf removed pointless method DicomStructureSet::GetStructureCenter() diff -r 9672a22d013d -r b66c827a4a5c Applications/StoneWebViewer/WebAssembly/IStoneWebViewerContext.h --- a/Applications/StoneWebViewer/WebAssembly/IStoneWebViewerContext.h Tue Apr 22 14:50:34 2025 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/IStoneWebViewerContext.h Tue Apr 22 15:40:50 2025 +0200 @@ -28,6 +28,15 @@ #include +static const int LAYER_TEXTURE = 0; +static const int LAYER_OVERLAY = 1; +static const int LAYER_ORIENTATION_MARKERS = 2; +static const int LAYER_REFERENCE_LINES = 3; +static const int LAYER_ANNOTATIONS_STONE = 5; +static const int LAYER_ANNOTATIONS_OSIRIX = 4; +static const int LAYER_STRUCTURED_REPORT = 6; + + #define DISPATCH_JAVASCRIPT_EVENT(name) \ EM_ASM( \ const customEvent = document.createEvent("CustomEvent"); \ diff -r 9672a22d013d -r b66c827a4a5c Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp --- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Tue Apr 22 14:50:34 2025 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Tue Apr 22 15:40:50 2025 +0200 @@ -73,14 +73,6 @@ static const double PI = boost::math::constants::pi(); -static const int LAYER_TEXTURE = 0; -static const int LAYER_OVERLAY = 1; -static const int LAYER_ORIENTATION_MARKERS = 2; -static const int LAYER_REFERENCE_LINES = 3; -static const int LAYER_ANNOTATIONS_STONE = 5; -static const int LAYER_ANNOTATIONS_OSIRIX = 4; -static const int LAYER_STRUCTURED_REPORT = 6; - #if !defined(STONE_WEB_VIEWER_EXPORT) // We are not running ParseWebAssemblyExports.py, but we're compiling the wasm diff -r 9672a22d013d -r b66c827a4a5c OrthancStone/Sources/Toolbox/DicomStructureSet.cpp --- a/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Tue Apr 22 14:50:34 2025 +0200 +++ b/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Tue Apr 22 15:40:50 2025 +0200 @@ -722,32 +722,6 @@ #endif - Vector DicomStructureSet::GetStructureCenter(size_t index) const - { - const Structure& structure = GetStructure(index); - - Vector center; - LinearAlgebra::AssignVector(center, 0, 0, 0); - if (structure.polygons_.empty()) - { - return center; - } - - double n = static_cast(structure.polygons_.size()); - - for (Polygons::const_iterator polygon = structure.polygons_.begin(); - polygon != structure.polygons_.end(); ++polygon) - { - if (!polygon->GetPoints().empty()) - { - center += polygon->GetPoints().front() / n; - } - } - - return center; - } - - const std::string& DicomStructureSet::GetStructureName(size_t index) const { return GetStructure(index).name_; diff -r 9672a22d013d -r b66c827a4a5c OrthancStone/Sources/Toolbox/DicomStructureSet.h --- a/OrthancStone/Sources/Toolbox/DicomStructureSet.h Tue Apr 22 14:50:34 2025 +0200 +++ b/OrthancStone/Sources/Toolbox/DicomStructureSet.h Tue Apr 22 15:40:50 2025 +0200 @@ -182,8 +182,6 @@ return structures_.size(); } - Vector GetStructureCenter(size_t index) const; - const std::string& GetStructureName(size_t index) const; const std::string& GetStructureInterpretation(size_t index) const;