User Tools

Site Tools


other:dsx:surface3d:tutorials:work_with_multiple_dicom_stacks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
other:dsx:surface3d:tutorials:work_with_multiple_dicom_stacks [2024/07/16 19:21] – created sgrangerother:dsx:surface3d:tutorials:work_with_multiple_dicom_stacks [2024/07/17 15:44] (current) – created sgranger
Line 1: Line 1:
-====== Work_with_Multiple_DICOM_Stacks ======+====== Work with Multiple DICOM Stacks ======
  
 || ||
Line 30: Line 30:
 If you use third-party software (e.g., Mimics, ScanIP) to segment the image data and create surface models, you will need to manually specify the patient matrix in order to include landmarks that are defined in other image stacks. In the DICOM convention, within each image slice the origin is in the top-left corner, with the X axis pointing to the right, the Y axis pointing down, and the Z axis pointing out the back of the slice. In the DSX convention, the DICOM frame is rotated 180 degrees about the X axis, and moved down to the lower-left corner. Thus the X axis points to the right, the Y axis points up, and the Z axis points out the front of the slice. The origin of the entire stack is moved to the lower-left corner of the slice with the smallest Z value (within this local image frame, not within the RCS). Thus, the Z axis always points up through the stack, as shown here: If you use third-party software (e.g., Mimics, ScanIP) to segment the image data and create surface models, you will need to manually specify the patient matrix in order to include landmarks that are defined in other image stacks. In the DICOM convention, within each image slice the origin is in the top-left corner, with the X axis pointing to the right, the Y axis pointing down, and the Z axis pointing out the back of the slice. In the DSX convention, the DICOM frame is rotated 180 degrees about the X axis, and moved down to the lower-left corner. Thus the X axis points to the right, the Y axis points up, and the Z axis points out the front of the slice. The origin of the entire stack is moved to the lower-left corner of the slice with the smallest Z value (within this local image frame, not within the RCS). Thus, the Z axis always points up through the stack, as shown here:
  
-{{DSXImageFrame.png}}+{{:DSXImageFrame.png}}
  
 The patient matrix for each trackable object is the transform from the RCS to this DSX frame of the segmented image data (the image stack that is used to generate DRRs). You will need to calculate this transform yourself, using the Image Orientation and Image Position fields in the DICOM header, as well as the Y translation, 180-degree X rotation, and [possibly] Z translation mentioned above (whether or not the Z translation is needed depends on the Image Orientation field). There is a way to make Surface3D calculate the patient matrix that may be easier than calculating it yourself. In the third-party segmentation program, output a mask file (.tif) of the entire knee stack that is a binary marking of femur voxels. In Surface3D, load the knee stack, then load the mask file (//File -> Load Label//). Mask and crop the knee stack, then save the cropped image data to the subject file. This cropped image data should be the same as what you would get from your third-party program. You can then use this image file for generating DRRs in X4D. The patient matrix will be saved to the subject file when you save the image file. If you will also be using surface models created in a third-party program, make sure their vertices are expressed in the reference frame of the cropped image data. The [[Other:DSX:Orient3D:Image-Surface_Match|**Image/Surface Match**]] widget in Orient3D can be used for checking the frame of the surface model, and modifying it to match the frame of the image data. The patient matrix for each trackable object is the transform from the RCS to this DSX frame of the segmented image data (the image stack that is used to generate DRRs). You will need to calculate this transform yourself, using the Image Orientation and Image Position fields in the DICOM header, as well as the Y translation, 180-degree X rotation, and [possibly] Z translation mentioned above (whether or not the Z translation is needed depends on the Image Orientation field). There is a way to make Surface3D calculate the patient matrix that may be easier than calculating it yourself. In the third-party segmentation program, output a mask file (.tif) of the entire knee stack that is a binary marking of femur voxels. In Surface3D, load the knee stack, then load the mask file (//File -> Load Label//). Mask and crop the knee stack, then save the cropped image data to the subject file. This cropped image data should be the same as what you would get from your third-party program. You can then use this image file for generating DRRs in X4D. The patient matrix will be saved to the subject file when you save the image file. If you will also be using surface models created in a third-party program, make sure their vertices are expressed in the reference frame of the cropped image data. The [[Other:DSX:Orient3D:Image-Surface_Match|**Image/Surface Match**]] widget in Orient3D can be used for checking the frame of the surface model, and modifying it to match the frame of the image data.
other/dsx/surface3d/tutorials/work_with_multiple_dicom_stacks.1721157687.txt.gz · Last modified: 2024/07/16 19:21 by sgranger