def create_drr(pixel_space)
      # Ensure that we have a pixel_space with data values of type float,
      # which is necessary to store our fractional attenuation values:
      pixel_space = pixel_space.to_pixel_space.to_type(NArray::FLOAT)
      # Set up a ray instance and iterate the pixels of the radiograph:
      r = Ray.new
      pixel_space.columns.times do |i|
        pixel_space.rows.times do |j|
          # Set the properties for the current pixel and perform the ray trace:
          r.reset
          r.p1 = @source
          r.p2 = pixel_space.coordinate(i, j)
          r.vs = @voxel_space
          r.trace
          # Determine the attenuation (fractional value in the range 0 to 1):
          if r.indices.length > 0
            pixel_space[i, j] = @attenuation.vector_attenuation(@voxel_space[r.indices], r.lengths)
          end
        end
      end
      # Convert the pixel space from fractional attenuation values to 12 bit presentation pixel values:
      ps = pixel_space.to_type(NArray::INT)
      ps[true, true] = pixel_space[true, true] * 4095
      # Return the properly processed radiograph:
      ps
    end
def create_drr(pixel_space)
      # Ensure that we have a pixel_space with data values of type float,
      # which is necessary to store our fractional attenuation values:
      pixel_space = pixel_space.to_pixel_space.to_type(NArray::FLOAT)
      # Set up a ray instance and iterate the pixels of the radiograph:
      r = Ray.new
      pixel_space.columns.times do |i|
        pixel_space.rows.times do |j|
          # Set the properties for the current pixel and perform the ray trace:
          r.reset
          r.p1 = @source
          r.p2 = pixel_space.coordinate(i, j)
          r.vs = @voxel_space
          r.trace
          # Determine the attenuation (fractional value in the range 0 to 1):
          if r.indices.length > 0
            pixel_space[i, j] = @attenuation.vector_attenuation(@voxel_space[r.indices], r.lengths)
          end
        end
      end
      # Convert the pixel space from fractional attenuation values to 12 bit presentation pixel values:
      ps = pixel_space.to_type(NArray::INT)
      ps[true, true] = pixel_space[true, true] * 4095
      # Return the properly processed radiograph:
      ps
    end
Computes a digitally reconstructed radiograph (DRR), using this beam geometry
 for the given pixel space (image), applied to the associated voxel space.

 @param [PixelSpace] pixel_space the DRR pixel array (image)
 @return [PixelSpace] the digitally reconstructed radiograph