-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
162 lines (153 loc) · 12.8 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<Window x:Class="DoseGradient.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DoseGradient"
xmlns:oxy="http://oxyplot.org/wpf"
mc:Ignorable="d"
Title="DoseGradient" Height="800" Width="800" WindowStartupLocation="CenterScreen" Background="Silver">
<Window.Resources>
<Style TargetType="{x:Type oxy:TrackerControl}">
<Setter Property="LineStroke" Value="Red" />
</Style>
</Window.Resources>
<Grid Margin="10,10,10,10" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" x:Name="PlotDoseImageColumn"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="0.4*" x:Name="PlotDoseImageRow"/>
<RowDefinition Height="0.3*" x:Name="PlotProfileRow"/>
<RowDefinition Height="0.3*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" Height="Auto" VerticalAlignment="Center">
<Button Grid.Column="0" Content="Open..." Width="100" Height="30" Click="Button_Click" VerticalAlignment="Center"></Button>
<Button Content="Save..." Width="100" Height="30" Margin="10,0,0,0" VerticalAlignment="Center" Click="Button_Click_5"></Button>
<CheckBox x:Name="CheckBoxOverwriteZeroVoxels" Height="30" VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="15,0,0,0">
<Label Content="Overwrite all voxels" VerticalAlignment="Top" ToolTip="Using this option will overwrite all elements of the dose matrix (in each z-slice), regardless of their value."></Label>
</CheckBox>
<CheckBox x:Name="CheckBoxChangeUID" Height="30" VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="15,0,0,0" IsChecked="True">
<Label Content="Change UID" VerticalAlignment="Top" ToolTip="Using this option will change SOPInstanceUID of the RT dose file."></Label>
</CheckBox>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" Height="Auto" VerticalAlignment="Center">
<Label Content="Select plot type:" Height="30" VerticalAlignment="Center"></Label>
<ComboBox Grid.Column="1" x:Name="DoseImagePlotTypeComboBox" Height="30" HorizontalAlignment="Right" VerticalAlignment="Center" Width="120" VerticalContentAlignment="Center" SelectionChanged="DoseImagePlotTypeComboBox_SelectionChanged"></ComboBox>
<Button Content="?" Width="30" Margin="10,0,0,0" Background="AliceBlue" Click="Button_Click_6"></Button>
</StackPanel>
</Grid>
<Grid Grid.Row="1" x:Name="GridPlotImageDose">
<oxy:PlotView x:Name="OxyPlotImageDose" Width="750" Height="275" IsMouseWheelEnabled="True" PreviewMouseWheel="PlotAperture_PreviewMouseWheel" VerticalAlignment="Top"/>
</Grid>
<Grid Grid.Row="2" x:Name="GridPlotProfile">
<oxy:PlotView x:Name="OxyPlotProfile" Width="750" Height="210" IsMouseWheelEnabled="False" VerticalAlignment="Top"/>
</Grid>
<GroupBox Grid.Row="3" Margin="0,10,0,0">
<GroupBox.Header>
<DockPanel HorizontalAlignment="Stretch">
<Label Content="Gradient regions" HorizontalAlignment="Left"></Label>
<Button HorizontalAlignment="Right" Height="20" Width="25" Margin="5,0,0,0" Click="Button_Click_2">
<Image Source="/images/0grad.png"></Image>
</Button>
<Button HorizontalAlignment="Right" Height="20" Width="25" Margin="5,0,0,0" Click="Button_Click_3">
<Image Source="/images/1grad1.png"></Image>
</Button>
<Button HorizontalAlignment="Right" Height="20" Width="25" Margin="5,0,0,0" Click="Button_Click_8">
<Image Source="/images/1grad2.png"></Image>
</Button>
<Button HorizontalAlignment="Right" Height="20" Width="25" Margin="5,0,0,0" Click="Button_Click_4">
<Image Source="/images/2grad.png"></Image>
</Button>
<Button HorizontalAlignment="Right" Height="20" Width="25" Margin="5,0,0,0" Click="Button_Click_7">
<Image Source="/images/2grad2.png"></Image>
</Button>
<Button HorizontalAlignment="Right" Height="20" Width="25" Margin="5,0,0,0" Click="Button_Click_1">
<Image Source="/images/2grad3.png"></Image>
</Button>
</DockPanel>
</GroupBox.Header>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="D1" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="1" Content="D2" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="2" Content="D3" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="3" Content="D4" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="4" Content="D5" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<TextBox Grid.Row="1" Grid.Column="0" x:Name="TextBoxD1" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="1" x:Name="TextBoxD2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="2" x:Name="TextBoxD3" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="3" x:Name="TextBoxD4" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="4" x:Name="TextBoxD5" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
</Grid>
<Grid Grid.Row="1" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="P1" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="1" Content="P2" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="2" Content="P3" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="3" Content="P4" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="4" Content="P5" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="5" Content="P6" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="6" Content="P7" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<Label Grid.Row="0" Grid.Column="7" Content="P8" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Bottom"></Label>
<TextBox Grid.Row="1" Grid.Column="0" x:Name="TextBoxP1" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="1" x:Name="TextBoxP2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="2" x:Name="TextBoxP3" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="3" x:Name="TextBoxP4" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="4" x:Name="TextBoxP5" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="5" x:Name="TextBoxP6" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="6" x:Name="TextBoxP7" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
<TextBox Grid.Row="1" Grid.Column="7" x:Name="TextBoxP8" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontWeight="Bold" TextChanged="OnTextChanged" LostFocus="TextBoxLostFocus"></TextBox>
</Grid>
</Grid>
</GroupBox>
</Grid>
</Grid>
</Window>