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: episodes/itksnap.Rmd
+31-14Lines changed: 31 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -82,8 +82,10 @@ For example, datasets in ITK-SNAP are illustrated in the following figures.
82
82
Refer to [`Summary and Setup`](https://healthbioscienceideas.github.io/Medical-Image-Registration-Short-Course/#data-sets) section for further details on CT-vs-PET-Ventilation-Imaging dataset.
83
83
84
84
85
-
Notes
86
-
```callout
85
+
86
+
:::::::::::::::::::::::::::::::::::::: spoiler
87
+
88
+
### Data sharing ethics and policies
87
89
1. Data may require extensive cleaning and pre-processing
88
90
before it is suitable to be used.
89
91
2. When using open datasets that contain images of humans,
@@ -100,7 +102,8 @@ Notes
100
102
Most data that comes from a hospital will be in
101
103
DICOM format, whereas NifTi is a very popular format
102
104
in the medical image analysis community.
103
-
```
105
+
106
+
::::::::::::::::::::::::::::::::::::::
104
107
105
108
### DICOM format
106
109
Digital Imaging and Communications in Medicine (DICOM) is a technical standard for the digital storage and transmission of medical images and related information.
@@ -118,15 +121,19 @@ Furthermore, there are complicated ‘links’ (provided by unique identifiers,
118
121
Therefore, a common first step of any image processing pipeline is to convert the DICOM image to a more suitable format such as `NifTi`.
119
122
Generally, most conversions go from DICOM to NIfTI. There are scenarios when you might want to convert from NIfTI **back** to DICOM, for example, if you need to import them into a clinical system that only works with DICOM.
120
123
121
-
Notes
122
-
```callout
124
+
125
+
126
+
:::::::::::::::::::::::::::::::::::::: spoiler
127
+
128
+
### Warning on converting images back to DICOM
123
129
Converting images back to DICOM such that
124
130
they are correctly interpreted by a clinical system
125
131
can be very tricky and requires a good understanding
126
132
of the DICOM standard.
127
133
More information on the DICOM standard
128
134
can be found here: https://www.dicomstandard.org
129
-
```
135
+
136
+
::::::::::::::::::::::::::::::::::::::
130
137
131
138
### NifTi format
132
139
The Neuroimaging Informatics Technology Initiative (NIfTI) image format are usually stored as a single file containing the imaging data and header information.
@@ -369,11 +376,14 @@ The **sform** directly stores the affine transformation in the header
369
376
whereas the **qform** stores the affine transformation using [quaternions](https://en.wikipedia.org/wiki/Quaternion).
370
377
```
371
378
372
-
```callout
379
+
:::::::::::::::::::::::::::::::::::::: spoiler
380
+
381
+
### Recommending `sform` over `qform`
373
382
We strongly advise always using the `sform` over the `qform`, as:
374
383
* It is easier to understand (at least for instructors).
375
384
* It can contain shears which cannot be represented using the `qform`.
376
-
```
385
+
386
+
::::::::::::::::::::::::::::::::::::::
377
387
378
388
```python
379
389
nii3ct.affine
@@ -452,11 +462,15 @@ There are 5 different sform/qform codes defined:
452
462
| 3 | talairach | RAS+ in Talairach atlas space |
453
463
| 4 | mni | RAS+ in MNI atlas space |
454
464
455
-
```callout
465
+
466
+
:::::::::::::::::::::::::::::::::::::: spoiler
467
+
468
+
### Which code to use?
456
469
But for most purposes all that matters is whether the code is unknown (numerical value 0) or one of the other valid values.
457
470
If the code is unknown then the sform/qform is not specified (and any values provided in the sform/qform fields of the header will be ignored).
458
471
For any other valid values the sform/qform is specified and the affine transform will be determined from the corresponding header values.
459
-
```
472
+
473
+
::::::::::::::::::::::::::::::::::::::
460
474
461
475
### `qform` transform
462
476
You can also see `qform` transform using the `get_qform` function, which returns the affine matrix represented by the qform:
@@ -545,10 +559,13 @@ qform_code : unknown
545
559
546
560
The floating point image can now be written to disk using the save function.
547
561
548
-
Notes.
549
-
```callout
550
-
We do not need to manually modify the type of the image data – setting the data type for the Nifti1Image object tells it which type to use when writing the image data to disk.
551
-
```
562
+
563
+
:::::::::::::::::::::::::::::::::::::: spoiler
564
+
565
+
### We do not need to manually modify the type of the image data?
566
+
Setting the data type for the Nifti1Image object tells it which type to use when writing the image data to disk.
0 commit comments