Diff of /README.md [000000] .. [b775e2]

Switch to unified view

a b/README.md
1
# Slicer-MusculoskeletalAnalysis
2
3
Musculoskeletal Analysis extension for 3D Slicer.
4
5
<p align="center">
6
  <img width="50%" src="Scripted/MusculoskeletalAnalysis/Resources/Icons/MusculoskeletalAnalysis.png" alt="MusculoskeletalAnalysis Logo"/>
7
</p>
8
9
## How to use
10
1. Load a DICOM 3D image using the Add DICOM Data module.
11
2. Create a segment representing the area to analyze using the Segmentations and Segment Editor modules.
12
* **Cortical**: Segment should contain the bone including pores, but exclude the medullary cavity.
13
* **Cancellous**: Segement should contain cancellous bone and the spacing between bone, but exclude the surrounding cortical bone.
14
* **Density**: Segment should contain whatever area you want measured.
15
* **Intervertebral**: This function uses two segments, as thresholding alone may not be as effective at cleanly seperating NP from AF. One segment should contain the entire disc, the second should contrain just the Nucleus Pulposus. Order does not matter, as the analysys will identify which is which based on size.
16
3. Select which type of analysis you wish to perform.
17
4. Use the Threshold Selector to select the values for bone. Used to seperate bone from pores in cortical analysis and spacing in cancellous analysis. Skip this step for intervertebral disc analysis.
18
5. (Optional) Use the Advanced tab if the volume is not loaded from a DICOM.
19
6. Use the Output Directory Selector to select a directory. Output files will be created in this directory if they do not already exist, or will be appended to if they do.
20
21
## Musculoskeletal Analysis
22
23
### IO: Input/output parameters
24
25
* **Input Volume**: A 3d image of the bone.
26
* **Analysis Segment**: A segment of the image containing the bone area to analyse.
27
* **Threshold**: Threshold values representing bone.
28
* **Analysis**: Select the analysis to perform.
29
* **Output Directory**: The location to save the output file to.
30
31
### Advanced tab
32
33
The program requires information from certain DICOM tags to run. Normally it can retrieve that information from the volume node, but if the volume node does not have those tags(i.e, if you are using a copy of the original volume, or your data came from a different format), you can either select a node that does, or enter the values manually.
34
35
## Cortical Analysis
36
37
### IO: Input/output parameters
38
39
* **Input Volume**: A 3d image of the bone.
40
* **Bone Segment**: A segment of the image containing the cortical bone area. Includes pores, excludes the medullary cavity.
41
* **Threshold**: Threshold values representing bone. Used to seperate bone from pores.
42
* **Output Directory**: The location to save the output file to.
43
44
### Output File
45
46
The output file is a `tsv` file named `cortical.txt` with the following columns:
47
48
* **Date Analysis Performed**: The current date
49
* **Input Volume**: Name of the input volume
50
* **Mean Cortical Thickness (mm)**: The mean thickness of the bone, measured by largest sphere thickness, in milimeters
51
* **Cortical Thickness Standard Deviation (mm)**: The standard deviation of the above measurement
52
* **Tissue Mineral Density(mgHA/cm^3)**: The mean density of the bone, measured in miligrams of hydroxyapatite per cubic centimeter
53
* **Porosity**: The fraction of the bone area made up of pores
54
* **Total Area (mm^2)**: The area of the bone and medullary cavity. All areas are measured in average square milimeters per slice
55
* **Bone Area (mm^2)**: The area of the bone
56
* **Medullary Area (mm^2)**: The area of the medullary cavity
57
* **Polar Moment of Interia(mm^4)**: The moment of intertia around the z-axis, based on the shape of the mask. Measured in mm^4
58
* **Voxel Dimension (mm)**: The side length of one voxel, measured in milimeters
59
60
## Cancellous Analysis
61
62
### IO: Input/output parameters
63
64
* **Input Volume:** A 3d image of the bone.
65
* **Bone Segment:** A segment of the image containing the cancellous bone area. Includes the medullary cavity, excludes surrounding cotical bone.
66
* **Threshold:** Threshold values representing bone. Used to seperate bone from cavity.
67
* **Output Directory:** The location to save the output file to.
68
69
70
### Output File
71
72
The output file is a `tsv` file named `cancellous.txt` with the following columns:
73
74
* **Date Analysis Performed**: The current date
75
* **Input Volume**: Name of the input volume
76
* **Total Volume (mm^3)**: The volume of the segmented area
77
* **Bone Volume (mm^3)**: The volume of cancellous bone in the segmented area, calculated using marching cubes
78
* **Bone Volume/Total Volume**: The fraction of the volume that is bone
79
* **Mean Trabecular Thickness (mm)**: The mean thickess of the bone, measured using largest sphere thickness, in milimeters
80
* **Trabecular Thickness Standard Deviation (mm)**: The standard deviation of the mean trabecular thickness
81
* **Mean Trabecular Spacing (mm)**: The mean thickness of the non area not containing bone in milimeters, measured using the same method as bone thickness.
82
* **Trabecular Spacing Standard Deviation (mm)**: The standard deviation of the mean trabecular spacing
83
* **Trabecular Number**: Approximated as inverse of trabecular spacing
84
* **Structure Model Index**: A measurement of the trabecular shape. 0 is a plate, 3 is a rod, 4 is a sphere
85
* **Connectivity Density**: A measurement of the number of connections per volume, based on the Euler characteristic of the bone after removing isolated components and holes
86
* **Tissue Mineral Density(mgHA/cm^3)**: The mean density of the bone, measured in miligrams of hydroxyapatite per cubic centimeter
87
* **Voxel Dimension (mm)**: The side length of one voxel, measured in milimeters
88
* **Lower Threshold**: The lower threshold value for bone
89
* **Upper Threshold**: The upper threshold value for bone
90
91
## Density Analysis
92
93
### IO: Input/output parameters
94
95
* **Input Volume**: A 3d image of the bone.
96
* **Bone Segment**: A segmentation of the image containing the bone area to be measured.
97
* **Output Directory**: The location to save the output file to.
98
99
### Output File
100
101
The output file is a `tsv` file named `density.txt` with the following columns:.
102
103
* **Date Analysis Performed**: The current date
104
* **Input Volume**: Name of the input volume
105
* **Area by Slice**: The area of the segment in each slice of each slice
106
* **Mean Density by Slice**: The average density of the segmented area each slice
107
* **Standard Deviation of Density by Slice**: The standard deviation of the density of each slice
108
* **Min Density by Slice**: The lowest density in the segment of each slice
109
* **Max Density by Slice**: The highest density in the segment of each slice
110
* **Mean Area**: The mean area of the segment of all slices
111
* **Standard Deviation of Area**: The standard deviation of the segmented area of all slices
112
* **Min Area**: The area of the smallest segment slice
113
* **Max Area**: The area of the largest segment slice
114
* **Mean Density**: The average density of the entire segmented volume
115
* **Standard Deviation of Density**: The standard deviation of density of the segmented volume
116
* **Min Density**: The minimum density of the segmented volume
117
* **Max Density**: The maximum density of the segmented volume
118
119
## Intervertebral Analysis
120
121
### IO: Input/output parameters
122
123
* **Input Volume**: A 3d image of an intervertebral disc
124
* **Segement1** and **Segment2**: Two segmentations containing the disc and the nucleus pulposus. (Differentiated by size)
125
* **Output Directory**: The location to save the output file to.
126
127
### Output File
128
129
The output file is a `tsv` file named `intervertebral.txt` with the following columns:
130
131
* **Date Analysis Performed**: The current date
132
* **Input Volume**: Name of the input volume
133
* **Disc Volume (mm^3)**: The volume of the disc
134
* **Nucleus Pulposus Volume (mm^3)**: The volume of the NP
135
* **Volume Ratio**: The ratio of whole disc volume to NP volume
136
* **Annulus Fibrosus Width (mm)**: The width of the AF, calculated by using rotating calipers algorithm on each slice and finding the maximum width
137
* **Nucleus Pulposus Width (mm)**: The width of the NP, calculated using the same method as AF width
138
* **Disc Height (mm)**: The height of the disc at its center
139
* **Disc Height Ratio**: The ratio of disc height to disc width
140
* **Voxel Dimension (mm)**: The side length of one voxel, measured in milimeters
141
142
## Tutorials:
143
144
### Cortical Analysis:
145
1. Load Cortical1 and CorticalMask1 from the Sample Data Module.
146
2. Open the Musculoskeletal Analysis Module under Quantification.
147
3. Set Analysis to "Cortical Bone".
148
4. Set Input Volume to Cortical1.
149
5. Set Analysis Segment to CorticalMask1 and Segment_1.
150
6. Use the sliders to set Threshold to 4000-10000.
151
7. Open the Advanced tab and click "Enter DICOM tags manually".
152
8. Set values to 0.0073996, 4096, 365.712, -199.725998, and 0.4939.
153
9. Click the "..." next to Output Directory to open the directory selection menu, and select a location to save files to.
154
10. Click "Apply".
155
156
### Cancellous Analysis
157
1. Load Cancellous1 and CancellousMask1 from the Sample Data Module.
158
2. Open the Musculoskeletal Analysis Module under Quantification.
159
3. Set Analysis to "Cancellous Bone".
160
4. Set Input Volume to Cancellous1.
161
5. Set Analysis Segment to CancellousMask1 and Segment_1.
162
6. Use the sliders to set Threshold to 1500-10000.
163
7. Open the Advanced tab and click "Enter DICOM tags manually".
164
8. Set values to 0.0073996, 4096, 365.712, -199.725998, and 0.4939.
165
9. Click the "..." next to Output Directory to open the directory selection menu, and select a location to save files to.
166
10. Click "Apply".
167
168
### Density Analysis
169
1. Load Cancellous1 and CancellousMask1 from the Sample Data Module.
170
2. Open the Musculoskeletal Analysis Module under Quantification.
171
3. Set Analysis to "Bone Density".
172
4. Set Input Volume to Cancellous1.
173
5. Set Analysis Segment to CancellousMask1 and Segment_1.
174
6. Use the sliders to set Threshold to 1500-10000.
175
7. Open the Advanced tab and click "Enter DICOM tags manually".
176
8. Set values to 0.0073996, 4096, 365.712, -199.725998, and 0.4939.
177
9. Click the "..." next to Output Directory to open the directory selection menu, and select a location to save files to.
178
10. Click "Apply".
179
180
### Intervertebral Analysis
181
1. Load Intervertebral1 and IntervertebralMask1 from the Sample Data Module.
182
2. Open the Musculoskeletal Analysis Module under Quantification.
183
3. Set Analysis to "Intervertebral Disc".
184
4. Set Input Volume to Intervertebral1.
185
5. Set Analysis Segment to IntervertebralMask1 and check Segment_1 and Segment_2.
186
6. Open the Advanced tab and click "Enter DICOM tags manually".
187
7. Set "Voxel Size" to 0.01, leave the other fields blank.
188
8. Click the "..." next to Output Directory to open the directory selection menu, and select a location to save files to.
189
9. Click "Apply".
190
191
## Python Dependencies
192
193
The following additional python packages are required and will be installed the corresponding analysis functions are run:
194
195
|                | Cortical Analysis  | Cancellous Analysis | Density Analysis   | Intervertebral Analysis |
196
|----------------|--------------------|---------------------|--------------------|-------------------------|
197
| `pynrrd`       | :white_check_mark: | :white_check_mark:  | :white_check_mark: | :white_check_mark:      |
198
| `scikit-image` | :white_check_mark: | :white_check_mark:  |                    |                         |
199
| `scipy`        | :white_check_mark: | :white_check_mark:  |                    |                         |
200
| `trimesh`      |                    | :white_check_mark:  |                    |                         |
201
202
## Screenshots
203
204
| ![Musculoskeletal Analysis](Scripted/MusculoskeletalAnalysis/Resources/Icons/Screenshot.png) |
205
|--|
206
| <sub>_User interface of the Musculoskeletal Analysis module._</sub> |
207
208
## License
209
210
This software is licensed under the terms of the [MIT](LICENSE.txt).
211