def to_dcm
      # Setup general dicom image attributes:
      create_slice_image_dicom_scaffold
      update_dicom_image
      # Add/update tags that are specific for the slice image type:
      @dcm.add_element(IMAGE_POSITION, [@pos_x, @pos_y, @pos_slice].join("\\"))
      @dcm.add_element(SPACING, [@row_spacing, @col_spacing].join("\\"))
      @dcm.add_element(IMAGE_ORIENTATION, [@cosines].join("\\"))
      @dcm
    end
def to_dcm
      # Setup general dicom image attributes:
      create_slice_image_dicom_scaffold
      update_dicom_image
      # Add/update tags that are specific for the slice image type:
      @dcm.add_element(IMAGE_POSITION, [@pos_x, @pos_y, @pos_slice].join("\\"))
      @dcm.add_element(SPACING, [@row_spacing, @col_spacing].join("\\"))
      @dcm.add_element(IMAGE_ORIENTATION, [@cosines].join("\\"))
      @dcm
    end
Converts the Image instance to a DICOM object.

 @note This method uses the image's original DICOM object (if present),
   and updates it with attributes from the image instance.
 @return [DICOM::DObject] the processed DICOM object