registration between masks

Skip to first unread message


Jun 14, 2023, 7:20:38 AMJun 14
to Plastimatch
Hi Plastimatch users,

I was trying to register a RTSTRUCT mask to another one.
The mask.nii is 3D array containing 0,1 along with the organ contour.
I used demons method like following:

fixed = mask_fx.nii
moving = mask_mv.nii
image_out = out.nii
vf_out = vf_out.nii

xform = vf
optim = demons
impl = plastimatch
demons_std = 3
demons_acceleration = 1
max_its = 500
res = 2 2 1

This code yielded an error "unhandled conversion from PLM_IMG_TYPE_ITK_INT64 to itk_float"

Additionally, I tried to warp a mask.nii using transformation vf. This try also made an same error. How can I deal with this issue?

I'll be happy to any advice.

Sharp, Gregory C.

Jun 14, 2023, 11:14:17 AMJun 14

Hi Seohan,


Looks like one or both of your images is a 64-bit integer.  Probably you don’t need that for a mask.

You can convert it to an unsigned char like this:


plastimatch convert --input mask_fx.nii --output mask_fx_2.nii --output-type uchar


I’ll try to fix this in a future release to do the conversion automatically.




From: <> On Behalf Of Seohan
Sent: Wednesday, June 14, 2023 7:21 AM
To: Plastimatch <>
Subject: [Plastimatch] registration between masks


        External Email - Use Caution        

You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

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 Mass General Brigham Compliance HelpLine at .

Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 


Jun 15, 2023, 4:33:44 AMJun 15
to Plastimatch
Hi Greg!
Thank you for your prompt reply.
Now it works!!


I leave a solution code for those who probably face this issue I met.
I revised "--output" to "--output-img".

plastimatch convert --input mask_fx.nii --output-img mask_fx_2.nii --output-type uchar

2023년 6월 15일 목요일 오전 12시 14분 17초 UTC+9에 Sharp, Gregory C.님이 작성:
Reply all
Reply to author
0 new messages