CamiTK_development_tutorial.md 5.93 KB
Newer Older
1
2
3
4
#CamiTK Development Tutorial

The following set of tutorials will show you how you could use CamiTK for development.

5
If you have any problems/doubts/comments regarding the following tutorials, please do not hesitate to [ask for help](../Getting%20Started/CamiTK%20Overviews/How_To_Ask_For_Help).
6

7
<!--
8
9
10
| Wizard | Developing | Testing |
| ---    | ---------- | ------- |
| <ul><li>How to create a component</li><li>How to create an action</li><ul><li>How to add a VTK Widget to an action</li><li>How to add your own Qt Widgets to your action</li><li>How to display new object in a CamiTK action</li><li>How to add Qt Widgets as additional action parameters for actions</li><li>created using the CamiTK wizard</li></ul></ul> | <ul><li>CamiTK extensions code examples</li><li>How to export/import DLL into CamiTK</li><li>How to create an application</li><li>Check memory leaks</li><li>Step by step creation of a segmentation tool</li></ul> | <ul><li>Testing in CamiTK</li></ul> |
11
12
13
14
15
16
17
18
-->

## Tutorial source

The tutorial CEP is provided with the CamiTK Community Edition. It contains some examples that could help you develop your own extension:

| Type | Name | What does it demonstrates? | Source Code |
| ---- | ---- | -------------------------- | ----------- |
19
20
21
| Action | averagevoxelvalues | (image) Compute the average voxels value in the neiborhoods of the currently selected voxel | `tutorials/actions/averagevoxelvalues` |
| Action | basicpicking | (image and mesh) A basic picking demo extension. It contains two actions demonstrating one way to get information on mesh or images using picking (i.e., clicking on the object in the 2D/3D interactive viewer) | `tutorials/actions/basicpicking` |

22
23
24
25

<!--


26
  meshanimation  properties       selection             vtkwidget
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
basicpicking        hardcodedpipeline  meshpointdata  pythonscripting  sleepingwhileworking

actions/selection/MeshSelection.h:    virtual QString getDescription() {
actions/selection/MeshSelection.h-        return "This extension shows how to work with the mesh selection";
--
actions/meshanimation/shakerextension/ShakerExtension.h:    virtual QString getDescription() {
actions/meshanimation/shakerextension/ShakerExtension.h-        return "An example of mesh animation. The shaker animation motors. It shakes your mesh in all directions!";
--
actions/hardcodedpipeline/HardCodedPipelineExtension.h:    virtual QString getDescription() {
actions/hardcodedpipeline/HardCodedPipelineExtension.h-        return "Demo that apply two actions from another action";
--
actions/basicpicking/BasicPickingExtension.h:    virtual QString getDescription() {
actions/basicpicking/BasicPickingExtension.h-        return "This is a basic picking tutorial/demo extension.<br/>It contains two actions demonstrating one way to get information on mesh or images using picking (clicking on the object in the 2D/3D interactive viewers).";
--
actions/properties/PropAction.cpp:                    newProp = new Property(propName, propValue, actionParam->getDescription(), "");
actions/properties/PropAction.cpp-                }
--
actions/properties/PropAction.cpp:                    newProp = new Property(propName, (Enumeration) propValue.toInt(), actionParam->getDescription(), "");
actions/properties/PropAction.cpp-                }
--
actions/properties/PropertiesExtension.h:    virtual QString getDescription() {
actions/properties/PropertiesExtension.h-        return "Extensions that manipulates component dynamic properties";
--
actions/sleepingwhileworking/SleepingWhileWorkingExtension.h:    virtual QString getDescription() {
actions/sleepingwhileworking/SleepingWhileWorkingExtension.h-        return "This extension shows how to directly manipulate the viewers (and pretend you are busily doing it yourself!)";
--
actions/meshpointdata/MeshPointData.h:    virtual QString getDescription() {
actions/meshpointdata/MeshPointData.h-        return "This extension shows how to show/hide mesh point data using a color scale";
--
actions/vtkwidget/VtkWidgetExtension.h:    virtual QString getDescription() {
actions/vtkwidget/VtkWidgetExtension.h-        return "This is a a simple action extension containing one action to show how to add a vtk 3D widget in a viewer (a VTK Widget is an type of interaction directly available in a VTK renderer window).";
--
components/abort/AbortExtension.cpp:// --------------- getDescription -------------------
components/abort/AbortExtension.cpp:QString AbortExtension::getDescription() const {
components/abort/AbortExtension.cpp-    return "A small extension that can be used for testing how CamiTK handle AbortException in component constructor.";
--
components/abort/AbortExtension.h:    virtual QString getDescription() const;
components/abort/AbortExtension.h-
--
components/pickme/PickMeComponent.h:    virtual QString getDescription() const {
components/pickme/PickMeComponent.h-        return "This tutorial show how to the pointPicked(..) and cellPicked(..) method to interact directly with your component";
--
components/mixed/MixedExtension.h:    virtual QString getDescription() const;
components/mixed/MixedExtension.h-
--
components/mixed/MixedExtension.cpp:// --------------- getDescription -------------------
components/mixed/MixedExtension.cpp:QString MixedExtension::getDescription() const {
components/mixed/MixedExtension.cpp-    return "A small extension that integrates mha and vtk together, i.e <em>.mixed</em> files in <b>CamiTK</b>.<br/>(very few support!)";

-->


## Other tutorials

This wiki contains additional how-tos:

83
84
85
- [how to add Qt Widgets as additional action parameters for actions created using the CamiTK wizard](How_to_add_Qt_Widgets_as_additional_action_parameters_for_actions_created_using_the_CamiTK_wizard)
- [How to add your own Qt Widgets to your action](How_to_add_your_own_Qt_Widgets_to_your_action)
- [A step by step guid to create a segmentation tool that lets you manually segment an image by drawing along the contours of the objects of interest, similarly to ITK-SNAP](Create_a_manual_segmentation_tool)
86
87