<div dir="ltr"><div>If it helps anyone these are the commands I use:</div><div># Create a mask of theĀ
BODY/EXTERNALcontour</div><div>clitkDicomRTStruct2Image -i ../RS.Test_Dicom_MC.Str1.dcm -o patient-mask.mhd -n BODY -j patient.mhd</div><div><br></div><div># Set outside BODY/EXTERNAL to air" <br>clitkSetBackground -i patient.mhd -m patient-mask.mhd -p -1000 -o patient-cleaned.mhd</div><div><br></div><div>Thank you</div><div><br></div><div>GT<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 18, 2021 at 12:27 AM G Tom <<a href="mailto:gregthom992@gmail.com">gregthom992@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I am trying to use a ct dataset for my simulations. I use vv to convert dicom slices to mhd like so</div><div><br></div><div>clitkDicom2Image -o test.mhd *.dcm</div><div><br></div><div>This is fine and I get the mhd/raw files but I have the associated structures with a BODY/EXTERNAL contour and want to crop/mask the ct so that all voxels outside of the External/ BODY contour are set to HU of AIR. <br></div><div><br></div><div>Does anyone have a straightforward way to do it ? <br></div><div><br></div><div>First I tried creating a mask of the body structure but the result is not satisfactory; vv seems to only binarize every other slice. I used the command:<br></div><div><br></div><div>clitkDicomRTStruct2Image -i RS.Test_Dicom_MC.Str1.dcm -j ct/'CT.Test_Dicom_MC.Image 1.dcm' -c -n BODY -o bodymask.mhd</div><div><br></div><div><img src="cid:ii_kmed9k3s0" alt="image.png" width="521" height="341"><br></div><div><br></div></div>
</blockquote></div>