NonRigid Registration CT/MRI

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

NonRigid Registration CT/MRI

Lukas
Dear Slicer Users,
I need to use deformable registration for CT and MRI images. I found some WI
already how to perform it and I hope it will works but I am not sure if it
is possible to get deformation field from Slicer.

I have 1 CT and 1 MRI where I would like to get deformation field which I
will be able to visualize in Slicer DeformationFieldVisualizer.

Thank you for any ideas and tips!

Lukas




--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030035.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Dominik Meier-2
Hi Lukas

This would likley be a 3- step process: 1) run an rigid/affine registration between your two images, 2) run a non-rigid (BSpline) registration separately starting with the affine registered result from step 1;  3) use the Transforms module to look at the deformation field from step 2. This is assuming you're interested in the nonrigid portions for visualizing. You can do both registrations in one step, but then the deformation field will show both and it may be difficult to interpret.

You will find general FAQ about registration here:
http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/FAQ

and specifically on visualizing a deformation field here:
http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/FAQ#How_can_I_convert_a_BSpline_transform_into_a_deformation_field.3F
http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/FAQ#Where_can_I_check_the_reference_color_map_for_the_transform_visualizer.3F_i.e._how_can_I_know_the_magnitude_of_transform_vectors.3F

Best,
Dominik

> On 03.03.2016, at 13:45, Lukas <[hidden email]> wrote:
>
> Dear Slicer Users,
> I need to use deformable registration for CT and MRI images. I found some WI
> already how to perform it and I hope it will works but I am not sure if it
> is possible to get deformation field from Slicer.
>
> I have 1 CT and 1 MRI where I would like to get deformation field which I
> will be able to visualize in Slicer DeformationFieldVisualizer.
>
> Thank you for any ideas and tips!
>
> Lukas
>
>
>
>
> --
> View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030035.html
> Sent from the slicer-users mailing list archive at Nabble.com.
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
> http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
>

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
This post has NOT been accepted by the mailing list yet.
In reply to this post by Dominik Meier-2
Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which volume set to moving image- output volume from rigid deformation or the original volume with output transform from rigid registration? For me make sence to use output from rigid registration and the initial transform is set to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so maybe I did some mistake. As transform I used output from Bspline deformation and as reference image I tried both, deformed image and reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion are appreciated:)

Thank you!

Lukas

Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
In reply to this post by Lukas
OK, let me try to install the newer version of Slicer first.

Thank you

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.


you should then see the deformations as something like this:



Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Dominik Meier-2
In reply to this post by Lukas

Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.


you should then see the deformations as something like this:



Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.






_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Sharp, Gregory C.
In reply to this post by Lukas
Hi Lukas,

Sorry for late reply.  A couple of hints if you are still interested.

> I tried to use Bspline from Platismatch/Registration/Bspline but I got strange result.

Be sure to click "MI" since you are doing CT/MR registration.

For pre-alignment, click "enable stage 0" and choose Translation or Rigid.
Or if you do a manual translation/rigid alignment, set the
input transform -or- you can harden the transform.

If the results are still bad (which they may be), feel free
to post a screen shot.

Greg

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
In reply to this post by Lukas
Hi Greg,
thank you! Never late for good ideas. I will try this as weel. Finally I succed with Bspline for Brains but my problem was to generate deformation field in the end. I already found that deformation is too small so I have to play with set up of Bspline to be able to see deformation field.
Don´t you have experence if it is possible to visible very small deformation less than 1mm in Slicer?

Thank you
Best
Lukas


---------- Původní zpráva ----------
Od: Sharp, Gregory C. <[hidden email]>
Komu: 'Lukas' <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 8. 3. 2016 16:50:57
Předmět: RE: NonRigid Registration CT/MRI


Hi Lukas,

Sorry for late reply. A couple of hints if you are still interested.

> I tried to use Bspline from Platismatch/Registration/Bspline but I got strange result.

Be sure to click "MI" since you are doing CT/MR registration.

For pre-alignment, click "enable stage 0" and choose Translation or Rigid.
Or if you do a manual translation/rigid alignment, set the
input transform -or- you can harden the transform.

If the results are still bad (which they may be), feel free
to post a screen shot.

Greg



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
In reply to this post by Lukas
Dear Dominik,
it is possible to import matlab deformation field (.mat) to Slicer and visualize it or use it for deformation?

Thank you

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.


you should then see the deformations as something like this:



Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Sharp, Gregory C.
In reply to this post by Lukas

Hi Lukas,

 

I assume you are using “Glyph” to display?  You should look in the

“Advanced” section of the transform display.

For small displacements you will want to increase “Scale factor”.

See the attached image which demonstrates 0.5 mm uniform displacement on

an image of 5 mm voxel spacing with glyph spacing 5 mm and scale factor of 500%.

 

Greg

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Lukáš Knybel
Sent: Thursday, March 10, 2016 2:01 AM
To: Sharp, Gregory C.
Cc: SPL Slicer Users
Subject: Re: [slicer-users] NonRigid Registration CT/MRI

 

Hi Greg,
thank you! Never late for good ideas. I will try this as weel. Finally I succed with Bspline for Brains but my problem was to generate deformation field in the end. I already found that deformation is too small so I have to play with set up of Bspline to be able to see deformation field.
Don´t you have experence if it is possible to visible very small deformation less than 1mm in Slicer?

Thank you
Best
Lukas

---------- Původní zpráva ----------
Od: Sharp, Gregory C. <[hidden email]>
Komu: 'Lukas' <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 8. 3. 2016 16:50:57
Předmět: RE: NonRigid Registration CT/MRI

 

Hi Lukas,

Sorry for late reply. A couple of hints if you are still interested.

> I tried to use Bspline from Platismatch/Registration/Bspline but I got strange result.

Be sure to click "MI" since you are doing CT/MR registration.

For pre-alignment, click "enable stage 0" and choose Translation or Rigid.
Or if you do a manual translation/rigid alignment, set the
input transform -or- you can harden the transform.

If the results are still bad (which they may be), feel free
to post a screen shot.

Greg



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

screenshot.png (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Andras Lasso-2
In reply to this post by Lukas

Instead of .mat, use a standard open file format to save your displacement field into (nrrd, mha, …). There are lots of reader/writer for these formats. For example, this one should work for displacement fields: https://www.assembla.com/spaces/slicerrt/subversion/source/HEAD/trunk/MatlabBridge/src/MatlabCommander/commandserver/nrrdwrite.m

 

Usage example:

 

% Create a displacement field (4D matrix)

[x,y,z] = meshgrid([-10:10],[-12:15],[-8:6]);

img.pixelData = cat(4, x/3+y/4+z/2, x/3-y/4+z/2, x/2+y/3+z/4)

 

% Define origin, spacing, axis directions by a homogeneous transformation matrix:

img.ijkToLpsTransform = [ 1.2 0 0 10; 0 1.2 0 12; 0 0 3.0 -22; 0 0 0 1];

 

% Write compressed file

img.metaData.encoding='gzip';

nrrdwrite('testOutput.nrrd', img);

 

You just then drag-and-drop the nrrd file into Slicer and select ‘Transform’ in the Add data popup to interprest the file as a displacement field transform.

 

Note that you can call Matlab functions directly from Slicer using MatlabBridge extension (https://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/MatlabBridge).

 

Andras

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Lukáš Knybel
Sent: Thursday, March 10, 2016 3:24 AM
To: Dominik Meier <[hidden email]>
Cc: SPL Slicer Users <[hidden email]>
Subject: Re: [slicer-users] NonRigid Registration CT/MRI

 

Dear Dominik,
it is possible to import matlab deformation field (.mat) to Slicer and visualize it or use it for deformation?

Thank you

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI

 

Hi Lukas

 

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.

I would also recommend using Slicer 4.5.

The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.

In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.

Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.

cid:image001.png@01D17ABB.E1E131C0

 

 

you should then see the deformations as something like this:

 

cid:image002.png@01D17ABB.E1E131C0

 

 

Best,

Dominik

 

 

 

On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

 

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

 


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Dominik Meier-2
In reply to this post by Lukas
Hi Lukas

The grid size is the DOF: each grid node has 3 translational DOF, i.e. with a 7x7x7 grid you have a total of 7^3 = 343 points and hence 1029 DOF, not all equally effective, of course, depending on your image content. 
Details here:

With Slicer 4.5 you can nest BSpline transformations, i.e. you can iteratively/gradually increase the DOF and when you have a satisfactory result you can merge the transforms together, so as to avoid multiple resampling. 

If you're more adventurous you can also try the BRAINS Daemons method, which has much higher DOF and uses a different approach. Can be tricky to get the regularization in check, but if you have small deformations it may be worth a try.

I recommend also adjusting the sampling rate, i.e. the number of points sampled from the image to calculate the registration. Given in % of the image size. As your DOF go up, so should your sampling rate. Computing time will go up, but I would not go much below 5%.
 As for small deformations, depends on the image resolution. Difficult to accurately extract deformations in magnitude on the order of a voxel size. You can try upsample the image, which will reduce roundoff error, but won't help overall accuracy, since your image content remains the same.  If you have deformations of <1mm you'll need voxel sizes of 0.2mm or less if possible.

There's a tutorial giving the basics of the registration tools & concepts:


Best,
Dominik


On 16.03.2016, at 14:05, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik,
I found already good combination of parameters which works for me! Works with bigger deformation (like full/empty bladder) but I have 1 case with deformation less than 1mm and problem to display it.
Maybe you can help me again with set up of slicer? Bspline Grid was 7/7/7...it is possible to use lower? How can I increase DOF? I saw only 1 parameter: Bspline >27DOF...not possible to change in General Registration (BRAINS)

Thank you in advance for any tips...

Lukas


---------- Původní zpráva ----------
Od: Dominik Meier
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.
<ScreenShot 2016-03-04 at 09.57.29.png>


you should then see the deformations as something like this:

<ScreenShot 2016-03-04 at 09.57.06.png>


Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


<ScreenShot 2016-03-04 at 09.57.29.png><ScreenShot 2016-03-04 at 09.57.06.png>


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
In reply to this post by Lukas
Dear Dominik.
Thanks again for your big help in my start with registration in Slicer. I am in the end of my work and I found everything necessary.
I have last small question related to this...it is possible to visualize color bar or something like this when I am displaying Glyph showing deformation to see exactly which color is asigned to value?
I can´t find this option, only this info:

The default colormap is:

  • 1mm (or below) = gray
  • 2mm = green
  • 5mm = yellow
  • 10mm (or above) = red

Many thanks!


BEst


Lukas


---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 16. 3. 2016 14:33:07
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

The grid size is the DOF: each grid node has 3 translational DOF, i.e. with a 7x7x7 grid you have a total of 7^3 = 343 points and hence 1029 DOF, not all equally effective, of course, depending on your image content. 
Details here:

With Slicer 4.5 you can nest BSpline transformations, i.e. you can iteratively/gradually increase the DOF and when you have a satisfactory result you can merge the transforms together, so as to avoid multiple resampling. 

If you're more adventurous you can also try the BRAINS Daemons method, which has much higher DOF and uses a different approach. Can be tricky to get the regularization in check, but if you have small deformations it may be worth a try.

I recommend also adjusting the sampling rate, i.e. the number of points sampled from the image to calculate the registration. Given in % of the image size. As your DOF go up, so should your sampling rate. Computing time will go up, but I would not go much below 5%.
 As for small deformations, depends on the image resolution. Difficult to accurately extract deformations in magnitude on the order of a voxel size. You can try upsample the image, which will reduce roundoff error, but won't help overall accuracy, since your image content remains the same.  If you have deformations of <1mm you'll need voxel sizes of 0.2mm or less if possible.

There's a tutorial giving the basics of the registration tools & concepts:


Best,
Dominik


On 16.03.2016, at 14:05, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik,
I found already good combination of parameters which works for me! Works with bigger deformation (like full/empty bladder) but I have 1 case with deformation less than 1mm and problem to display it.
Maybe you can help me again with set up of slicer? Bspline Grid was 7/7/7...it is possible to use lower? How can I increase DOF? I saw only 1 parameter: Bspline >27DOF...not possible to change in General Registration (BRAINS)

Thank you in advance for any tips...

Lukas


---------- Původní zpráva ----------
Od: Dominik Meier
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.
<ScreenShot 2016-03-04 at 09.57.29.png>


you should then see the deformations as something like this:

<ScreenShot 2016-03-04 at 09.57.06.png>


Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


<ScreenShot 2016-03-04 at 09.57.29.png><ScreenShot 2016-03-04 at 09.57.06.png>


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Dominik Meier-2
In reply to this post by Lukas
Hi Lukas

Yes, you should be able to create a colorbar. If you go to the Color module, you should see a "Scalar Bar" tab. At the top menu you select "Displacement to Color" (under the Transform Display node in the colormap hierarchy). Then check the "display scalar bar" box . The colorbar appears in the 3D view. 

Best,
Dominik


On 04.04.2016, at 09:33, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik.
Thanks again for your big help in my start with registration in Slicer. I am in the end of my work and I found everything necessary.
I have last small question related to this...it is possible to visualize color bar or something like this when I am displaying Glyph showing deformation to see exactly which color is asigned to value?
I can´t find this option, only this info:

The default colormap is:

  • 1mm (or below) = gray
  • 2mm = green
  • 5mm = yellow
  • 10mm (or above) = red

Many thanks!


BEst


Lukas


---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 16. 3. 2016 14:33:07
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

The grid size is the DOF: each grid node has 3 translational DOF, i.e. with a 7x7x7 grid you have a total of 7^3 = 343 points and hence 1029 DOF, not all equally effective, of course, depending on your image content. 
Details here:

With Slicer 4.5 you can nest BSpline transformations, i.e. you can iteratively/gradually increase the DOF and when you have a satisfactory result you can merge the transforms together, so as to avoid multiple resampling. 

If you're more adventurous you can also try the BRAINS Daemons method, which has much higher DOF and uses a different approach. Can be tricky to get the regularization in check, but if you have small deformations it may be worth a try.

I recommend also adjusting the sampling rate, i.e. the number of points sampled from the image to calculate the registration. Given in % of the image size. As your DOF go up, so should your sampling rate. Computing time will go up, but I would not go much below 5%.
 As for small deformations, depends on the image resolution. Difficult to accurately extract deformations in magnitude on the order of a voxel size. You can try upsample the image, which will reduce roundoff error, but won't help overall accuracy, since your image content remains the same.  If you have deformations of <1mm you'll need voxel sizes of 0.2mm or less if possible.

There's a tutorial giving the basics of the registration tools & concepts:


Best,
Dominik


On 16.03.2016, at 14:05, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik,
I found already good combination of parameters which works for me! Works with bigger deformation (like full/empty bladder) but I have 1 case with deformation less than 1mm and problem to display it.
Maybe you can help me again with set up of slicer? Bspline Grid was 7/7/7...it is possible to use lower? How can I increase DOF? I saw only 1 parameter: Bspline >27DOF...not possible to change in General Registration (BRAINS)

Thank you in advance for any tips...

Lukas


---------- Původní zpráva ----------
Od: Dominik Meier
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.
<ScreenShot 2016-03-04 at 09.57.29.png>


you should then see the deformations as something like this:

<ScreenShot 2016-03-04 at 09.57.06.png>


Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


<ScreenShot 2016-03-04 at 09.57.29.png><ScreenShot 2016-03-04 at 09.57.06.png>



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
In reply to this post by Lukas
Simply clever...my fault not to check Color Module. So let me apologize and thank you very much! It works perfectly:)

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 4. 4. 2016 11:14:03
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Yes, you should be able to create a colorbar. If you go to the Color module, you should see a "Scalar Bar" tab. At the top menu you select "Displacement to Color" (under the Transform Display node in the colormap hierarchy). Then check the "display scalar bar" box . The colorbar appears in the 3D view. 

Best,
Dominik


On 04.04.2016, at 09:33, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik.
Thanks again for your big help in my start with registration in Slicer. I am in the end of my work and I found everything necessary.
I have last small question related to this...it is possible to visualize color bar or something like this when I am displaying Glyph showing deformation to see exactly which color is asigned to value?
I can´t find this option, only this info:

The default colormap is:

  • 1mm (or below) = gray
  • 2mm = green
  • 5mm = yellow
  • 10mm (or above) = red

Many thanks!


BEst


Lukas


---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 16. 3. 2016 14:33:07
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

The grid size is the DOF: each grid node has 3 translational DOF, i.e. with a 7x7x7 grid you have a total of 7^3 = 343 points and hence 1029 DOF, not all equally effective, of course, depending on your image content. 
Details here:

With Slicer 4.5 you can nest BSpline transformations, i.e. you can iteratively/gradually increase the DOF and when you have a satisfactory result you can merge the transforms together, so as to avoid multiple resampling. 

If you're more adventurous you can also try the BRAINS Daemons method, which has much higher DOF and uses a different approach. Can be tricky to get the regularization in check, but if you have small deformations it may be worth a try.

I recommend also adjusting the sampling rate, i.e. the number of points sampled from the image to calculate the registration. Given in % of the image size. As your DOF go up, so should your sampling rate. Computing time will go up, but I would not go much below 5%.
 As for small deformations, depends on the image resolution. Difficult to accurately extract deformations in magnitude on the order of a voxel size. You can try upsample the image, which will reduce roundoff error, but won't help overall accuracy, since your image content remains the same.  If you have deformations of <1mm you'll need voxel sizes of 0.2mm or less if possible.

There's a tutorial giving the basics of the registration tools & concepts:


Best,
Dominik


On 16.03.2016, at 14:05, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik,
I found already good combination of parameters which works for me! Works with bigger deformation (like full/empty bladder) but I have 1 case with deformation less than 1mm and problem to display it.
Maybe you can help me again with set up of slicer? Bspline Grid was 7/7/7...it is possible to use lower? How can I increase DOF? I saw only 1 parameter: Bspline >27DOF...not possible to change in General Registration (BRAINS)

Thank you in advance for any tips...

Lukas


---------- Původní zpráva ----------
Od: Dominik Meier
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.
<ScreenShot 2016-03-04 at 09.57.29.png>


you should then see the deformations as something like this:

<ScreenShot 2016-03-04 at 09.57.06.png>


Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


<ScreenShot 2016-03-04 at 09.57.29.png><ScreenShot 2016-03-04 at 09.57.06.png>



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
In reply to this post by Dominik Meier-2
Let me ask you one more time....I have deformation field displaying properly in image or 3D view. I would like to try to calculate the average magnitude of deformation in specific area...it is possible in slicer? I tried it in Matlab but I believe it should work in Slicer too. So I need to specify some ROI and get just "number" as average from deformation in this area....
It is easy to vector value in information section but only for point...

Thank you

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 4. 4. 2016 11:14:26
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Yes, you should be able to create a colorbar. If you go to the Color module, you should see a "Scalar Bar" tab. At the top menu you select "Displacement to Color" (under the Transform Display node in the colormap hierarchy). Then check the "display scalar bar" box . The colorbar appears in the 3D view. 

Best,
Dominik


On 04.04.2016, at 09:33, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik.
Thanks again for your big help in my start with registration in Slicer. I am in the end of my work and I found everything necessary.
I have last small question related to this...it is possible to visualize color bar or something like this when I am displaying Glyph showing deformation to see exactly which color is asigned to value?
I can´t find this option, only this info:

The default colormap is:

  • 1mm (or below) = gray
  • 2mm = green
  • 5mm = yellow
  • 10mm (or above) = red

Many thanks!


BEst


Lukas


---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 16. 3. 2016 14:33:07
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

The grid size is the DOF: each grid node has 3 translational DOF, i.e. with a 7x7x7 grid you have a total of 7^3 = 343 points and hence 1029 DOF, not all equally effective, of course, depending on your image content. 
Details here:

With Slicer 4.5 you can nest BSpline transformations, i.e. you can iteratively/gradually increase the DOF and when you have a satisfactory result you can merge the transforms together, so as to avoid multiple resampling. 

If you're more adventurous you can also try the BRAINS Daemons method, which has much higher DOF and uses a different approach. Can be tricky to get the regularization in check, but if you have small deformations it may be worth a try.

I recommend also adjusting the sampling rate, i.e. the number of points sampled from the image to calculate the registration. Given in % of the image size. As your DOF go up, so should your sampling rate. Computing time will go up, but I would not go much below 5%.
 As for small deformations, depends on the image resolution. Difficult to accurately extract deformations in magnitude on the order of a voxel size. You can try upsample the image, which will reduce roundoff error, but won't help overall accuracy, since your image content remains the same.  If you have deformations of <1mm you'll need voxel sizes of 0.2mm or less if possible.

There's a tutorial giving the basics of the registration tools & concepts:


Best,
Dominik


On 16.03.2016, at 14:05, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik,
I found already good combination of parameters which works for me! Works with bigger deformation (like full/empty bladder) but I have 1 case with deformation less than 1mm and problem to display it.
Maybe you can help me again with set up of slicer? Bspline Grid was 7/7/7...it is possible to use lower? How can I increase DOF? I saw only 1 parameter: Bspline >27DOF...not possible to change in General Registration (BRAINS)

Thank you in advance for any tips...

Lukas


---------- Původní zpráva ----------
Od: Dominik Meier
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.
<ScreenShot 2016-03-04 at 09.57.29.png>


you should then see the deformations as something like this:

<ScreenShot 2016-03-04 at 09.57.06.png>


Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


<ScreenShot 2016-03-04 at 09.57.29.png><ScreenShot 2016-03-04 at 09.57.06.png>


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Dominik Meier-2
In reply to this post by Dominik Meier-2
Hi Lukas

I'm not aware of a 1-step solution. You could try to calculate the magnitude first for the entire image (i.e. create a scalar displacement magnitude image from the deformation field) and then use the "Labelmap Statistics" module to extract the summary over an ROI. But be aware that such a summary is not necessarily representative of what is going on in that region. Depending on the question,  you're moving into the field of TBM, and something like a Jacobian might be more telling.
-- Dominik


On 04.04.2016, at 12:26, Lukáš Knybel <[hidden email]> wrote:

Let me ask you one more time....I have deformation field displaying properly in image or 3D view. I would like to try to calculate the average magnitude of deformation in specific area...it is possible in slicer? I tried it in Matlab but I believe it should work in Slicer too. So I need to specify some ROI and get just "number" as average from deformation in this area....
It is easy to vector value in information section but only for point...

Thank you

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 4. 4. 2016 11:14:26
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Yes, you should be able to create a colorbar. If you go to the Color module, you should see a "Scalar Bar" tab. At the top menu you select "Displacement to Color" (under the Transform Display node in the colormap hierarchy). Then check the "display scalar bar" box . The colorbar appears in the 3D view. 

Best,
Dominik

<Screen Shot 2016-04-04 at 09.48.46.png>
On 04.04.2016, at 09:33, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik.
Thanks again for your big help in my start with registration in Slicer. I am in the end of my work and I found everything necessary.
I have last small question related to this...it is possible to visualize color bar or something like this when I am displaying Glyph showing deformation to see exactly which color is asigned to value?
I can´t find this option, only this info:

The default colormap is:

  • 1mm (or below) = gray
  • 2mm = green
  • 5mm = yellow
  • 10mm (or above) = red

Many thanks!


BEst


Lukas


---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 16. 3. 2016 14:33:07
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

The grid size is the DOF: each grid node has 3 translational DOF, i.e. with a 7x7x7 grid you have a total of 7^3 = 343 points and hence 1029 DOF, not all equally effective, of course, depending on your image content. 
Details here:

With Slicer 4.5 you can nest BSpline transformations, i.e. you can iteratively/gradually increase the DOF and when you have a satisfactory result you can merge the transforms together, so as to avoid multiple resampling. 

If you're more adventurous you can also try the BRAINS Daemons method, which has much higher DOF and uses a different approach. Can be tricky to get the regularization in check, but if you have small deformations it may be worth a try.

I recommend also adjusting the sampling rate, i.e. the number of points sampled from the image to calculate the registration. Given in % of the image size. As your DOF go up, so should your sampling rate. Computing time will go up, but I would not go much below 5%.
 As for small deformations, depends on the image resolution. Difficult to accurately extract deformations in magnitude on the order of a voxel size. You can try upsample the image, which will reduce roundoff error, but won't help overall accuracy, since your image content remains the same.  If you have deformations of <1mm you'll need voxel sizes of 0.2mm or less if possible.

There's a tutorial giving the basics of the registration tools & concepts:


Best,
Dominik


On 16.03.2016, at 14:05, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik,
I found already good combination of parameters which works for me! Works with bigger deformation (like full/empty bladder) but I have 1 case with deformation less than 1mm and problem to display it.
Maybe you can help me again with set up of slicer? Bspline Grid was 7/7/7...it is possible to use lower? How can I increase DOF? I saw only 1 parameter: Bspline >27DOF...not possible to change in General Registration (BRAINS)

Thank you in advance for any tips...

Lukas


---------- Původní zpráva ----------
Od: Dominik Meier
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.
<ScreenShot 2016-03-04 at 09.57.29.png>


you should then see the deformations as something like this:

<ScreenShot 2016-03-04 at 09.57.06.png>


Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


<ScreenShot 2016-03-04 at 09.57.29.png><ScreenShot 2016-03-04 at 09.57.06.png>


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
<Screen Shot 2016-04-04 at 09.48.46.png>


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Andras Lasso-2

See instructions about how to retrieve a magnitude image here:

https://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/Transforms

(search for “How to export the displacement magnitude of the transform as a volume?”). I’ve added a “Convert” section to the Transforms module to make this conversion possible without typing anything to the Python console – it’ll be available in tomorrow’s nightly release.

 

If you have sufficiently small structures in the labelmap (so the displacement field variation within one label is approximately uniform) then min/max/mean values computed by Label statistics module may be meaningful.

 

Andras

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Dominik Meier
Sent: April 4, 2016 11:31 AM
To: Lukáš Knybel <[hidden email]>
Cc: SPL Slicer Users <[hidden email]>
Subject: Re: [slicer-users] NonRigid Registration CT/MRI

 

Hi Lukas

 

I'm not aware of a 1-step solution. You could try to calculate the magnitude first for the entire image (i.e. create a scalar displacement magnitude image from the deformation field) and then use the "Labelmap Statistics" module to extract the summary over an ROI. But be aware that such a summary is not necessarily representative of what is going on in that region. Depending on the question,  you're moving into the field of TBM, and something like a Jacobian might be more telling.

-- Dominik

 

 

On 04.04.2016, at 12:26, Lukáš Knybel <[hidden email]> wrote:

 

Let me ask you one more time....I have deformation field displaying properly in image or 3D view. I would like to try to calculate the average magnitude of deformation in specific area...it is possible in slicer? I tried it in Matlab but I believe it should work in Slicer too. So I need to specify some ROI and get just "number" as average from deformation in this area....
It is easy to vector value in information section but only for point...

Thank you

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 4. 4. 2016 11:14:26
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI

 

Hi Lukas

 

Yes, you should be able to create a colorbar. If you go to the Color module, you should see a "Scalar Bar" tab. At the top menu you select "Displacement to Color" (under the Transform Display node in the colormap hierarchy). Then check the "display scalar bar" box . The colorbar appears in the 3D view. 

 

Best,

Dominik

 

<Screen Shot 2016-04-04 at 09.48.46.png>

On 04.04.2016, at 09:33, Lukáš Knybel <[hidden email]> wrote:

 

Dear Dominik.
Thanks again for your big help in my start with registration in Slicer. I am in the end of my work and I found everything necessary.
I have last small question related to this...it is possible to visualize color bar or something like this when I am displaying Glyph showing deformation to see exactly which color is asigned to value?
I can´t find this option, only this info:

The default colormap is:

  • 1mm (or below) = gray
  • 2mm = green
  • 5mm = yellow
  • 10mm (or above) = red

Many thanks!

 

BEst

 

Lukas

 

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 16. 3. 2016 14:33:07
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI

 

Hi Lukas

 

The grid size is the DOF: each grid node has 3 translational DOF, i.e. with a 7x7x7 grid you have a total of 7^3 = 343 points and hence 1029 DOF, not all equally effective, of course, depending on your image content. 

Details here:

 

With Slicer 4.5 you can nest BSpline transformations, i.e. you can iteratively/gradually increase the DOF and when you have a satisfactory result you can merge the transforms together, so as to avoid multiple resampling. 

 

If you're more adventurous you can also try the BRAINS Daemons method, which has much higher DOF and uses a different approach. Can be tricky to get the regularization in check, but if you have small deformations it may be worth a try.

 

I recommend also adjusting the sampling rate, i.e. the number of points sampled from the image to calculate the registration. Given in % of the image size. As your DOF go up, so should your sampling rate. Computing time will go up, but I would not go much below 5%.

 As for small deformations, depends on the image resolution. Difficult to accurately extract deformations in magnitude on the order of a voxel size. You can try upsample the image, which will reduce roundoff error, but won't help overall accuracy, since your image content remains the same.  If you have deformations of <1mm you'll need voxel sizes of 0.2mm or less if possible.

 

There's a tutorial giving the basics of the registration tools & concepts:

 

 

Best,

Dominik

 

On 16.03.2016, at 14:05, Lukáš Knybel <[hidden email]> wrote:

 

Dear Dominik,
I found already good combination of parameters which works for me! Works with bigger deformation (like full/empty bladder) but I have 1 case with deformation less than 1mm and problem to display it.
Maybe you can help me again with set up of slicer? Bspline Grid was 7/7/7...it is possible to use lower? How can I increase DOF? I saw only 1 parameter: Bspline >27DOF...not possible to change in General Registration (BRAINS)

Thank you in advance for any tips...

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI

 

Hi Lukas

 

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.

I would also recommend using Slicer 4.5.

The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.

In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.

Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.

<ScreenShot 2016-03-04 at 09.57.29.png>

 

 

you should then see the deformations as something like this:

 

<ScreenShot 2016-03-04 at 09.57.06.png>

 

 

Best,

Dominik

 

 

 

On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

 

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

 

<ScreenShot 2016-03-04 at 09.57.29.png><ScreenShot 2016-03-04 at 09.57.06.png>

 

 

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

<Screen Shot 2016-04-04 at 09.48.46.png>

 


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
Reply | Threaded
Open this post in threaded view
|

Re: NonRigid Registration CT/MRI

Lukas
In reply to this post by Dominik Meier-2
Dear Dominik ,
thank you for your answer and help again! I will try it.
Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 4. 4. 2016 17:30:38
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

I'm not aware of a 1-step solution. You could try to calculate the magnitude first for the entire image (i.e. create a scalar displacement magnitude image from the deformation field) and then use the "Labelmap Statistics" module to extract the summary over an ROI. But be aware that such a summary is not necessarily representative of what is going on in that region. Depending on the question,  you're moving into the field of TBM, and something like a Jacobian might be more telling.
-- Dominik


On 04.04.2016, at 12:26, Lukáš Knybel <[hidden email]> wrote:

Let me ask you one more time....I have deformation field displaying properly in image or 3D view. I would like to try to calculate the average magnitude of deformation in specific area...it is possible in slicer? I tried it in Matlab but I believe it should work in Slicer too. So I need to specify some ROI and get just "number" as average from deformation in this area....
It is easy to vector value in information section but only for point...

Thank you

Lukas

---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 4. 4. 2016 11:14:26
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Yes, you should be able to create a colorbar. If you go to the Color module, you should see a "Scalar Bar" tab. At the top menu you select "Displacement to Color" (under the Transform Display node in the colormap hierarchy). Then check the "display scalar bar" box . The colorbar appears in the 3D view. 

Best,
Dominik

<Screen Shot 2016-04-04 at 09.48.46.png>
On 04.04.2016, at 09:33, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik.
Thanks again for your big help in my start with registration in Slicer. I am in the end of my work and I found everything necessary.
I have last small question related to this...it is possible to visualize color bar or something like this when I am displaying Glyph showing deformation to see exactly which color is asigned to value?
I can´t find this option, only this info:

The default colormap is:

  • 1mm (or below) = gray
  • 2mm = green
  • 5mm = yellow
  • 10mm (or above) = red

Many thanks!


BEst


Lukas


---------- Původní zpráva ----------
Od: Dominik Meier <[hidden email]>
Komu: Lukáš Knybel <[hidden email]>
Datum: 16. 3. 2016 14:33:07
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

The grid size is the DOF: each grid node has 3 translational DOF, i.e. with a 7x7x7 grid you have a total of 7^3 = 343 points and hence 1029 DOF, not all equally effective, of course, depending on your image content. 
Details here:

With Slicer 4.5 you can nest BSpline transformations, i.e. you can iteratively/gradually increase the DOF and when you have a satisfactory result you can merge the transforms together, so as to avoid multiple resampling. 

If you're more adventurous you can also try the BRAINS Daemons method, which has much higher DOF and uses a different approach. Can be tricky to get the regularization in check, but if you have small deformations it may be worth a try.

I recommend also adjusting the sampling rate, i.e. the number of points sampled from the image to calculate the registration. Given in % of the image size. As your DOF go up, so should your sampling rate. Computing time will go up, but I would not go much below 5%.
 As for small deformations, depends on the image resolution. Difficult to accurately extract deformations in magnitude on the order of a voxel size. You can try upsample the image, which will reduce roundoff error, but won't help overall accuracy, since your image content remains the same.  If you have deformations of <1mm you'll need voxel sizes of 0.2mm or less if possible.

There's a tutorial giving the basics of the registration tools & concepts:


Best,
Dominik


On 16.03.2016, at 14:05, Lukáš Knybel <[hidden email]> wrote:

Dear Dominik,
I found already good combination of parameters which works for me! Works with bigger deformation (like full/empty bladder) but I have 1 case with deformation less than 1mm and problem to display it.
Maybe you can help me again with set up of slicer? Bspline Grid was 7/7/7...it is possible to use lower? How can I increase DOF? I saw only 1 parameter: Bspline >27DOF...not possible to change in General Registration (BRAINS)

Thank you in advance for any tips...

Lukas


---------- Původní zpráva ----------
Od: Dominik Meier
Komu: Lukas <[hidden email]>, SPL Slicer Users <[hidden email]>
Datum: 4. 3. 2016 10:07:27
Předmět: Re: [slicer-users] NonRigid Registration CT/MRI


Hi Lukas

Your approach is correct in general. I would recommend the “General Registration (BRAINS)” module to do both the rigid/affine and the BSpline registrations.
I would also recommend using Slicer 4.5.
The choice of moving and fixed volume depends on your question. Unless other reasons supersede, it is recommendable to use the image with the higher resolution and/or less geometric distortion as the fixed image.
In general one would do exactly as you did, i.e. use the result of the rigid transform as the input to the BSpline. In case of visualising deformation fields, however, this is not necessarily best, because you will still end up with the rigid portion as part of the final nonrigid transform, and often you don’t want that part visualised, since it reflects only differences in orientation. So in this case its advisable to first apply the rigid transform and resample your moving volume and then run the BSpline on this resampled image. 

I would also start with lower grid sizes like 7,7,7 until you get a feeling for the data, and then try to increase the DOF. How far up you can go depends on the resolution and similarity of your data.
Once you have a BSpline transform, go to the “Transforms” module and in the Display tab, check the “Visible in Slice view” box.
<ScreenShot 2016-03-04 at 09.57.29.png>


you should then see the deformations as something like this:

<ScreenShot 2016-03-04 at 09.57.06.png>


Best,
Dominik



On 04 Mar 2016, at 09:10, Lukas <[hidden email]> wrote:

Thank you Dominik!
Seems to be quite easy but I didn´t succed yet.

1)Rigid deformation is OK
I got Output transform and Volume

2)Deformable Bspline was OK (Menu/Legacy/Bspline), I was not sure which
volume set to moving image- output volume from rigid deformation or the
original volume with output transform from rigid registration? For me make
sence to use output from rigid registration and the initial transform is set
to None or original moving image and output rigid transform


I tried to use Bspline from Platismatch/Registration/Bspline but I got
strange result.

3) I tried to use Bspline to deformation field module- didn´t worked
I tried to use Transforms module as you adviced, bit there is only posible
to use Rigid Transform as active transform...or maybe I didn´t catch it?
I tried Transformation visualizer where I got the grid but not deformed so
maybe I did some mistake. As transform I used output from Bspline
deformation and as reference image I tried both, deformed image and
reference image.

I have Slicer 4.3.1.

I will try it again to find some way how visualize field...any suggestion
are appreciated:)

Thank you!

Lukas





--
View this message in context: http://slicer-users.65878.n3.nabble.com/NonRigid-Registration-CT-MRI-tp4030036p4030041.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


<ScreenShot 2016-03-04 at 09.57.29.png><ScreenShot 2016-03-04 at 09.57.06.png>


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
<Screen Shot 2016-04-04 at 09.48.46.png>


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.