mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
imagingUtils.hpp File Reference

Utilities for modeling image formation. More...

Utilities for modeling image formation.

Author
Jared R. Males (jared.nosp@m.male.nosp@m.s@gma.nosp@m.il.c.nosp@m.om)

Definition in file imagingUtils.hpp.

Go to the source code of this file.

Namespaces

 mx
 The mxlib c++ namespace.
 

Functions

template<typename realT >
realT mx::wfp::fftPlateScale (size_t pixels, realT metersPerPixel, realT lambda)
 Calculate the angular plate scale (radians per pixel) of an image after propagation by FFT. More...
 
template<class arrayT >
int mx::wfp::circularPupil (arrayT &m, typename arrayT::Scalar eps=0, typename arrayT::Scalar rad=0, typename arrayT::Scalar overscan=0)
 Fill in an Eigen-like array with a circular pupil mask. More...
 
template<class arrayT >
void mx::wfp::drawLine (arrayT &im, typename arrayT::Scalar x0, typename arrayT::Scalar y0, typename arrayT::Scalar x1, typename arrayT::Scalar y1, typename arrayT::Scalar halfWidth)
 Draw a line in an image. More...
 
template<typename arrayOutT , typename arrayInT >
void mx::wfp::makeComplexPupil (arrayOutT &complexPupil, const arrayInT &realPupil, int wavefrontSizePixels)
 Create a complex pupil plane wavefront from a real amplitude mask. More...
 
template<typename arrayOutT , typename arrayInT >
void mx::wfp::makeComplexPupil (arrayOutT &complexWavefront, const arrayInT &realAmplitude, const arrayInT &realPhase, int wavefrontSizePixels)
 Create a complex wavefront from a real amplitude and a real phase. More...
 
template<typename wavefrontT >
void mx::wfp::tiltWavefront (wavefrontT &complexWavefront, typename wavefrontT::Scalar::value_type xTilt, typename wavefrontT::Scalar::value_type yTilt)
 Apply a tilt to a wavefront. More...
 

Function Documentation

◆ drawLine()

template<class arrayT >
void mx::wfp::drawLine ( arrayT &  im,
typename arrayT::Scalar  x0,
typename arrayT::Scalar  y0,
typename arrayT::Scalar  x1,
typename arrayT::Scalar  y1,
typename arrayT::Scalar  halfWidth 
)

Draw a line in an image.

Todo:
should handle width much more intelligently, this only works for ~45 degree lines.
Template Parameters
arrayTis an Eigen-like array with public typedef Scalar
Parameters
im[in.out] The input image, modified.
[in]x0the x value, relative to image center, of the starting point
[in]y0the y value, relative to image center, of the starting point
[in]x1the x value, relative to image center, of the end point
[in]y1the y value, relative to image center, of the end point
[in]halfWidththe half-width of the line.

Definition at line 120 of file imagingUtils.hpp.