Commit 8f8e1a6
committed
BUG: Jacobians not in physical space
The gradient is calculated in a neighborhood defined in index space.
DisplacementFieldTransform accounts for this by multiplying rows of the
gradient by the direction matrix. DisplacementFieldJacobianDeterminantFilter did not,
hence its determinants were different for the same physical transformation under different
voxel index ordering.
DisplacementFieldJacobianDeterminantFilter is now fixed to use the direction matrix.
The test is updated to check that the determinant for a given displacement field is consistent
at the same point in physical space, regardless of how the index space is oriented.
More details in issue #5358.1 parent 6667857 commit 8f8e1a6
File tree
3 files changed
+51
-13
lines changed- Modules/Filtering/DisplacementField
- include
- test
3 files changed
+51
-13
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
271 | 275 | | |
272 | 276 | | |
273 | 277 | | |
| 278 | + | |
| 279 | + | |
274 | 280 | | |
275 | 281 | | |
276 | 282 | | |
| |||
Lines changed: 40 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
| |||
208 | 218 | | |
209 | 219 | | |
210 | 220 | | |
211 | | - | |
212 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
213 | 236 | | |
214 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
215 | 246 | | |
216 | | - | |
| 247 | + | |
217 | 248 | | |
218 | | - | |
219 | | - | |
220 | | - | |
| 249 | + | |
| 250 | + | |
221 | 251 | | |
222 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
223 | 255 | | |
224 | 256 | | |
225 | 257 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | | - | |
204 | | - | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
0 commit comments