Re: [Plastimatch] plastimatch convert rtss : error with --dicom-dir option

586 views
Skip to first unread message

Paolo Zaffino

unread,
Oct 5, 2017, 8:05:12 AM10/5/17
to plast...@googlegroups.com, Pierre Decazes
Hi,
I usually use:
plastimatch convert --input=rtss.dcm --interpolation=nn --output-type=uchar --referenced-ct=ct_dicom_folder --output-prefix=folder_where_put_the_mha_files

HTH.

Best.

Paolo



On 10/05/2017 01:30 PM, Pierre Decazes wrote:
Hello,

Hi would like to use this function  to convert a RTSS to an nrrd or a mha:
plastimatch convert \ 
  --input structures.dcm \
  --output-ss-img outfile.nrrd \
  --output-ss-list outfile.txt \
  --dicom-dir ../ct-directory

Described here : http://plastimatch.org/plastimatch.html


However, the argument "--dicom-dir" is unknown ("Command line error: 'dicom-dir' is not a valid option").


I can run a simplified version without this optionbut the ROI obtained isn't in the same space than the original CT.


When I run a simplified version with the CT in the same directory of the RTSS extracted, the same image is obtained.


The two logs :




piedec@piedec-Ubuntu:~$ plastimatch convert --input /media/piedec/2TO/RTSS/A1.rou.[...]478.1_00000.DCM --output-ss-img /media/piedec/2TO/RTSS/test.mha --output-ss-list /media/piedec/2TO/RTSS/test.txt
ITK exception.


itk::ImageFileReaderException (0x56332c182960)
Location: "unknown"
File: /usr/include/ITK-4.9/itkImageFileReader.hxx
Line: 143
Description:  Could not create IO object for reading file /media/piedec/2TO/RTSS/A1
[...].3189478.1_00000.DCM
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    HDF5ImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.



Found RTSTUCT, UID=1.2.840
[...].1505894494.2
Found DCM_ReferencedFrameOfReferenceSequence!
Found DCM_RTReferencedStudySequence!
Trying to load rt structure set.
Adding structure (1), 1
Adding structure (2), 2
Structure 1 has color 255\0\0
Structure 2 has color 255\0\0
Warning, slice spacing of RTSS may be unequal
-398.66 - -408.47 = 9.80994 vs. 3.26996
PIH is:
Origin = -127.564 -45.5323 -418.28
Size = 512 512 37
Spacing = 0.250339 0.250339 3.26996
Direction = 1 0 0 0 1 0 0 0 1
Rt_study_warp: Convert ss_img to cxt.
Rt_study_warp: Apply dicom_dir.
Rt_study_warp: Set geometry from PIH.
Rt_study_warp: Set rasterization geometry.
Warning, slice spacing of RTSS may be unequal
-398.66 - -408.47 = 9.80994 vs. 3.26996
rast_dim = 512 512 37
rast_offset = -127.564 -45.5323 -418.28
rast_spacing = 0.250339 0.250339 3.26996
Rt_study_warp: warp and save ss.
Warp_and_save_ss: seg->rasterize
Setting use_ss_img_vec to true!
Rasterizing...
Converting...
Finished rasterization.
Warp_and_save_ss: save_ss_img
save_ss_img: save_ss_image
Trying to write image to /media/piedec/2TO/RTSS/test.mha
save_ss_img: save_ss_list
Done.
Finished!


piedec@piedec-Ubuntu:~$ plastimatch convert --input /media/piedec/2TO/RTSS/A1.[...]_00000.DCM --output-ss-img /media/piedec/2TO/RTSS/test2.mha --output-ss-list /media/piedec/2TO/RTSS/test.txt
ITK exception.


itk::ImageFileReaderException (0x5628ae2d7960)
Location: "unknown"
File: /usr/include/ITK-4.9/itkImageFileReader.hxx
Line: 143
Description:  Could not create IO object for reading file /media/piedec/2TO/RTSS/A1.
[...]_00000.DCM
  Tried to create one of the following:
    NiftiImageIO
    NrrdImageIO
    GiplImageIO
    HDF5ImageIO
    JPEGImageIO
    GDCMImageIO
    BMPImageIO
    LSMImageIO
    PNGImageIO
    TIFFImageIO
    VTKImageIO
    StimulateImageIO
    BioRadImageIO
    MetaImageIO
    MRCImageIO
    GE4ImageIO
    GE5ImageIO
  You probably failed to set a file suffix, or
    set the suffix to an unsupported type.



Found RTSTUCT, UID=1.2.840.[..].1505894494.2
Found DCM_ReferencedFrameOfReferenceSequence!
Found DCM_RTReferencedStudySequence!
Trying to load rt structure set.
Adding structure (1), 1
Adding structure (2), 2
Structure 1 has color 255\0\0
Structure 2 has color 255\0\0
Warning, slice spacing of RTSS may be unequal
-398.66 - -408.47 = 9.80994 vs. 3.26996
PIH is:
Origin = -127.564 -45.5323 -418.28
Size = 512 512 37
Spacing = 0.250339 0.250339 3.26996
Direction = 1 0 0 0 1 0 0 0 1
Rt_study_warp: Convert ss_img to cxt.
Rt_study_warp: Apply dicom_dir.
Rt_study_warp: Set geometry from PIH.
Rt_study_warp: Set rasterization geometry.
Warning, slice spacing of RTSS may be unequal
-398.66 - -408.47 = 9.80994 vs. 3.26996
rast_dim = 512 512 37
rast_offset = -127.564 -45.5323 -418.28
rast_spacing = 0.250339 0.250339 3.26996
Rt_study_warp: warp and save ss.
Warp_and_save_ss: seg->rasterize
Setting use_ss_img_vec to true!
Rasterizing...
Converting...
Finished rasterization.
Warp_and_save_ss: save_ss_img
save_ss_img: save_ss_image
Trying to write image to /media/piedec/2TO/RTSS/test2.mha
save_ss_img: save_ss_list
Done.
Finished!



I would like to have the ROI in the same space than the referenced CT. Do you have a solution for this problem, please ?

Thanks
--
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.
For more options, visit https://groups.google.com/d/optout.


Sharp, Gregory C.

unread,
Oct 5, 2017, 9:33:30 AM10/5/17
to plast...@googlegroups.com, Pierre Decazes

It seems the documentation is in error.  As Paolo pointed out the correct usage is “referenced-ct” instead of “dicom-dir”.  I have updated the document.

 

By the way the --interpolation=nn is not needed.  It is the default.

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.

Sharp, Gregory C.

unread,
Oct 5, 2017, 9:42:06 AM10/5/17
to plast...@googlegroups.com, Pierre Decazes

Sorry to respond to myself.  If your structure set and CT image are in the same directory, it is simpler.  No need for referenced-ct option.  Just specify the input directory like this:

 

plastimatch convert --input dicom/ --output-ss-image output.nrrd  ## or use --output-prefix

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages