Masked registration

243 views
Skip to first unread message

Vinc

unread,
May 8, 2012, 11:00:47 AM5/8/12
to Plastimatch
Hi all,

I'm trying to register moving organs using bsplines in plastimatch.
Because of discontinuities between the fixed ribs and the parts, I
need to the moving image so that only the selected region region is
used for computing an error measure. Is this possible using
plastimatch? I've seen the mask command for generating masked images
but don't know how to use masking in the registration.

Thanks, Vinc

Sharp, Gregory C.

unread,
May 9, 2012, 10:08:47 AM5/9/12
to plast...@googlegroups.com

Hi Vinc,

Here is what I do:

(1) Create the mask images

You need a separate mask for fixed and moving images.
If you already have DICOM-RT structures, you can convert
them into individual images like this:

plastimatch convert --input dicom-directory --output-prefix output-directory

(2) "Apply" the masks to the input images

This fills the voxels which are not in the mask with a constant value.
Use the same constant value for both images. I use -1200.

plastimatch mask --input fixed.mha --mask fixed-lungs.mha --mask-value -1200
--output-image fixed-masked.mha

(3) Run registration on the masked images just like you would
normally do.

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.

Vinc

unread,
May 10, 2012, 8:24:18 AM5/10/12
to Plastimatch
Hi Greg,

thanks a lot for your answer.

The problem is that I'm trying to register a template to hundreds of
images at different respiratory states, which makes the creation of a
mask for each target unfeasible.
I'm therefore thinking towards computing the similarity score between
the moving and fixed image only within the warped mask region. Is this
somehow possible or do I have to adapt the code to achieve this?

Thanks a lot!
Vinc
> contains patient information, please contact the Partners Compliance HelpLine athttp://www.partners.org/complianceline. If the e-mail was sent to you in error

Sharp, Gregory C.

unread,
May 10, 2012, 4:37:46 PM5/10/12
to plast...@googlegroups.com

Hi Vinc,

I *think* it's available today for B-spline with MI.
But still not yet implemented for MSE. You could specify
something like this:

[GLOBAL]
fixed=fixed.mha
moving=moving.mha
fixed_mask=fixed_mask.mha

[STAGE]
xform=bspline
metric=mi
flavor=h

The "flavor=h" tells plastimatch to use an experimental
scoring method. Once the masking fully supported and documented,
you should remove this line.

Jim Chang

unread,
Feb 20, 2014, 7:18:49 PM2/20/14
to plast...@googlegroups.com, gcs...@partners.org
Hi Greg,
 
I am testing the mask functionality on fixed image as well using the receipt you provided below.
However, registration results are the same with and without using the masked image except the
former is much faster than the previous. I was using 3-stage registration. My plastimatch version
is 1.5.14-beta (updated on 8/27/2013). Is the mask functionality with the option flavor still valid in
that version?
 
Jim

Sharp, Gregory C.

unread,
Feb 21, 2014, 2:26:13 PM2/21/14
to Jim Chang, plast...@googlegroups.com
Hi Jim,
 
I can't comment on such an old version, but I confirm that ROI masking is fully supported
for both MI and MSE in the current version.    It is no longer necessary to set the "flavor".
 
Unfortunately, it seems that the syntax is not documented in the web page.
Basically, you can specify fixed mask, moving mask, or both.  The name of the
option changed to "fixed_roi" and "moving_roi", but the old terminology should still work.
 
Of course using a mask is no guarantee of improvement.  Sometimes even makes things worse.
If you post a screenshot I can give some advice.
 
Greg


From: Jim Chang [mailto:jim.c...@gmail.com]
Sent: Thursday, February 20, 2014 7:19 PM
To: plast...@googlegroups.com
Cc: Sharp, Gregory C.
Subject: Re: [Plastimatch] Re: Masked registration

Reply all
Reply to author
Forward
0 new messages