Skip to content

Commit 39f7717

Browse files
committed
adding spoiler sandpaper features where notes were #4
1 parent 62a91f7 commit 39f7717

1 file changed

Lines changed: 31 additions & 14 deletions

File tree

episodes/itksnap.Rmd

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ For example, datasets in ITK-SNAP are illustrated in the following figures.
8282
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.
8383

8484

85-
Notes
86-
```callout
85+
86+
:::::::::::::::::::::::::::::::::::::: spoiler
87+
88+
### Data sharing ethics and policies
8789
1. Data may require extensive cleaning and pre-processing
8890
before it is suitable to be used.
8991
2. When using open datasets that contain images of humans,
@@ -100,7 +102,8 @@ Notes
100102
Most data that comes from a hospital will be in
101103
DICOM format, whereas NifTi is a very popular format
102104
in the medical image analysis community.
103-
```
105+
106+
::::::::::::::::::::::::::::::::::::::
104107

105108
### DICOM format
106109
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,
118121
Therefore, a common first step of any image processing pipeline is to convert the DICOM image to a more suitable format such as `NifTi`.
119122
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.
120123

121-
Notes
122-
```callout
124+
125+
126+
:::::::::::::::::::::::::::::::::::::: spoiler
127+
128+
### Warning on converting images back to DICOM
123129
Converting images back to DICOM such that
124130
they are correctly interpreted by a clinical system
125131
can be very tricky and requires a good understanding
126132
of the DICOM standard.
127133
More information on the DICOM standard
128134
can be found here: https://www.dicomstandard.org
129-
```
135+
136+
::::::::::::::::::::::::::::::::::::::
130137

131138
### NifTi format
132139
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
369376
whereas the **qform** stores the affine transformation using [quaternions](https://en.wikipedia.org/wiki/Quaternion).
370377
```
371378

372-
```callout
379+
:::::::::::::::::::::::::::::::::::::: spoiler
380+
381+
### Recommending `sform` over `qform`
373382
We strongly advise always using the `sform` over the `qform`, as:
374383
* It is easier to understand (at least for instructors).
375384
* It can contain shears which cannot be represented using the `qform`.
376-
```
385+
386+
::::::::::::::::::::::::::::::::::::::
377387

378388
```python
379389
nii3ct.affine
@@ -452,11 +462,15 @@ There are 5 different sform/qform codes defined:
452462
| 3 | talairach | RAS+ in Talairach atlas space |
453463
| 4 | mni | RAS+ in MNI atlas space |
454464

455-
```callout
465+
466+
:::::::::::::::::::::::::::::::::::::: spoiler
467+
468+
### Which code to use?
456469
But for most purposes all that matters is whether the code is unknown (numerical value 0) or one of the other valid values.
457470
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).
458471
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+
::::::::::::::::::::::::::::::::::::::
460474

461475
### `qform` transform
462476
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
545559

546560
The floating point image can now be written to disk using the save function.
547561

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.
567+
568+
::::::::::::::::::::::::::::::::::::::
552569

553570
```python
554571
nib.save(nii3ct, 'data/ct_for_pet_float32.nii.gz')

0 commit comments

Comments
 (0)