plastimatch convert --fixed option is not work with rtdose

276 views
Skip to first unread message

fcj...@gmail.com

unread,
Aug 10, 2020, 4:07:52 AM8/10/20
to Plastimatch

Hi, all

    plastimatch convert --input CT/ --output-img ct.nrrd

    plastimatch convert --input rtdose.dcm --output-dose-img rd.nrrd --fixed ct.nrrd

    The size between rd.nrrd and ct.nrrd is not same.

Sharp, Gregory C.

unread,
Aug 10, 2020, 9:51:15 AM8/10/20
to plast...@googlegroups.com

Hi,

 

I'm not sure if this is a bug or not.  For example, if you did:

 

plastimatch convert --input DICOM/ --output-dose-img dose.nrrd --output-img ct.nrrd --fixed other.nrrd

 

would you expect both the dose and ct to be resampled?  I could be convinced either way, but it's not completely clear.

 

Greg

 

From: plast...@googlegroups.com <plast...@googlegroups.com> On Behalf Of fcj...@gmail.com
Sent: Monday, August 10, 2020 4:08 AM
To: Plastimatch <plast...@googlegroups.com>
Subject: [Plastimatch] plastimatch convert --fixed option is not work with rtdose

 

        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 plastimatch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/7e21f325-892e-4183-8877-6e0951d94950n%40googlegroups.com.

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.

fcj...@gmail.com

unread,
Aug 11, 2020, 3:11:24 AM8/11/20
to Plastimatch
Hi Greg:
    I want dose to be resampled to ct's size, and ct don't resample.
    For now, there are 3 steps:
    plastimatch convert --input CT_DICOM/ --output-img ct.nrrd
    plastimatch convert --input rtdose.dcm --output-dose-img rd.nrrd
    plastimatch resample --input rd.nrrd --output rd_resize.nrrd --fixed ct.nrrd

   Can these 3 steps be reduced to 2 steps or either way instead?

Sharp, Gregory C.

unread,
Aug 20, 2020, 2:46:12 PM8/20/20
to plast...@googlegroups.com

Hi FC,

 

I thought about your question about resampling the dose.  It's not always what you want, but it seems a useful option.  So I added "--resize-dose" to force this to happen.  Use it like this:

 

plastimatch convert --input DICOM/ --output-img image.nrrd --output-dose-img dose.nrrd --fixed reference.nrrd --resize-dose

 

If you update your plastimatch from source you can use this.  Now you can do it in a single command (as above) if rtdose.dcm is in the same directory as the image.

fcj...@gmail.com

unread,
Aug 23, 2020, 11:37:53 PM8/23/20
to Plastimatch
Hi Greg,
    Thank you for the reply.
    When I export DICOM files, rtdose.dcm and images are usually not in the same directory. Can I specify rtdose.dcm's file path, such as adding an --input-dose-img parameter or some other parameters?

Sharp, Gregory C.

unread,
Aug 24, 2020, 12:36:53 PM8/24/20
to plast...@googlegroups.com

Wow, great idea.  I just tried it, and it works!

fcj...@gmail.com

unread,
Sep 8, 2020, 4:11:26 AM9/8/20
to Plastimatch
Hi Greg,
    I pulled the latest plastimatch source code, and built it successfully. But I found that I can't convert one DICOM RTSTRUCT file to multiple nii.gz files, the command is ok in the previous version.
    plastimatch convert --input {0} --output-prefix {1} --referenced-ct {2} --prefix-format nii.gz --xor-contours
    {0} is DICOM RTSTRUCT file directory or path, both not work
    {1} is output nii.gz files directory
    {2} is DICOM CT files directory

fcj...@gmail.com

unread,
Sep 8, 2020, 4:19:42 AM9/8/20
to Plastimatch
PS: 
    I turned BUILD_TESTING and PLM_BUILD_TESTING off in ccmake.
    I built it on two new Ubuntu 16.04 x64 systems, both of them have same problem.

Sharp, Gregory C.

unread,
Sep 12, 2020, 4:17:13 PM9/12/20
to Plastimatch
Hi FCJ,
I couldn't reproduce this.  Is this plastimatch version 1.9.0-59-g8cd5d6b3 ?
Could you please paste in the complete program output?
Thanks!
Greg


From: plast...@googlegroups.com <plast...@googlegroups.com> on behalf of fcj...@gmail.com <fcj...@gmail.com>
Sent: Tuesday, September 8, 2020 4:19 AM

fcj...@gmail.com

unread,
Sep 13, 2020, 11:13:04 PM9/13/20
to Plastimatch

Hi Greg:

The plastimatch-build is the latest plastimatch code build directory.

There was a RTSTRUCT.dcm file under ~/rs_dcm_dir/, And I ran the following command:

foo@bar:~/plastimatch-build$ ./plastimatch convert --input ~/rs_dcm_dir/ --output-prefix ~/rs_nii_dir/ --prefix-format nii.gz --xor-contours --referenced-ct ~/ct_dcm_dir/

Loading RDD

Loading RDD complete

Sorry, could not load input as any known type.

fcj...@gmail.com

unread,
Sep 14, 2020, 3:30:53 AM9/14/20
to Plastimatch
PS: The plastimatch version I used was commit 8cd5d6b3(Add an option to resize dose geometry to match image geometry)

Sharp, Gregory C.

unread,
Sep 18, 2020, 5:47:52 PM9/18/20
to plast...@googlegroups.com

Hi FCJ,

 

For some reason plastimatch is not reading your RTSTRUCT.  I am getting something like this:

 

Loading RDD

Loading RDD complete

Found RTSTUCT, UID=1.2.826.0.1.3680043.8.274.1.1.8323329.23364.1600463281.956502RTSTRUCT

Found DCM_ReferencedFrameOfReferenceSequence!

Found DCM_RTReferencedStudySequence!

Trying to load rt structure set.

Adding structure (1), Body

Adding structure (2), Tumor

<etc>

 

I wonder if DCMTK is not being properly linked.  What is the value of DCMTK_DIR in your CMakeCache.txt?  I use Debian's DCMTK, and have the below.

 

//The directory containing a CMake configuration file for DCMTK.

DCMTK_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/dcmtk

fcj...@gmail.com

unread,
Sep 21, 2020, 12:12:25 AM9/21/20
to Plastimatch

Hi Greg,

I checked CMakeCache.txt and found that DCMTK_DIR was DCMTK_DIR-NOTFOUND, and ITK_DIR was also ITK_DIR-NOTFOUND.

But there were DCMTK-build and ITK-build directory generated in the plastimatch build directory, and they all seemed to build successfully.
Reply all
Reply to author
Forward
0 new messages