Warp vector interpolation

38 views
Skip to first unread message

tao sun

unread,
Apr 12, 2012, 5:19:03 AM4/12/12
to Plastimatch
Hi,

I am a newbie and trying use plastimatch for the registration for 4D
lung CT. I have 2 phases image now: 10.mha
and 50.mha. I want to generate mid-phase, say 30.mha using the vector
field generated from b-spine registration. Here is what I've done:

1. got vf_out=vf.mha

plastimatch register command.txt

2. half vf.mha

plastimatch add --weight 0.5 vf.mha --output halfvf.mha

3. register 50.mha to 30.mha

platimatch warp --input 50.mha --xf halfvf.mha --output-img 30.mha

However, I got a similar image compared to 10.mha. I supposed got the
mid one between 10.mha and 50.mha.
Could someone give me a help?



Gregory Sharp

unread,
Apr 12, 2012, 9:10:51 AM4/12/12
to plast...@googlegroups.com, coldd...@gmail.com

Hi Tao,

Can you try running the following commands? Just paste the
output into your reply.

plastimatch stats vf.mha
plastimatch stats halfvf.mha

These can help see if your vector field got scaled correctly.

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.

tao sun

unread,
Apr 12, 2012, 11:07:12 PM4/12/12
to Plastimatch
Hi Greg,

Here is what it outputs:

C:\SPB_Data\bin\Debug>plastimatch stats vf.mha
Min: -21.577 -12.406 -30.268
Mean: 0.193 0.042 -1.667
Max: 22.154 21.203 16.668
Mean abs: 0.526 0.618 1.826
Energy: MINDIL -2.29849 MAXDIL 5.11293 MAXSTRAIN 18.8283 TOTSTRAIN
810208
Min dilation at: (168 216 103)
Jacobian: MINJAC -4.05925 MAXJAC 19.0227 MINABSJAC 8.38565e-006
Min abs jacobian at: (149 226 105)
Second derivatives: MINSECDER 6.95336e-010 MAXSECDER 0.582366
TOTSECDER 77394.2
INTSECDER 147618
Max second derivative: (100 190 132)

C:\SPB_Data\bin\Debug>plastimatch stats halfvf.mha
MIN -2.789383 AVE -0.012261 MAX 4.055465 NONZERO 36962304 NUMVOX
36962304

It seems scaling correctly. Or maybe it's the way I did warp wrong?

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

tao sun

unread,
Apr 17, 2012, 6:39:54 AM4/17/12
to Plastimatch
Hi,

It seems I made a mistake when I was doing the scaling.
Somehow halfvf.mha is 3D. And vf.mha is 4D.
I'll try to generate scaling vector using matlab agian and see what the result is.

Regards,
Sun Tao

Gregory Sharp

unread,
Apr 17, 2012, 9:51:48 AM4/17/12
to plast...@googlegroups.com, coldd...@gmail.com

Hi Sun,

Yes, I agree with your assessment. It looks like plastimatch
doesn't have any way to scale a vector field.

Probably I can add this function, but if you are in a hurry
you may want to use Matlab.

Greg

Gregory Sharp

unread,
May 19, 2012, 4:46:57 PM5/19/12
to plast...@googlegroups.com, coldd...@gmail.com

Hi Sun Tao,

I fixed this problem, and also added the new command
"plastimatch scale" which may be more convenient for scaling
images or vector field.

Greg

tao sun

unread,
May 21, 2012, 1:16:24 AM5/21/12
to plast...@googlegroups.com
Hi Greg,

Glad to hear that and I will try it.

Regards,
Sun Tao

2012/5/20 Gregory Sharp <gcs...@partners.org>
Reply all
Reply to author
Forward
0 new messages