Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement morpho version #1

Open
gdevenyi opened this issue Aug 31, 2015 · 7 comments
Open

Implement morpho version #1

gdevenyi opened this issue Aug 31, 2015 · 7 comments

Comments

@gdevenyi
Copy link
Member

Needs a bunch of tweaking for transforming objects into common morpho space. May have to re-implement with minc-transforms for this to work.

@gdevenyi
Copy link
Member Author

gdevenyi commented Jan 6, 2016

MINC implemented.

Next step: What transforms need to be computed?

@gdevenyi
Copy link
Member Author

Key to morpho is the registrations must be computed in a common space.

This means all inputs need to pre-registered to model space first (is it only lsq12?) Construction of new model in MNI space means we could bootstrap registration using bpipe outputs.

antsRegistration offers the following helpers after registering to model space:

     -q, --initial-fixed-transform initialTransform
                                   [initialTransform,<useInverse>]
                                   [fixedImage,movingImage,initializationFeature]
          Specify the initial fixed transform(s) which get immediately incorporated into 
          the composite transform. The order of the transforms is stack-esque in that the 
          last transform specified on the command line is the first to be applied. In 
          addition to initialization with ITK transforms, the user can perform an initial 
          translation alignment by specifying the fixed and moving images and selecting an 
          initialization feature. These features include using the geometric center of the 
          images (=0), the image intensities (=1), or the origin of the images (=2). 

     -r, --initial-moving-transform initialTransform
                                    [initialTransform,<useInverse>]
                                    [fixedImage,movingImage,initializationFeature]
          Specify the initial moving transform(s) which get immediately incorporated into 
          the composite transform. The order of the transforms is stack-esque in that the 
          last transform specified on the command line is the first to be applied. In 
          addition to initialization with ITK transforms, the user can perform an initial 
          translation alignment by specifying the fixed and moving images and selecting an 
          initialization feature. These features include using the geometric center of the 
          images (=0), the image intensities (=1), or the origin of the images (=2). 

Which means we can use logic such as:
"if model exists, generate a transform for all inputs to it" and then "if transform exists, use as bootstrap rather than CoI of images"

@gdevenyi
Copy link
Member Author

To test this need to:

  • have three brains in different spaces (colin, OAS1, atlas1)
  • register colin and OAS1 to atlas1
  • resample
  • register OAS1 to colin
  • resample

Compare to:

  • register OAS1 to colin using -r and -q
  • resample

If this works the way we want, these should be equivalent without the extra resamples.

@gdevenyi
Copy link
Member Author

These give slightly different transforms in the end, but this isn't surprising.

Need to strip out the xfmjoining from the morpho bits.

There are some questions about what to do about linear bits in morpho space, and figure out how to zero out movement bits in the final displacement transform.

@gdevenyi
Copy link
Member Author

gdevenyi commented Sep 8, 2016

Things that needs to be done:

  • transform objects with ants
  • fix normals
  • calculate voroni areas
  • calculate displacements
  • properly handle model space
  • implement surface smoothing
  • re-generate model from fixed atlases
  • find original model generating transforms and combine
  • write robust averaging code for transforms

@gdevenyi
Copy link
Member Author

Revelation:
We can push around deformation fields with affine transforms, this means we can push all the transforms into model space as a post-processing step. Then combine with antsApplyTransforms. Finally average.

For the case of morpho surface area, apply entire transform chain to input object all the way to subject space, then apply only inverse affine transforms back to remove all bulk scaling effects. Result is non-linear defs only on surface.

@gdevenyi
Copy link
Member Author

gdevenyi commented Nov 2, 2016

Stages to write:

  • resample and combine grids
  • average grids & compute determinants
  • evaluate displacements against model objects
  • transform objects for surface area
  • vote objects for surface area
  • compute surface area & normalize to model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant