Mercurial > hg > orthanc-stone
comparison Applications/Samples/Sdl/SingleFrameViewer/SdlSimpleViewer.cpp @ 1975:5a434f5889f8
starting pixel probe
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 29 Oct 2022 11:57:00 +0200 |
parents | 184b0aeae1af |
children | ba45e1b0812a |
comparison
equal
deleted
inserted
replaced
1974:446e0d3e9019 | 1975:5a434f5889f8 |
---|---|
80 << " a\tCreate angle annotations" << std::endl | 80 << " a\tCreate angle annotations" << std::endl |
81 << " c\tCreate circle annotations" << std::endl | 81 << " c\tCreate circle annotations" << std::endl |
82 << " d\tDelete mode for annotations" << std::endl | 82 << " d\tDelete mode for annotations" << std::endl |
83 << " e\tEdit mode, don't create annotation (default)" << std::endl | 83 << " e\tEdit mode, don't create annotation (default)" << std::endl |
84 << " l\tCreate line annotations" << std::endl | 84 << " l\tCreate line annotations" << std::endl |
85 << " p\tCreate pixel probe" << std::endl | |
85 #else | 86 #else |
86 << " a\tEnable/disable the angle annotation tool" << std::endl | 87 << " a\tEnable/disable the angle annotation tool" << std::endl |
87 << " l\tEnable/disable the line annotation tool" << std::endl | 88 << " l\tEnable/disable the line annotation tool" << std::endl |
88 << " r\tRedo the last edit to the annotation tools" << std::endl | 89 << " r\tRedo the last edit to the annotation tools" << std::endl |
89 << " u\tUndo the last edit to the annotation tools" << std::endl | 90 << " u\tUndo the last edit to the annotation tools" << std::endl |
192 } | 193 } |
193 | 194 |
194 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 | 195 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 |
195 OrthancStone::AnnotationsSceneLayer annotations(10); | 196 OrthancStone::AnnotationsSceneLayer annotations(10); |
196 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_Edit); | 197 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_Edit); |
198 annotations.SetProbedLayer(0); | |
197 | 199 |
198 #else | 200 #else |
199 ActiveTool activeTool = ActiveTool_None; | 201 ActiveTool activeTool = ActiveTool_None; |
200 | 202 |
201 boost::shared_ptr<OrthancStone::LineMeasureTool> lineMeasureTool(OrthancStone::LineMeasureTool::Create(viewport)); | 203 boost::shared_ptr<OrthancStone::LineMeasureTool> lineMeasureTool(OrthancStone::LineMeasureTool::Create(viewport)); |
378 activeTool = ActiveTool_Angle; | 380 activeTool = ActiveTool_Angle; |
379 } | 381 } |
380 #endif | 382 #endif |
381 break; | 383 break; |
382 | 384 |
385 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 | |
386 case SDLK_p: | |
387 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_PixelProbe); | |
388 break; | |
389 #endif | |
390 | |
383 default: | 391 default: |
384 break; | 392 break; |
385 } | 393 } |
386 } | 394 } |
387 else if (event.type == SDL_MOUSEBUTTONDOWN || | 395 else if (event.type == SDL_MOUSEBUTTONDOWN || |