LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Namespaces | |
ConvolveGpuStatus | |
gpu | |
WarpImageGpuStatus | |
Classes | |
class | KernelImagesForRegion |
class | RowOfKernelImagesForRegion |
A row of KernelImagesForRegion. More... | |
struct | ConvolveWithInterpolationWorkingImages |
kernel images used by convolveRegionWithInterpolation More... | |
class | PositionFunctor |
Base class to transform pixel position for a destination image to its position in the original source image. More... | |
class | WcsPositionFunctor |
Derived functor class to transform pixel position for a destination image to its position in the source image. The transform is from one WCS to another. More... | |
class | AffineTransformPositionFunctor |
Derived functor class to transform pixel position for a destination image to its position in the source image via an AffineTransform. More... | |
class | Spline |
class | TautSpline |
class | SmoothedSpline |
struct | TrapezoidalPacker |
class | WarpAtOnePoint |
A functor that computes one warped pixel. More... | |
Typedefs | |
typedef lsst::afw::image::VariancePixel | VarPixel |
typedef lsst::afw::image::MaskPixel | MskPixel |
typedef double | KerPixel |
Enumerations | |
enum | SpatialFunctionType_t { sftChebyshev, sftPolynomial } |
Functions | |
template<typename OutImageT , typename InImageT > | |
void | assertDimensionsOK (OutImageT const &convolvedImage, InImageT const &inImage, lsst::afw::math::Kernel const &kernel) |
template<typename OutImageT , typename InImageT > | |
void | basicConvolve (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::Kernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
Low-level convolution function that does not set edge pixels. More... | |
template<typename OutImageT , typename InImageT > | |
void | basicConvolve (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::DeltaFunctionKernel const &kernel, lsst::afw::math::ConvolutionControl const &) |
A version of basicConvolve that should be used when convolving delta function kernels. More... | |
template<typename OutImageT , typename InImageT > | |
void | basicConvolve (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::LinearCombinationKernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
A version of basicConvolve that should be used when convolving a LinearCombinationKernel. More... | |
template<typename OutImageT , typename InImageT > | |
void | basicConvolve (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::SeparableKernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
A version of basicConvolve that should be used when convolving separable kernels. More... | |
template<typename OutImageT , typename InImageT > | |
void | convolveWithBruteForce (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::Kernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
Convolve an Image or MaskedImage with a Kernel by computing the kernel image at every point. (If the kernel is not spatially varying then only compute it once). More... | |
template<typename OutImageT , typename InImageT > | |
void | convolveWithInterpolation (OutImageT &outImage, InImageT const &inImage, lsst::afw::math::Kernel const &kernel, ConvolutionControl const &convolutionControl) |
Convolve an Image or MaskedImage with a spatially varying Kernel using linear interpolation. More... | |
template<typename OutImageT , typename InImageT > | |
void | convolveRegionWithInterpolation (OutImageT &outImage, InImageT const &inImage, KernelImagesForRegion const ®ion, ConvolveWithInterpolationWorkingImages &workingImages) |
Convolve a region of an Image or MaskedImage with a spatially varying Kernel using interpolation. More... | |
template<typename OutImageT , typename InImageT > | |
ConvolveGpuStatus::ReturnCode | basicConvolveGPU (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::Kernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
template<typename OutPixelT , typename InPixelT > | |
ConvolveGpuStatus::ReturnCode | convolveLinearCombinationGPU (lsst::afw::image::MaskedImage< OutPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > &convolvedImage, lsst::afw::image::MaskedImage< InPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > const &inImage, lsst::afw::math::LinearCombinationKernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
template<typename OutPixelT , typename InPixelT > | |
ConvolveGpuStatus::ReturnCode | convolveLinearCombinationGPU (lsst::afw::image::Image< OutPixelT > &convolvedImage, lsst::afw::image::Image< InPixelT > const &inImage, lsst::afw::math::LinearCombinationKernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
template<typename OutPixelT , typename InPixelT > | |
ConvolveGpuStatus::ReturnCode | convolveSpatiallyInvariantGPU (lsst::afw::image::MaskedImage< OutPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > &convolvedImage, lsst::afw::image::MaskedImage< InPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > const &inImage, lsst::afw::math::Kernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
template<typename OutPixelT , typename InPixelT > | |
ConvolveGpuStatus::ReturnCode | convolveSpatiallyInvariantGPU (lsst::afw::image::Image< OutPixelT > &convolvedImage, lsst::afw::image::Image< InPixelT > const &inImage, lsst::afw::math::Kernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
bool | IsSufficientSharedMemoryAvailable_ForImgBlock (int filterW, int filterH, int pixSize) |
bool | IsSufficientSharedMemoryAvailable_ForImgAndMaskBlock (int filterW, int filterH, int pixSize) |
bool | IsSufficientSharedMemoryAvailable_ForSfn (int order, int kernelN) |
template<typename DestImageT , typename SrcImageT > | |
std::pair< int, WarpImageGpuStatus::ReturnCode > | warpImageGPU (DestImageT &destImage, SrcImageT const &srcImage, lsst::afw::math::LanczosWarpingKernel const &warpingKernel, lsst::afw::math::SeparableKernel const &maskWarpingKernel, PositionFunctor const &computeSrcPos, int const interpLength, typename DestImageT::SinglePixel padValue, const bool forceProcessing=true) |
GPU accelerated image warping using Lanczos resampling. More... | |
void | TestGpuKernel (int &ret1, int &ret2) |
typedef double lsst::afw::math::detail.KerPixel |
Definition at line 46 of file convCUDA.h.
Definition at line 45 of file convCUDA.h.
Definition at line 44 of file convCUDA.h.
void lsst::afw::math::detail::assertDimensionsOK | ( | OutImageT const & | convolvedImage, |
InImageT const & | inImage, | ||
lsst::afw::math::Kernel const & | kernel | ||
) |
Definition at line 59 of file convCpuGpuShared.cc.
ConvolveGpuStatus::ReturnCode lsst::afw::math::detail::basicConvolveGPU | ( | OutImageT & | convolvedImage, |
InImageT const & | inImage, | ||
lsst::afw::math::Kernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
ConvolveGpuStatus::ReturnCode lsst::afw::math::detail::convolveLinearCombinationGPU | ( | lsst::afw::image::MaskedImage< OutPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > & | convolvedImage, |
lsst::afw::image::MaskedImage< InPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > const & | inImage, | ||
lsst::afw::math::LinearCombinationKernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
convolvedImage | convolved image |
inImage | image to convolve |
ConvolveGpuStatus::ReturnCode lsst::afw::math::detail::convolveLinearCombinationGPU | ( | lsst::afw::image::Image< OutPixelT > & | convolvedImage, |
lsst::afw::image::Image< InPixelT > const & | inImage, | ||
lsst::afw::math::LinearCombinationKernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
convolvedImage | convolved image |
inImage | image to convolve |
void lsst::afw::math::detail::convolveRegionWithInterpolation | ( | OutImageT & | outImage, |
InImageT const & | inImage, | ||
KernelImagesForRegion const & | region, | ||
ConvolveWithInterpolationWorkingImages & | workingImages | ||
) |
Convolve a region of an Image or MaskedImage with a spatially varying Kernel using interpolation.
This is a low-level convolution function that does not set edge pixels.
outImage | convolved image = inImage convolved with kernel |
inImage | input image |
region | kernel image region over which to convolve |
workingImages | working kernel images |
Definition at line 132 of file ConvolveWithInterpolation.cc.
ConvolveGpuStatus::ReturnCode lsst::afw::math::detail::convolveSpatiallyInvariantGPU | ( | lsst::afw::image::MaskedImage< OutPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > & | convolvedImage, |
lsst::afw::image::MaskedImage< InPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > const & | inImage, | ||
lsst::afw::math::Kernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
convolvedImage | convolved image |
inImage | image to convolve |
kernel | convolution kernel |
ConvolveGpuStatus::ReturnCode lsst::afw::math::detail::convolveSpatiallyInvariantGPU | ( | lsst::afw::image::Image< OutPixelT > & | convolvedImage, |
lsst::afw::image::Image< InPixelT > const & | inImage, | ||
lsst::afw::math::Kernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
convolvedImage | convolved image |
inImage | image to convolve |
kernel | convolution kernel |
void lsst::afw::math::detail::convolveWithInterpolation | ( | OutImageT & | outImage, |
InImageT const & | inImage, | ||
lsst::afw::math::Kernel const & | kernel, | ||
ConvolutionControl const & | convolutionControl | ||
) |
Convolve an Image or MaskedImage with a spatially varying Kernel using linear interpolation.
This is a low-level convolution function that does not set edge pixels.
The algorithm is as follows:
Note that this routine will also work with spatially invariant kernels, but not efficiently.
lsst::pex::exceptions::InvalidParameterError | if outImage is not the same size as inImage |
outImage | convolved image = inImage convolved with kernel |
inImage | input image |
kernel | convolution kernel |
convolutionControl | convolution control parameters |
Definition at line 71 of file ConvolveWithInterpolation.cc.
bool lsst::afw::math::detail::IsSufficientSharedMemoryAvailable_ForImgAndMaskBlock | ( | int | filterW, |
int | filterH, | ||
int | pixSize | ||
) |
Definition at line 55 of file cudaConvWrapper.cc.
bool lsst::afw::math::detail::IsSufficientSharedMemoryAvailable_ForImgBlock | ( | int | filterW, |
int | filterH, | ||
int | pixSize | ||
) |
Definition at line 51 of file cudaConvWrapper.cc.
bool lsst::afw::math::detail::IsSufficientSharedMemoryAvailable_ForSfn | ( | int | order, |
int | kernelN | ||
) |
Definition at line 59 of file cudaConvWrapper.cc.
void lsst::afw::math::detail::TestGpuKernel | ( | int & | ret1, |
int & | ret2 | ||
) |
Definition at line 46 of file cudaConvWrapper.cc.
std::pair< int, WarpImageGpuStatus::ReturnCode > lsst::afw::math::detail::warpImageGPU | ( | DestImageT & | destImage, |
SrcImageT const & | srcImage, | ||
lsst::afw::math::LanczosWarpingKernel const & | warpingKernel, | ||
lsst::afw::math::SeparableKernel const & | maskWarpingKernel, | ||
PositionFunctor const & | computeSrcPos, | ||
int const | interpLength, | ||
typename DestImageT::SinglePixel | padValue, | ||
const bool | forceProcessing = true |
||
) |
GPU accelerated image warping using Lanczos resampling.
This function requires a Lanczos warping kernel to perform the source value estimation.
This function will not perform the warping if kernel size is too large. (currently, when the order of the Lanczos kernel is >50) If warping is not performed, the second elemnt of return value will not equal OK. If forceProcessing is true:
Also see lsst::afw::math::warpImage()
Implementation: Calculates values of the coordinate transform function at some points, which are spaced by interpLength intervals. Calls CalculateInterpolationData() to calculate interpolation data from values of coordinate transformation fn. Calls WarpImageGpuWrapper() to perform the wapring.
lsst::pex::exceptions::InvalidParameterError | if interpLength < 1 |
lsst::pex::exceptions::InvalidParameterError | if maskWarpingKernel is neither Lanczos, bilinear nor nearest neighbor |
lsst::pex::exceptions::MemoryError | when allocation of CPU memory fails |
lsst::afw::gpu::GpuMemoryError | when allocation or transfer to/from GPU memory fails |
lsst::afw::gpu::GpuRuntimeError | when GPU code run fails |
destImage | remapped image |
srcImage | source image |
warpingKernel | warping kernel |
maskWarpingKernel | mask warping kernel (can be the same as warping kernel) |
computeSrcPos | Functor to compute source position |
interpLength | Distance over which WCS can be linearily interpolated must be >0 |
padValue | value to use for undefined pixels |
forceProcessing | if true, this function will perform the warping even when it is slower then the CPU code path |
Definition at line 395 of file cudaLanczosWrapper.cc.