Skip to content

Commit c462fda

Browse files
DOC: Improve RDT documentation
- Update doc CSS to match 3D Slicer's - Add 3D Slicer DM architecture reminders - Add architecture information and diagrams - Add getting started page - Fix some docstring typos
1 parent d2e436f commit c462fda

21 files changed

+885
-120
lines changed

Doc/ExtensionInstall.png

75 KB
Loading

Doc/PipelineI_API.jpg

-149 KB
Binary file not shown.

Doc/_static/css/custom.css

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,88 @@
1-
dl.py.property {
2-
display: block !important;
1+
.body{
2+
color:#576071;
3+
}
4+
.wy-nav-content{
5+
max-width: 100%;
6+
}
7+
a{
8+
color:#3266AF
9+
}
10+
a:hover{
11+
background: white;
12+
}
13+
a:visited{
14+
color:#3266AF
15+
}
16+
p{
17+
margin: 0 0 15px
18+
}
19+
.wy-nav-side{
20+
background:#3364A8;
21+
}
22+
.wy-side-nav-search{
23+
background-color:#e8ecf3;
24+
}
25+
.wy-side-nav-search img {
26+
display: inline;
27+
background-color:#e8ecf3;
28+
}
29+
.wy-side-nav-search .wy-dropdown>a, .wy-side-nav-search>a {
30+
color:#576071;
31+
}
32+
.wy-menu-vertical header, .wy-menu-vertical p.caption {
33+
color:#BAD7FF;
34+
text-decoration: underline;
35+
}
36+
.wy-menu-vertical a {
37+
color:white;
38+
}
39+
.wy-nav-side l1:hover{
40+
background:#3D72BC;
41+
}
42+
.wy-nav-side a:visited{
43+
color: white;
44+
}
45+
.wy-side-nav-search a:visited{
46+
color: #576071;
47+
}
48+
.wy-menu-vertical a:hover{
49+
background-color:#3D72BC;
50+
}
51+
.wy-menu-vertical a:visited{
52+
background-color:#3D72BC;
53+
}
54+
.wy-menu-vertical li.current a:hover{
55+
background:#fdfffe;
56+
}
57+
.wy-menu-vertical li.current {
58+
background:#f2f9f5;
59+
}
60+
.wy-menu-vertical li.toctree-l2.current>a, .wy-menu-vertical li.toctree-l2.current li.toctree-l3>a {
61+
background:#e9f6ef;
62+
}
63+
.wy-menu-vertical li.toctree-l2.current>a:hover, .wy-menu-vertical li.toctree-l2.current li.toctree-l3>a:hover {
64+
background:#f6fffa;
65+
}
66+
.wy-menu-vertical li.toctree-l3.current>a, .wy-menu-vertical li.toctree-l3.current li.toctree-l4>a {
67+
background: #e1f3e8;
68+
}
69+
.wy-menu-vertical li.toctree-l3.current>a:hover, .wy-menu-vertical li.toctree-l3.current li.toctree-l4>a:hover {
70+
background: #f3fff7;
71+
}
72+
a.icon-home img.logo {
73+
width: 64px;
74+
height: 64px;
75+
}
76+
.rst-content .toctree-wrapper>p.caption, h3, h4, h5, h6, legend {
77+
margin-bottom: 3px;
78+
color: #576071;
79+
}
80+
.rst-content .toctree-wrapper>p.caption, h2 {
81+
color: #474e5a;
82+
}
83+
.rst-content .toctree-wrapper>p.caption, h1 {
84+
color: #2e323a;
85+
}
86+
.rst-content dl dd {
87+
margin: 0px;
388
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Rendering initialization sequence
3+
---
4+
5+
sequenceDiagram
6+
participant User
7+
participant LayoutManager as Layout Manager
8+
participant Widget as Widget
9+
participant DMGroup as Displayable Manager Group
10+
participant DM as Displayable Manager
11+
participant Scene
12+
participant RW as Render Window
13+
User ->> LayoutManager: Switch layout
14+
LayoutManager ->> LayoutManager: Load layout XML
15+
LayoutManager ->> Scene: Add missing view node
16+
LayoutManager ->> Widget: Create widget from node
17+
Widget ->> DMGroup: Create / Initialize
18+
DMGroup ->> DM: Create / Initialize
19+
DM ->> Scene: Update from MRML
20+
DM ->> RW: Add VTK actors
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Simplified Displayable Manager interaction logic
3+
---
4+
stateDiagram-v2
5+
state if_start <<choice>>
6+
[*] --> if_start
7+
if_start --> [*]: DisplayableManagers == nullptr
8+
Handle3DEvent: Handle 3D Events
9+
Handle3DEvent --> FindCandidate
10+
if_start --> FindCandidate: else
11+
if_start --> Handle3DEvent: 3D Event
12+
FindCandidate: Find closest DM that can process
13+
state if_find <<choice>>
14+
FindCandidate --> if_find
15+
if_find --> [*]: Closest == nullptr
16+
if_find --> UpdateFocus: else
17+
state if_focus <<choice>>
18+
UpdateFocus: Update Focused
19+
UpdateFocus --> if_focus
20+
if_focus --> [*]: Focused == nullptr
21+
ProcessEvent: ProcessInteraction
22+
if_focus --> ProcessEvent: else
23+
ProcessEvent --> [*]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
flowchart LR
2+
modelNode_1 --> modelDisplayNode_1
3+
modelNode... --> modelDisplayNode...
4+
5+
modelDisplayNode_1 --> VTKPipeline_3D_1
6+
modelDisplayNode_1 --> VTKPipeline_2D_1
7+
8+
modelDisplayNode... --> VTKPipeline_3D...
9+
modelDisplayNode... --> VTKPipeline_2D...
10+
11+
subgraph view_3d [3D View]
12+
subgraph model_dm_3d [Model Displayable Manager]
13+
VTKPipeline_3D_1
14+
VTKPipeline_3D...
15+
end
16+
end
17+
18+
subgraph view_axial [Axial View]
19+
subgraph model_dm_axial [Model Displayable Manager]
20+
VTKPipeline_2D_1
21+
VTKPipeline_2D...
22+
end
23+
end
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: LayerDM class collaboration
3+
config:
4+
class:
5+
hideEmptyMembersBox: true
6+
---
7+
8+
classDiagram
9+
direction TB
10+
PipelineFactory "1" --o "*" PipelineCreatorI: Delegates creation
11+
PipelineManager --o "1" PipelineFactory: Delegates creation
12+
LayerDisplayableManager --> PipelineFactory: Singleton usage
13+
LayerDisplayableManager --o "1" PipelineManager: Uses
14+
LayerDisplayableManager --o "1" CameraSynchronizer: Uses
15+
LayerDisplayableManager --o "1" LayerManager: Uses
16+
AbstractDisplayableManager <|-- LayerDisplayableManager: Inherits
17+
PipelineCreatorI --> PipelineI: Creates
18+
PipelineManager "1" --o "*" PipelineI: Uses
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Layer DM interaction sequence
3+
---
4+
5+
sequenceDiagram
6+
participant InteractorStyle as Interactor Style
7+
participant LayerDM as Layer Displayable Manager
8+
participant PipelineMan as Pipeline Manager
9+
participant InteractionLogic as Interaction Logic
10+
participant Pipeline
11+
12+
InteractorStyle ->> LayerDM: Can Process Interaction
13+
LayerDM ->> PipelineMan : Can Process Interaction
14+
PipelineMan ->> InteractionLogic : Can Process Interaction
15+
16+
loop For each pipeline
17+
InteractionLogic ->> Pipeline : Can Process Interaction
18+
end
19+
InteractionLogic ->> InteractionLogic : Handle focus loss
20+
InteractionLogic ->> InteractorStyle : Can process + min distance
21+
InteractorStyle ->> LayerDM: Process Interaction
22+
LayerDM ->> PipelineMan : Process Interaction
23+
PipelineMan ->> InteractionLogic : Process Interaction
24+
25+
loop For each (sorted) pipeline that can process
26+
InteractionLogic ->> Pipeline : Process Interaction
27+
alt Did process
28+
Note over InteractionLogic: Early stop on first success
29+
else Did not process
30+
Note over InteractionLogic: Continue
31+
end
32+
end
33+
InteractionLogic ->> InteractionLogic : Handle focus loss
34+
InteractionLogic ->> InteractorStyle : Did process
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Layer Manager update Sequence
3+
---
4+
5+
stateDiagram-v2
6+
state if_start <<choice>>
7+
[*] --> if_start
8+
9+
RemoveAll: Remove all layers
10+
RemoveOutdatedPipelines: Remove outdated pipeline ref
11+
RemoveOutdatedLayers: Remove outdated renderers
12+
AddMissingLayers: Add missing renderers
13+
UpdateLayerOrdering: Update render window layer order
14+
UpdateCamera: Update layer camera
15+
SynchronizeRenderers: Update pipeline renderers
16+
17+
if_start --> RemoveAll : m_renderWindow == nullptr
18+
if_start --> RemoveOutdatedPipelines : else
19+
20+
RemoveOutdatedPipelines --> RemoveOutdatedLayers
21+
RemoveOutdatedLayers --> AddMissingLayers
22+
AddMissingLayers --> UpdateLayerOrdering
23+
UpdateLayerOrdering --> UpdateCamera
24+
UpdateCamera --> SynchronizeRenderers
25+
26+
RemoveAll --> [*]
27+
SynchronizeRenderers --> [*]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Pipeline lifecycle sequence
3+
---
4+
5+
sequenceDiagram
6+
participant User
7+
participant Scene
8+
participant LayerDM as Layer Displayable Manager
9+
participant PipelineMan as Pipeline Manager
10+
participant PipelineFactory as Pipeline Factory
11+
participant PipelineCreator as Pipeline Creator
12+
participant Pipeline
13+
Note over User, Pipeline: --- Add sequence ---
14+
User ->> Scene: Add display node
15+
Scene ->> LayerDM: Node Added
16+
LayerDM ->> PipelineMan: Node Added
17+
PipelineMan ->> PipelineFactory: Try Create
18+
PipelineFactory ->> PipelineCreator: Try Create
19+
PipelineCreator ->> Pipeline: Create
20+
Pipeline ->> PipelineMan: Pipeline instance
21+
PipelineMan ->> Pipeline: Set View node / display node / renderer
22+
PipelineMan ->> Pipeline: Reset Display
23+
PipelineMan ->> LayerDM: Request Render
24+
Note over User, Pipeline: --- Remove sequence ---
25+
User ->> Scene: Remove display node
26+
Scene ->> LayerDM: Node Removed
27+
LayerDM ->> PipelineMan: Node Removed
28+
PipelineMan ->> Pipeline: Remove / Remove renderer
29+
PipelineMan ->> LayerDM: Request Render

0 commit comments

Comments
 (0)