Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::ImageParams Class Referencefinal

Manage properties of an image. More...

#include <Image.hh>

Inheritance diagram for celeritas::ImageParams:
Inheritance graph
[legend]

Public Member Functions

 ImageParams (ImageInput const &)
 Construct with image properties. More...
 
ImageParamsScalars const & scalars () const
 Access scalar image properties.
 
size_type num_pixels () const
 Number of pixels in an image created from these params.
 
size_type num_lines () const
 Number of horizontal lines to be used for raytracing.
 
HostRef const & host_ref () const final
 Access properties on the host.
 
DeviceRef const & device_ref () const final
 Access properties on the device.
 
- Public Member Functions inherited from celeritas::ParamsDataInterface< ImageParamsData >
ImageParamsData< Ownership::const_reference, M > const & ref () const
 Dispatch a "ref" call to host or device data.
 

Additional Inherited Members

- Public Types inherited from celeritas::ParamsDataInterface< ImageParamsData >
using HostRef = HostCRef< ImageParamsData >
 
using DeviceRef = DeviceCRef< ImageParamsData >
 
- Protected Member Functions inherited from celeritas::ParamsDataInterface< ImageParamsData >
 CELER_DEFAULT_COPY_MOVE (ParamsDataInterface)
 

Detailed Description

Manage properties of an image.

An image is a "window", a 2D rectangle slice of 3D space. As with computer GUI windows, matplotlib imshow, and other visual rendering layouts, the pixel order is like text on a page: left to right, then top to bottom. Because this is vertically flipped from "mathematical" ordering, we store the upper left coordinate and a -y basis vector rather than a lower left coordinate and a +y basis vector.

The same image params can be used to construct multiple images (using different ray tracing methods or different geometries or on host vs device).

Constructor & Destructor Documentation

◆ ImageParams()

celeritas::ImageParams::ImageParams ( ImageInput const &  inp)
explicit

Construct with image properties.

All inputs should be in the native unit system. This constructor uses the two user-provided points along with the basis vector to determine the new "origin" (upper-left corner) and the window's basis functions.

Construct orthonormal basis functions using the rightward vector and user-supplied window.

  1. Normalize rightward vector.
  2. Project the image diagonal onto the rightward vector and subtract that component from the diagonal to orthogonalize it.
  3. Flip the resulting "upward" vector to become a downward direction.
  4. Normalize the downward basis vector.

The documentation for this class was generated from the following files: