plastimatch warp

80 views
Skip to first unread message

Richard

unread,
Nov 23, 2011, 11:57:30 AM11/23/11
to Plastimatch
Hi Greg,

I'm having some difficulty with the 'plastimatch warp' command. I
successfully performed 'plastimatch register' and produced a bspline
coefficient output file. I then tried to use the coefficients to
perform the same warp on another image of dimensions equivalent to the
original registered files, following as closely as possible the 'warp'
command line instructions on the web page. The result is an image
that is 0.1x0.1x0.15 of the proper dimensions (i.e. a tiny little
image) on the correct sized canvas with everything else zero-filled.
I can't figure out what I'm missing.

Thanks in advance for the help,
Rick.

James Shackleford

unread,
Nov 23, 2011, 12:23:43 PM11/23/11
to plast...@googlegroups.com
Hi Rick,

Do you happen to be using sub-sampling via the "res=" argument in the last stage of your registration command file?  If so, the resulting coefficient file will be set to the sub-sampled volume resolution.  As a result, warping a volume with these coefficients via plastimatch warp will result in a sub-sampled volume.

If this is the issue, a solution may be to save the vector field directly instead of its coefficient parameterization. In the [GLOBAL] section of your command file you can specify to output the final vector field via "vf_out=my_vector_field.mha".  You can then supply this vector field to plastimatch warp as follows:

plastimatch warp --input vol_to_warp.mha --output-img warped_vol.mha --xf my_vector_field.mha

--James

Richard

unread,
Nov 23, 2011, 1:05:36 PM11/23/11
to Plastimatch
James,

Thanks for your suggestions. In my command file I have "res=1 1 1",
so I assumed that sampling wouldn't be a problem. Should I remove
that? And yes, I already tried the warp with the vector field
(the .mha file as you suggested) with the same result.

Rick

On Nov 23, 9:23 am, James Shackleford <james.a.shacklef...@gmail.com>
wrote:
> Hi Rick,
>
> Do you happen to be using sub-sampling via the "*res=*" argument in the


> last stage of your registration command file?  If so, the resulting
> coefficient file will be set to the sub-sampled volume resolution.  As a

> result, warping a volume with these coefficients via *plastimatch warp*will result in a sub-sampled volume.


>
> If this is the issue, a solution may be to save the vector field directly

> instead of its coefficient parameterization. In the *[GLOBAL]* section of
> your command file you can specify to output the final vector field via "*
> vf_out=my_vector_field.mha*".  You can then supply this vector field to
> plastimatch warp as follows:
>
> *plastimatch warp --input vol_to_warp.mha --output-img warped_vol.mha --xf
> my_vector_field.mha*
>
> --James

Gregory Sharp

unread,
Nov 23, 2011, 1:21:27 PM11/23/11
to plast...@googlegroups.com

Hi Rick,

You are correct, "res=1 1 1" should give full resolution result.

Do you know if your image got the wrong size/dimension, or somehow the
vectors shrinking the image to a tiny spot?

Could you run "plastimatch header" on (a) fixed, (b) moving,
(c) warp input, (d) warp output image files, and post the results?

Also, can you tell me, did the image that was produced by
registration itself (using img_out=xxx.mha) look ok?

Greg


--
Greg Sharp, PhD
Department of Radiation Oncology
Massachusetts General Hospital


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.

Richard

unread,
Nov 23, 2011, 1:37:55 PM11/23/11
to Plastimatch
OK, I think I found the problem (thanks to looking at the headers!).
The warp input file header shows the incorrect spacing (in units of mm
instead of pixels - I can't believe I missed that). When I correct
that, the problem is resolved. Thank you for bringing that to my
attention!

Rick

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

Reply all
Reply to author
Forward
0 new messages