CamiTK is a great tool that brings you the visualization power of VTK,
image processing power of ITK and GUI handling capabilities of Qt
letting you only concentrate on your work. There are many ways to go
about implementing what you need in CamiTK. In this tutorial, you will
be presented with on such way: **development in increments**.
For this tutorial, let’s create a **segmentation tool** that lets you
manually segment an image by drawing along the contours of the objects
of interest similar to the ITK-SNAP tool[^1] using the polygon mode.
First, let’s define the required functionality of this tool.
1. Draw contours in a given orthogonal viewer (axial, coronal or
sagittal) of CamiTK-imp (as different objects can be easily seen in
different views)
2. Copy an already drawn contour and paste it on another slice (as
modifying a contour may be faster than drawing it from scratch)
3. Visually see the segmentation in all four default viewers (axial,
coronal, sagittal and 3D) of CamiTK-imp
4. Save the segmentation as an image
5. Make the tool less error prone
And let’s do the implementation **in
increments**.
!!! warning
This tutorial was created and tested on CamiTK 4.0.4 using VTK 6.3 and QT 5.8. Depending on your configuration there may be slight changes or issues. |
## Step 01: Use the wizard to create a CEP
We will use this tool to perform some operations on images. Hence, we
only need to create a CamiTK Action that acts on CamiTK ImageComponents.
But following the good practices of CamiTK let us create a CEP called
Segmentor. The Segmentor CEP will have only one action also called
Segmentor.
Let’s create this CEP using the CamiTK-Wizard. While creating the action