Skip to content

Commit

Permalink
clang-format warpExposure.h
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj authored and isullivan committed Jan 25, 2018
1 parent 96c4bcb commit 6bfeeea
Showing 1 changed file with 47 additions and 50 deletions.
97 changes: 47 additions & 50 deletions include/lsst/afw/math/warpExposure.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ class Wcs;
namespace math {

/**
* Lanczos warping: accurate but slow and can introduce ringing artifacts.
*
* This kernel is the product of two 1-dimensional Lanczos functions.
* The number of minima and maxima in the 1-dimensional Lanczos function is 2*order + 1.
* The kernel has one pixel per function minimum or maximum; but as applied to warping,
* the first or last pixel is always zero and can be omitted. Thus the kernel size is 2*order x 2*order.
*
* For more information about warping kernels see makeWarpingKernel
*
* @todo: make a new class WarpingKernel and make this a subclass.
*/
* Lanczos warping: accurate but slow and can introduce ringing artifacts.
*
* This kernel is the product of two 1-dimensional Lanczos functions.
* The number of minima and maxima in the 1-dimensional Lanczos function is 2*order + 1.
* The kernel has one pixel per function minimum or maximum; but as applied to warping,
* the first or last pixel is always zero and can be omitted. Thus the kernel size is 2*order x 2*order.
*
* For more information about warping kernels see makeWarpingKernel
*
* @todo: make a new class WarpingKernel and make this a subclass.
*/
class LanczosWarpingKernel : public SeparableKernel {
public:
explicit LanczosWarpingKernel(int order ///< order of Lanczos function
Expand All @@ -73,23 +73,23 @@ class LanczosWarpingKernel : public SeparableKernel {
virtual std::shared_ptr<Kernel> clone() const;

/**
* get the order of the kernel
*/
* get the order of the kernel
*/
int getOrder() const;

protected:
virtual void setKernelParameter(unsigned int ind, double value) const;
};

/**
* Bilinear warping: fast; good for undersampled data.
*
* The kernel size is 2 x 2.
*
* For more information about warping kernels see makeWarpingKernel
*
* @todo: make a new class WarpingKernel and make this a subclass.
*/
* Bilinear warping: fast; good for undersampled data.
*
* The kernel size is 2 x 2.
*
* For more information about warping kernels see makeWarpingKernel
*
* @todo: make a new class WarpingKernel and make this a subclass.
*/
class BilinearWarpingKernel : public SeparableKernel {
public:
explicit BilinearWarpingKernel()
Expand Down Expand Up @@ -141,14 +141,14 @@ class BilinearWarpingKernel : public SeparableKernel {
};

/**
* Nearest neighbor warping: fast; good for undersampled data.
*
* The kernel size is 2 x 2.
*
* For more information about warping kernels see makeWarpingKernel
*
* @todo: make a new class WarpingKernel and make this a subclass.
*/
* Nearest neighbor warping: fast; good for undersampled data.
*
* The kernel size is 2 x 2.
*
* For more information about warping kernels see makeWarpingKernel
*
* @todo: make a new class WarpingKernel and make this a subclass.
*/
class NearestWarpingKernel : public SeparableKernel {
public:
explicit NearestWarpingKernel() : SeparableKernel(2, 2, NearestFunction1(0.0), NearestFunction1(0.0)) {}
Expand Down Expand Up @@ -277,7 +277,7 @@ class WarpingControl {
* Note the new cache is not computed until getWarpingKernel or getMaskWarpingKernel is called.
*/
void setCacheSize(int cacheSize ///< cache size
) {
) {
_cacheSize = cacheSize;
};

Expand All @@ -295,7 +295,7 @@ class WarpingControl {
* (and so is only intended for unit tests)
*/
void setInterpLength(int interpLength ///< interpolation length (pixels)
) {
) {
_interpLength = interpLength;
};

Expand All @@ -308,15 +308,15 @@ class WarpingControl {
* set the warping kernel by name
*/
void setWarpingKernelName(std::string const &warpingKernelName ///< name of warping kernel
);
);

/**
* set the warping kernel
*
* @throws lsst::pex::exceptions::InvalidParameterError if new kernel pointer is empty.
*/
void setWarpingKernel(SeparableKernel const &warpingKernel ///< warping kernel
);
);

/**
* get the mask warping kernel
Expand All @@ -333,15 +333,15 @@ class WarpingControl {
*/
void setMaskWarpingKernelName(std::string const &maskWarpingKernelName
///< name of mask warping kernel; use "" to clear the kernel
);
);

/**
* set the mask warping kernel
*
* @note To clear the mask warping kernel use setMaskWarpingKernelName("").
*/
void setMaskWarpingKernel(SeparableKernel const &maskWarpingKernel ///< mask warping kernel
);
);

/**
* get mask bits to grow to full width of image/variance kernel
Expand All @@ -353,7 +353,7 @@ class WarpingControl {
*/
void setGrowFullMask(lsst::afw::image::MaskPixel growFullMask ///< mask bits to grow to full width
///< of image/variance kernel
) {
) {
_growFullMask = growFullMask;
}

Expand Down Expand Up @@ -392,7 +392,7 @@ int warpExposure(
typename lsst::afw::image::detail::image_traits<
typename DestExposureT::MaskedImageT>::image_category())
///< use this value for undefined (edge) pixels
);
);

/**
* @brief Warp an Image or MaskedImage to a new Wcs. See also convenience function
Expand Down Expand Up @@ -443,7 +443,7 @@ int warpImage(DestImageT &destImage, ///< remapped %image
typename DestImageT::SinglePixel padValue = lsst::afw::math::edgePixel<DestImageT>(
typename lsst::afw::image::detail::image_traits<DestImageT>::image_category())
///< use this value for undefined (edge) pixels
);
);

/**
* @brief A variant of warpImage that uses an XYTransform instead of a pair of WCS
Expand All @@ -458,7 +458,7 @@ int warpImage(DestImageT &destImage, ///< remapped %i
typename DestImageT::SinglePixel padValue = lsst::afw::math::edgePixel<DestImageT>(
typename lsst::afw::image::detail::image_traits<DestImageT>::image_category())
///< use this value for undefined (edge) pixels
);
);

/**
* @brief A variant of warpImage that uses a TransformPoint2ToPoint2
Expand All @@ -474,14 +474,11 @@ int warpImage(DestImageT &destImage, ///< remapped %i
* @return the number of good pixels
*/
template <typename DestImageT, typename SrcImageT>
int warpImage(DestImageT &destImage,
SrcImageT const &srcImage,
geom::Transform<geom::Point2Endpoint, geom::Point2Endpoint> const & destToSrc,
int warpImage(DestImageT &destImage, SrcImageT const &srcImage,
geom::Transform<geom::Point2Endpoint, geom::Point2Endpoint> const &destToSrc,
WarpingControl const &control,
typename DestImageT::SinglePixel padValue = lsst::afw::math::edgePixel<DestImageT>(
typename lsst::afw::image::detail::image_traits<DestImageT>::image_category())
);

typename lsst::afw::image::detail::image_traits<DestImageT>::image_category()));

/**
* Warp an image with a LinearTranform about a specified point.
Expand All @@ -498,7 +495,7 @@ int warpCenteredImage(
typename DestImageT::SinglePixel padValue = lsst::afw::math::edgePixel<DestImageT>(
typename lsst::afw::image::detail::image_traits<DestImageT>::image_category())
///< use this value for undefined (edge) pixels
);
);

namespace details {
template <typename A, typename B>
Expand All @@ -510,9 +507,9 @@ template <typename A>
bool isSameObject(A const &a, A const &b) {
return &a == &b;
}
}
}
}
} // lsst::afw::math
} // namespace details
} // namespace math
} // namespace afw
} // namespace lsst

#endif // !defined(LSST_AFW_MATH_WARPEXPOSURE_H)

0 comments on commit 6bfeeea

Please sign in to comment.