-
Notifications
You must be signed in to change notification settings - Fork 16
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
extending -otsu with parameters to add multiple threshold functionality #23
Conversation
…oid-mark the integer parameter was present in the wrong command
…t fits the current codebase
…tiple thresholds using the more advanced itkOtsuMultipleThresholdsImageFilter
Hi Christian,
This looks really useful! One question I had before merging is that c3d
already has commands -vote and -merge. Adding the -label-voting command
might confuse users. Is there any way to accomplish what -label-voting does
using the -vote command?
A minor request - could get_int_args be renamed to ReadIntegerArgs - just
to be consistent with the other functions that help read from argv/argc?
Thank you!
Paul
…On Mon, Nov 28, 2022 at 4:27 AM Christian P. V. Christoffersen < ***@***.***> wrote:
Note: this is only one patch (71fbe5b
<71fbe5b>),
but it sits on top of the patches in PR #22
<#22> as this include the function
used to parse int parameters to the adapter.
------------------------------
You can view, comment on, or merge this pull request online at:
#23
Commit Summary
- a6f6fa9
<a6f6fa9>
fixup! Added -tolerance command
- 061d5c6
<061d5c6>
Added -label-voting command
- 1e4ec5d
<1e4ec5d>
removed old temporary vim file which must have been added by accident
- c3a9282
<c3a9282>
corrected typos/spelling errors in comments
- 262326e
<262326e>
added missing -otsu to utilities/bashcomp.sh
- 6130b79
<6130b79>
corrected documentation of examples for commands -centroid and
-centroid-mark the integer parameter was present in the wrong command
- 17df753
<17df753>
updated documentation section "How to Add a Command to C3D" so that it fits
the current codebase
- 71fbe5b
<71fbe5b>
extended the -otsu command with a parameter variant, this enables multiple
thresholds using the more advanced itkOtsuMultipleThresholdsImageFilter
File Changes
(10 files <https://github.com/pyushkevich/c3d/pull/23/files>)
- *M* CMakeLists.txt
<https://github.com/pyushkevich/c3d/pull/23/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a>
(1)
- *M* ConvertImageND.cxx
<https://github.com/pyushkevich/c3d/pull/23/files#diff-25fa52f8d294cf7069c8249fd6d91f6cb0c88b5b5eeca805e7e3c693c071b2d2>
(31)
- *M* ConvertNDLibrary.cmake
<https://github.com/pyushkevich/c3d/pull/23/files#diff-0f91b8944f0878494ee282b56c1cfa110bcf16b12b7093a02a515a0ab57eeec2>
(1)
- *D* adapters/.ResliceImage.cxx.swp
<https://github.com/pyushkevich/c3d/pull/23/files#diff-eb450a3921dbe89d1188763d1edff9920b9f44b413b118421a2360d1e33ca086>
(0)
- *A* adapters/LabelVoting.cxx
<https://github.com/pyushkevich/c3d/pull/23/files#diff-6cbd529113c35dbbd8af87f4b6df5a18666af24911018eafd204e82ddd1259c9>
(131)
- *A* adapters/LabelVoting.h
<https://github.com/pyushkevich/c3d/pull/23/files#diff-7a5daaa9c5ce744d6a82e88640345f9801e37f74ed660024d0653b7eb77c87ba>
(48)
- *M* adapters/OtsuThreshold.cxx
<https://github.com/pyushkevich/c3d/pull/23/files#diff-d714324b2014829070ee744511198d75e94dd1b2d55dc9ba4ef8691e69e59b7a>
(39)
- *M* adapters/OtsuThreshold.h
<https://github.com/pyushkevich/c3d/pull/23/files#diff-3f8ba79b5866002425aaada2b74aef1fbeec83ff980778fb90b8b97fba5c2b23>
(1)
- *M* doc/c3d.md
<https://github.com/pyushkevich/c3d/pull/23/files#diff-e6c5bc173a30f89cacc915eba09b3f42a9027684ee438c0655a2cb552bdf7136>
(58)
- *M* utilities/bashcomp.sh
<https://github.com/pyushkevich/c3d/pull/23/files#diff-c9d6a01197496a315c54b5b50964d0749469c09238a39b2d42175912068849f4>
(3)
Patch Links:
- https://github.com/pyushkevich/c3d/pull/23.patch
- https://github.com/pyushkevich/c3d/pull/23.diff
—
Reply to this email directly, view it on GitHub
<#23>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJPEW75TE6MPBMXC7DHOHTWKR3GTANCNFSM6AAAAAASNDMVLM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi Paul. Sure. Thanks for the your suggestions. I have redone my changes in a new branch and created the new PR #24 with the changes. All changes except the '-label-voting' patch have been cherry-pick'ed and reworked into this new PR. I have tried using the '-vote' to do the voting that I need, but could not figure out how to do this, may I have overlooked something. I would greatly appreciate any suggestions on if/how this can be accomplished. What I need is to do voting on X number of input multilabel images (containing labels and not probabilities as -vote describes), the output should also be a multilabel images containing the same labels as the input, it the vote is a tie then a predefined label should be inserted so this can be identified later on. |
I see, so you want to do majority voting between multi-label images, for
example
Image1: 1 1 3
Image2: 1 2 3
Image3: 2 1 1
Result: 1 1 3
You are right, the -vote command does not handle this. We have a separate
label fusion tool we developed as part of our joint label fusion work (it
is in ANTs also) but it would be nice to add majority voting to c3d.
Would it be possible to change the command name to "-majority-vote" (with
shortcut "-mv")?
Thanks!
Paul
…On Tue, Nov 29, 2022 at 3:40 AM Christian P. V. Christoffersen < ***@***.***> wrote:
Hi Paul. Sure. Thanks for the your suggestions. I have redone my changes
in a new branch and created the new PR #24
<#24> with the changes.
All changes except the '-label-voting' patch have been cherry-pick'ed and
reworked into this new PR.
I have tried using the '-vote' to do the voting that I need, but could not
figure out how to do this, may I have overlooked something. I would greatly
appreciate any suggestions on if/how this can be accomplished.
What I need is to do voting on X number of input multilabel images
(containing labels and not probabilities as -vote describes), the output
should also be a multilabel images containing the same labels as the input,
it the vote is a tie then a predefined label should be inserted so this can
be identified later on.
—
Reply to this email directly, view it on GitHub
<#23 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJPEW6S2XNTB7GMPU2ZP3LWKW6ODANCNFSM6AAAAAASNDMVLM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes that is precisely what I want to do. Thank you for clarifying that the -vote command cannot do this. My head was spinning around trying to find a way to convert my problem into probability maps in a straight forward way, which seems non trivial :) I have created the new PR #25 with the changes on top of the current master, including renaming the command to -mv, -majority-vote as you have suggested. |
Note: this is only one patch (71fbe5b), but it sits on top of the patches in PR #22 as this include the function used to parse int parameters to the adapter.