Register CT, CBCT along with masks

48 views
Skip to first unread message

Dhruv Jain

unread,
Jan 31, 2022, 5:57:57 AM1/31/22
to Plastimatch
Hi, 
I am very new to plastimatch. 
I am trying to register two 3d images 
moving = CT , fixed = CBCT using dicom files. 

  [STAGE]
  xform=align_center
 [STAGE]
 xform=rigid
 optim=versor
 max_its=30
  res=4 4 2
 
It does a good job. 
But now I have rtstruct files for ct and cbct which I would like to match too. I have also extracted xform_out transformations for the ct if that helps. 
Can someone please help me out. 
Thank you so much 

Best Regards,
Dhruv

Paolo Zaffino

unread,
Jan 31, 2022, 7:00:09 AM1/31/22
to plast...@googlegroups.com
Hi Dhruv,
if you have the transformation you can use it to warp the structure as well.
Use plastimatch warp command.

If you need help let us know.

Best,
Paolo
--
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 plastimatch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/c542e2d8-64c9-4844-8c09-5d52ea74983an%40googlegroups.com.


Dhruv Jain

unread,
Jan 31, 2022, 9:46:43 AM1/31/22
to Plastimatch
Thanks a lot Paolo for your reply.
So I tried with using convert/warp for the rtstruct.
So I have a nii file for the images while dicom rtstruct file for the rtstruct converted. 

Is it possible to generate dicom files for the images as well OR  else to generate the concerned mask from the rtstruct as nii... 

Thanks Again...

Paolo Zaffino

unread,
Feb 1, 2022, 4:15:33 AM2/1/22
to plast...@googlegroups.com
Hi,
the command I use to extract nii files form dicomRT is:
plastimatch convert --input=dicomRT --interpolation=nn --output-type=uchar --referenced-ct=CTfolder --prefix-format nii.gz --output-prefix=folder_where_nii_will_be_saved

In this way you will have a folder containing a single nii.gz file for each structure.

To warp a single nii.gz file I run:
plastimatch warp --input file.nii.gz --xf transformation_file --interpolation=nn --output-type=uchar --fixed reference_CT.nii.gz --output-img warped_stru.nii.gz

Maybe there is a more efficient way, embedding the two commands into a single one, but usually I run this.

Let me know if it works.

Best,
Paolo

Dhruv Jain

unread,
Feb 1, 2022, 6:39:58 AM2/1/22
to Plastimatch
Hi ,
It worked perfectly for me. 
Thanks again. 

I just have a small last question 
--fixed reference_ct.nii.gz  in warp is the ct.nii  which I have already registered and from which I computed the transformations.... Am I right?

Paolo Zaffino

unread,
Feb 1, 2022, 6:59:52 AM2/1/22
to plast...@googlegroups.com
Great!

That image should be the fixed image of your registration task.
The warped images fits the fixed one, so nothing changes is real life, it's just a logical difference that it's better to keep.

Best,
Paolo
Reply all
Reply to author
Forward
0 new messages