Skip to content

Add ANTs' KellyKapowski interface #1845

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

Merged
merged 7 commits into from
Mar 20, 2017
Merged

Add ANTs' KellyKapowski interface #1845

merged 7 commits into from
Mar 20, 2017

Conversation

alexsavio
Copy link
Contributor

Hi,

This is the command for DiReCT cortical thickness measuring. Instead of using the whole antsCorticalThickness.sh script (which includes bias-field correction, warping, tissue segmentation, etc..).

This study shows that other combinations using only DiReCT can lead to more robust results:
http://dx.doi.org/10.1016/j.nicl.2016.05.017

@codecov-io
Copy link

codecov-io commented Feb 27, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@70b2084). Click here to learn what that means.
The diff coverage is 98.21%.

@@            Coverage Diff            @@
##             master    #1845   +/-   ##
=========================================
  Coverage          ?   73.12%           
=========================================
  Files             ?     1064           
  Lines             ?    53378           
  Branches          ?        0           
=========================================
  Hits              ?    39033           
  Misses            ?    14345           
  Partials          ?        0
Flag Coverage Δ
#unittests 73.12% <98.21%> (?)
Impacted Files Coverage Δ
nipype/interfaces/ants/segmentation.py 80.61% <98.21%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70b2084...ad48e19. Read the comment docs.

@alexsavio
Copy link
Contributor Author

this is something related with the output of the example. maybe I have to add the 'u' in the beginning of the output string? thanks!


def _list_outputs(self):
outputs = self._outputs().get()
outputs['cortical_thickness'] = os.path.abspath(self._gen_filename('cortical_thickness'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we use namesource and template for these two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean to change the name of the output parameters?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g., like this

out_file = File(argstr="--o %s", name_source=['in_file'],

then you can get rid of the list_outputs function.

@alexsavio
Copy link
Contributor Author

done. thanks for the review.

desc="Maximum number of iterations for estimating the invert \n"
"displacement field.")

cortical_thickness = File(argstr='--output "%s"', genfile=True, keep_extension=True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think genfile is required here.

skip += ['warped_white_matter', 'gray_matter_label', 'white_matter_label']
return super(KellyKapowski, self)._parse_inputs(skip=skip)

def _gen_filename(self, name):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you can delete this function as well.

Copy link
Contributor Author

@alexsavio alexsavio Mar 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I delete this function, how do I format the output parameter for the commandline in the _format_arg function?

Copy link
Contributor Author

@alexsavio alexsavio Mar 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do this because the output command argument is a 2-file argument with the values of cortical_thickness and warped_white_matter:

--output "[segmentation0_cortical_thickness.nii.gz,segmentation0_warped_white_matter.nii.gz]"

Is there a better way to do this? This is the scheme I could find in other ANTs interfaces.

@satra
Copy link
Member

satra commented Mar 17, 2017

@alexsavio - could you please merge with master and push - we have been trying to clean up travis/circle tests.

@satra satra merged commit 15f520d into nipy:master Mar 20, 2017
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

Successfully merging this pull request may close these issues.

3 participants