You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Quick_start_guide.rst
+17-20Lines changed: 17 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,19 +9,7 @@ Installation
9
9
10
10
To install the ITK Python package::
11
11
12
-
$ python -m pip install --upgrade pip
13
-
$ python -m pip install itk
14
-
15
-
If a pre-compiled wheel package is not found for your Python distribution, then it will
16
-
attempt to build from source.
17
-
18
-
.. note::
19
-
20
-
On Windows machines, the source path cannot be greater than 50 characters or
21
-
issues will occur during build time due to filename truncation in Visual
22
-
Studio. If you must compile from source, clone this repository in a short
23
-
directory, like *C:/IPP*. Then, run `setup.py` within the repository via the
24
-
command line.
12
+
$ pip install itk
25
13
26
14
27
15
Usage
@@ -36,22 +24,22 @@ Here is a simple python script that reads an image, applies a median image filte
36
24
37
25
There are two ways to instantiate filters with ITKPython:
38
26
39
-
- Implicit (recommended): ITK type information is automatically detected from the data. Typed filter objects and images are implicitly created.
27
+
- *Implicit (recommended)*: ITK type information is automatically detected from the data. Typed filter objects and images are implicitly created.
40
28
41
29
.. literalinclude:: code/ImplicitInstantiation.py
42
30
:lines: 8-
43
31
44
-
- Explicit: This can be useful if a filter cannot automatically select the type information (e.g. `CastImageFilter`), or to detect type mismatch errors which can lead to cryptic error messages.
32
+
- *Explicit*: This can be useful if an appropriate type cannot be determined implicitly, e.g. with the `CastImageFilter`, and when a different filter type than the default is desired.
45
33
46
-
Explicit instantiation of median image filter:
34
+
Explicit instantiation of a median image filter:
47
35
48
-
.. literalinclude:: code/ImplicitInstantiation.py
36
+
.. literalinclude:: code/ExplicitInstantiation.py
49
37
:lines: 8-
50
38
51
39
Explicit instantiation of cast image filter:
52
40
53
41
.. literalinclude:: code/CastImageFilter.py
54
-
:lines: 9-
42
+
:lines: 9-23
55
43
56
44
ITK Python types
57
45
................
@@ -68,7 +56,7 @@ ITK Python types
68
56
| std::complex<float> | itk.complex[itk.F] |
69
57
+---------------------+--------------------+
70
58
71
-
This list is not exhaustive and is only presented to illustrate the type names. The complete list of types can be found in the `ITK Software Guide <https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch9.html#x48-1530009.5>`_.
59
+
This list is not exhaustive and is only presented to illustrate the type names. The complete list of types can be found in the `ITK Software Guide <https://itk.org/ItkSoftwareGuide.pdf>`_.
72
60
73
61
Types can also be obtained from their name in the C programming language:
74
62
@@ -90,6 +78,15 @@ Some objects (matrix, vector, RGBPixel, ...) do not require the attribute `.New(
90
78
91
79
In case of doubt, look at the attributes of the object you are trying to instantiate.
92
80
81
+
Filter Parameters
82
+
.................
83
+
84
+
ITK filter parameters can be specified in the following ways:
85
+
86
+
.. literalinclude:: code/FilterParameters.py
87
+
:lines: 10-
88
+
89
+
93
90
Mixing ITK and NumPy
94
91
--------------------
95
92
@@ -101,7 +98,7 @@ The following script shows how to integrate NumPy and ITK:
101
98
:lines: 8-33
102
99
103
100
104
-
Similar functions are available to work with VNL vector and matrices:
101
+
Similar functions are available to work with `itk.Matrix`, VNL vectors and matrices:
0 commit comments