Skip to content

Conversation

oesteban
Copy link
Contributor

@oesteban oesteban commented Aug 5, 2013

Calculates various overlap measures between probabilistic distribution maps of segmentations, using the fuzzy definition proposed in: Crum et al., Generalized Overlap Measures for Evaluation and Validation in Medical Image Analysis, IEEE Trans. Med. Ima. 25(11),pp 1451-1461, Nov. 2006.

Follows the standard Overlap interface. For justification of this method, please see provided ref.

out_file = File("diff.nii", usedefault=True)


class FuzzyOverlapOutputSpec(TraitedSpec):
Copy link
Member

Choose a reason for hiding this comment

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

some descriptions of each of the outputs needed.

outputs = self._outputs().get()
for method in ("dice", "jaccard"):
outputs[method] = getattr(self, '_' + method)
#outputs['volume_difference'] = self._volume
Copy link
Member

Choose a reason for hiding this comment

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

remove if not required.

@satra
Copy link
Member

satra commented Aug 10, 2013

this looks good, please run pep8 on this file. (in addition to pep8 fixes for this interface, we welcome pep8 fixes on the file if you have time).

In-place run of the standard tool. Ref #662
@oesteban
Copy link
Contributor Author

Added pep8 fixes for the whole interface


>>> overlap = FuzzyOverlap()
>>> overlap.inputs.in_ref = [ 'ref_class0.nii', 'ref_class1.nii' ]
>>> overlap.inputs.in_tst = [ 'tst_class0.nii', 'tst_class1.nii' ]
Copy link
Member

Choose a reason for hiding this comment

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

you should add those dummy files - otherwise nosetest --with-docetest will fail

Minor change, as the names were not descriptive.
@oesteban
Copy link
Contributor Author

Added dummy files

@oesteban
Copy link
Contributor Author

oesteban commented Sep 3, 2013

Something else? :)

chrisgorgo added a commit that referenced this pull request Sep 4, 2013
Fuzzy overlap Jaccard and Dice indices computation
@chrisgorgo chrisgorgo merged commit 94779b4 into nipy:master Sep 4, 2013
@oesteban oesteban deleted the enh/FuzzyOverlap branch September 4, 2013 16:50
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