When you load the action and click on the provided buttons nothing
executes as we have not specified what to do when the user interacts
with those
widgets.
When you load the action and click on the provided buttons nothing executes as we have not specified what to do when the user interacts with those widgets.
## Step 03: Draw contours in a given orthogonal viewer (axial, coronal or sagittal) of CamiTK-imp
As the viewer on which the contours are drawn is going to be used
throughout the implementation, we will create an ENum for the viewers.
We will update the currently selected viewer depending on the radio
button selected in the GUI. We could listen to the `Clicked( )` signal of the radio
button and set the currently selected viewer accordingly. In order to do
this, we need to access the GUI widgets. Hence, we should set the
objects names of the three radio buttons using the
`setObjectName( )` method. Since we
are going to use the signals and slots mechanism, we have to include the
`Q_OBJECT` macro in the class header
file.
In order to draw contours on a viewer we can use the
`vtkContourWidget`[^2]. We will
create a member variable that will hold an instance of a
vtkContourWidget. The contour should be drawn on the selected slice of
As the viewer on which the contours are drawn is going to be used throughout the implementation, we will create an ENum for the viewers. We will update the currently selected viewer depending on the radio button selected in the GUI. We could listen to the `Clicked( )` signal of the radio button and set the currently selected viewer accordingly.
In order to do this, we need to access the GUI widgets. Hence, we should set the objects names of the three radio buttons using the`setObjectName( )` method. Since we are going to use the signals and slots mechanism, we have to include the `Q_OBJECT` macro in the class header file.
In order to draw contours on a viewer we can use the `vtkContourWidget`[^2]. We will create a member variable that will hold an instance of a `vtkContourWidget`. The contour should be drawn on the selected slice of
the selected viewer. In order to calculate the plane where the contour
should be drawn, we require the information of the ImageComponent on
which the contours are drawn. We will use another member variable to
...
...
@@ -139,8 +124,10 @@ that handles the above mentioned requirements. And let’s setup this
method to be executed when the **Reset** button is clicked and also when
the selected viewer is changed.
<!--
The corresponding code skeleton of the action can be found