Command line execution of ITK-SNAP registration?

671 views
Skip to first unread message

j.cos...@jatneurolab.com

unread,
Aug 20, 2018, 8:38:09 PM8/20/18
to itksnap-users
Does anyone know if there is a command-line way to execute the ITK-SNAP registration (e.g., c3d)? For a certain dataset, repeatedly, the registrations I obtain from ITK-SNAP are better than the FSL recipe I created.

Either way, nice job on the registration routine developer!

- Jamie

Paul Yushkevich

unread,
Aug 21, 2018, 9:46:46 AM8/21/18
to itksna...@googlegroups.com
Thanks!

Yes, the registration is available in standalone form, also includes deformable registration:


Paul

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.
To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.


--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

Jamie Costabile

unread,
Aug 21, 2018, 2:16:11 PM8/21/18
to itksna...@googlegroups.com
I installed 'greedy' received roughly 10 warnings and no errors. But when I run the command:

greedy -d 3 -i ../../T1ns.nii b0ns.nii -o tmp.nii -a -m MI -threads 8


The tmp.nii file fails to open. Any ideas?

On Tue, Aug 21, 2018 at 7:46 AM, Paul Yushkevich <pyush...@gmail.com> wrote:
Thanks!

Yes, the registration is available in standalone form, also includes deformable registration:


Paul
On Mon, Aug 20, 2018 at 8:38 PM <j.cos...@jatneurolab.com> wrote:
Does anyone know if there is a command-line way to execute the ITK-SNAP registration (e.g., c3d)? For a certain dataset, repeatedly, the registrations I obtain from ITK-SNAP are better than the FSL recipe I created.

Either way, nice job on the registration routine developer!

- Jamie

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.
--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.

Paul Yushkevich

unread,
Aug 21, 2018, 2:19:37 PM8/21/18
to itksna...@googlegroups.com
Jamie,

With -a you are selecting affine registration. The output should be a matrix file (.mat). You will need to run a second command to apply that matrix to the input image to reslice it into the fixed image space. 

Please see 'my first registration' here: https://sites.google.com/view/greedyreg/quick-start?authuser=0

Paul

On Tue, Aug 21, 2018 at 2:16 PM Jamie Costabile <j.cos...@jatneurolab.com> wrote:
I installed 'greedy' received roughly 10 warnings and no errors. But when I run the command:

greedy -d 3 -i ../../T1ns.nii b0ns.nii -o tmp.nii -a -m MI -threads 8


The tmp.nii file fails to open. Any ideas?
On Tue, Aug 21, 2018 at 7:46 AM, Paul Yushkevich <pyush...@gmail.com> wrote:
Thanks!

Yes, the registration is available in standalone form, also includes deformable registration:


Paul
On Mon, Aug 20, 2018 at 8:38 PM <j.cos...@jatneurolab.com> wrote:
Does anyone know if there is a command-line way to execute the ITK-SNAP registration (e.g., c3d)? For a certain dataset, repeatedly, the registrations I obtain from ITK-SNAP are better than the FSL recipe I created.

Either way, nice job on the registration routine developer!

- Jamie

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.
--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.

Jamie Costabile

unread,
Aug 21, 2018, 2:50:16 PM8/21/18
to itksna...@googlegroups.com
Ahh, thank you! I'll work through the example.

On Tue, Aug 21, 2018 at 12:18 PM, Paul Yushkevich <pyush...@gmail.com> wrote:
Jamie,

With -a you are selecting affine registration. The output should be a matrix file (.mat). You will need to run a second command to apply that matrix to the input image to reslice it into the fixed image space. 

Please see 'my first registration' here: https://sites.google.com/view/greedyreg/quick-start?authuser=0

Paul
On Tue, Aug 21, 2018 at 2:16 PM Jamie Costabile <j.cos...@jatneurolab.com> wrote:
I installed 'greedy' received roughly 10 warnings and no errors. But when I run the command:

greedy -d 3 -i ../../T1ns.nii b0ns.nii -o tmp.nii -a -m MI -threads 8


The tmp.nii file fails to open. Any ideas?
On Tue, Aug 21, 2018 at 7:46 AM, Paul Yushkevich <pyush...@gmail.com> wrote:
Thanks!

Yes, the registration is available in standalone form, also includes deformable registration:


Paul
On Mon, Aug 20, 2018 at 8:38 PM <j.cos...@jatneurolab.com> wrote:
Does anyone know if there is a command-line way to execute the ITK-SNAP registration (e.g., c3d)? For a certain dataset, repeatedly, the registrations I obtain from ITK-SNAP are better than the FSL recipe I created.

Either way, nice job on the registration routine developer!

- Jamie

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.
--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.


--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.

Jamie Costabile

unread,
Sep 5, 2018, 2:28:36 PM9/5/18
to itksna...@googlegroups.com
Thank you, Paul, great work!

Two questions for you about 'greedy': (1) Is it possible to execute rigid body registrations with this? (2) Do you have an opinion on executing deformable registrations on diffusion tensor images?

- Jamie

Jamie Costabile

unread,
Sep 5, 2018, 2:32:12 PM9/5/18
to itksna...@googlegroups.com
I found the first answer top the first question, which is yes. How do I execute the rigid body registration?

Jamie Costabile

unread,
Sep 5, 2018, 2:58:12 PM9/5/18
to itksna...@googlegroups.com
Excuse me, I found the answer to (1) in the Documentation on the website. However, I perused the -help list beforehand without seeing the '-dof' input option.

Karan Jeswani

unread,
Feb 9, 2021, 12:29:07 AM2/9/21
to itksnap-users
I really want to use the command line version for registration as I want to do the same for 100s of image-pairs.
I am having problems installing greedy.

I am following https://sites.google.com/view/greedyreg/installation, its asking me the directory in which I compiled itk! This I don't have.

Will I have to build itksnap from source?
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.
--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.

To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.


--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.

Paul Yushkevich

unread,
Feb 9, 2021, 10:18:11 AM2/9/21
to itksna...@googlegroups.com
You can just install itksnap and run Help->Install Command-Line Tools to get greedy installed.

Paul



--
Paul A. Yushkevich, Ph.D.
Professor of Radiology

Penn Image Computing and Science Laboratory
University of Pennsylvania Perelman School of Medicine

Michael Martin

unread,
Apr 1, 2021, 3:36:03 PM4/1/21
to itksnap-users
As per your message here as well as at https://sites.google.com/view/greedyreg/installation, I've installed ITK-SNAP 3.8, launched it, but my help tab just has "About ITK-SNAP", "Check for Software Updates ... ", and "Documentation Home ...". Am I in the wrong help tab? Would very much appreciate any help as I am trying to install greedy and haven't been able to successfully compile from the source code. 

Michael

Paul Yushkevich

unread,
Apr 2, 2021, 3:07:08 PM4/2/21
to itksna...@googlegroups.com
Hi Michael,

I recently made greedy binaries available directly on SourceForge:


Thanks,
Paul

Michael Martin

unread,
Apr 7, 2021, 12:22:10 PM4/7/21
to itksnap-users
Marvelous, thank you very much!
Reply all
Reply to author
Forward
0 new messages