Q: Hello, I am currently experiencing issues with minctracc which crashes and outputs this error:
- Error in /usr/local/bic/bin/minctracc in file init_params.c, line 593 Cannot calculate the COG or COV of volume 1.*
infos:
- a)* The two volumes I am trying to align are 2D sections (written as 3D volumes z→length = 1).
- Source:*
image dimensions: xspace yspace zspace
dimension name length step start -------------- ------ —— ----- xspace 6720 0.0016 1.9464 yspace 8544 0.0016 6.6568 zspace 1 0.1 0
- Target:*
dimension name length step start
-------------- ------ —— ----- xspace 7520 0.0016 1.0248 yspace 8128 0.0016 7.3224 zspace 1 0.1 0
- b)* mincstats -com -world_only gives me correct COG values.
- Source*: CoM_real(x,y,z): 7.42142568 13.35683104 0
- Target*: CoM_real(x,y,z): 8.261485204 10.00648279 0
- c)* if I downsample enough both volumes (0.02 mm) using autocrop, I can get minctracc working without crashing:
- Source:*
dimension name length step start -------------- ------ —— ----- xspace 538 0.02 1.9464 yspace 684 0.02 6.6568 zspace 1 0.1 0
- Target:*
dimension name length step start -------------- ------ —— ----- xspace 646 0.02 1.0248 yspace 748 0.02 2.9704 zspace 1 0.1 0
minctracc gives:
- Source*: COG of v1: 5.848002 12.464701 0.000000
- Target:* COG of v2: 11.014800 10.345677 0.000000
[trans] = 5.166798 −2.119023 0.000000
But the COG values are not correct. For comparison, *mincstats -com -world_only* on the downsampled volumes gives the following values which are not different from when computed in point b.
- Source:* CoM_real(x,y,z): 7.42070981 13.35900666 0
- Target:* CoM_real(x,y,z): 8.259952437 10.00411748 0
- d)* If I donwsample further (0.1 mm)*, *the discrepancies between the COG values computed with mincstats & minctracc decrease slightly.
Source:*
dimension name length step start -------------- ------ —— ----- xspace 108 0.1 1.9464 yspace 137 0.1 6.6568 zspace 1 0.1 0
- Target:
- dimension name length step start
------ —— ----- xspace 130 0.1 1.0248 yspace 150 0.1 2.9704 zspace 1 0.1 0 - minctracc gives:
Source:* COG of v1: 6.783619 12.909432 0.000000
- Target:* COG of v2: 10.974800 10.455488 0.000000
[trans] = 4.191181 −2.453944 0.000000
mincstats still gives the “same” values as in b) and c):*
- Source*: CoM_real(x,y,z): 7.426436221 13.35572188 0
- Target:* CoM_real(x,y,z): 8.267742651 9.998513526 0
Am I hitting at a limit of minctracc here? Any clue?
Thanks in advance. http://www.bic.mni.mcgill.ca/pipermail/minc-users/2010-February/002642.html
A: minctracc really doesn’t do all that well with non 3D data as only a small out of plane registration is needed to send things haywire. You can fiddle with the weights parameters but it still won’t help you that much. My suggestions would be to make the problem “more 3D”. The easiest way to do this is to turn each of your 2D slices into a thick 3D “cylinder” as such:
(assuming 1mm voxels)
- First fake 3D block:
mincconcat -concat_dimension zspace slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc slice.mnc -step 1 -start 0 block.mnc
- then add a few blank slices top and bottom and blur the edges volpad -distance 4 -smooth -smooth_distance 2 block.mnc padded.mnc
Then run minctracc on your resulting padded volumes. I would set the out of plane rotations weights to 0:
minctracc -w_rotations 0 0 0.0174533 …
Once you have recovered a transformation you can then apply this to the original volumes and hope all goes well. :)
volpad can be found here:
http://mavis.anu.edu.au/scripts/