|
| ImageRegrid () |
| Default constructor. More...
|
|
| ImageRegrid (const ImageRegrid &other) |
| copy constructor (copy semantics) More...
|
|
| ~ImageRegrid () |
| destructor More...
|
|
ImageRegrid< T > & | operator= (const ImageRegrid &other) |
| Assignment copy semantics) More...
|
|
void | regrid (ImageInterface< T > &outImage, typename Interpolate2D::Method method, const IPosition &whichOutPixelAxes, const ImageInterface< T > &inImage, Bool replicate=False, uInt decimate=0, Bool showProgress=False, Bool forceRegrid=False, Bool verbose=False) |
| Regrid inImage onto the grid specified by outImage. More...
|
|
void | get2DCoordinateGrid (Cube< Double > &grid, Matrix< Bool > &gridMask) const |
| Get and set the 2-D coordinate grid. More...
|
|
void | set2DCoordinateGrid (const Cube< Double > &grid, const Matrix< Bool > &gridMask, Bool notify=False) |
|
Bool | insert (ImageInterface< T > &outImage, const Vector< Double > &outPixelLocation, const ImageInterface< T > &inImage) |
| Inserts inImage into outImage. More...
|
|
void | showDebugInfo (Int level=0) |
| Print out useful debugging information (level 0 is none, 1 is some, 2 is too much) More...
|
|
void | disableReferenceConversions (Bool disable=True) |
| Enable/disable Measures Reference conversions. More...
|
|
|
void | _checkAxes (IPosition &outPixelAxes, const IPosition &inShape, const IPosition &outShape, const Vector< Int > &pixelAxisMap, const CoordinateSystem &outCoords, Bool verbose) |
| Check shape and axes. More...
|
|
void | findMaps (uInt nDim, Vector< Int > &pixelAxisMap1, Vector< Int > &pixelAxisMap2, const CoordinateSystem &inCoords, const CoordinateSystem &outCoords) const |
| Find maps between coordinate systems. More...
|
|
Double | findScaleFactor (const Unit &units, const CoordinateSystem &inCoords, const CoordinateSystem &outCoords, Int inCoordinate, Int outCoordinate, LogIO &os) const |
| Find scale factor to conserve flux
More...
|
|
void | _regridOneCoordinate (LogIO &os, IPosition &outShape2, Vector< Bool > &doneOutPixelAxes, MaskedLattice< T > *&finalOutPtr, MaskedLattice< T > *&inPtr, MaskedLattice< T > *&outPtr, CoordinateSystem &outCoords, const CoordinateSystem &inCoords, Int outPixelAxis, const ImageInterface< T > &inImage, const IPosition &outShape, Bool replicate, uInt decimate, Bool outIsMasked, Bool showProgress, Bool forceRegrid, typename Interpolate2D::Method method, Bool verbose) |
| Regrid one Coordinate. More...
|
|
void | regridTwoAxisCoordinate (LogIO &os, MaskedLattice< T > &outLattice, const MaskedLattice< T > &inLattice, const Unit &imageUnit, const CoordinateSystem &inCoords, const CoordinateSystem &outCoords, Int inCoordinate, Int outCoordinate, const Vector< Int > inPixelAxes, const Vector< Int > outPixelAxes, const Vector< Int > pixelAxisMap1, const Vector< Int > pixelAxisMap2, typename Interpolate2D::Method method, Bool replicate, uInt decimate, Bool showProgress) |
| Regrid DirectionCoordinate or 2-axis LinearCoordinate. More...
|
|
void | make2DCoordinateGrid (LogIO &os, Bool &allFail, Bool &missedIt, Double &minInX, Double &minInY, Double &maxInX, Double &maxInY, Cube< Double > &in2DPos, Matrix< Bool > &succeed, const CoordinateSystem &inCoords, const CoordinateSystem &outCoords, Int inCoordinate, Int outCoordinate, uInt xInAxis, uInt yInAxis, uInt xOutAxis, uInt yOutAxis, const IPosition &inPixelAxes, const IPosition &outPixelAxes, const IPosition &inShape, const IPosition &outPos, const IPosition &cursorShape, uInt decimate=0) |
| Make regridding coordinate grid for this cursor. More...
|
|
void | make2DCoordinateGrid (Cube< Double > &in2DPos, Double &minInX, Double &minInY, Double &maxInX, Double &maxInY, const Vector< Double > &pixelScale, uInt xInAxis, uInt yInAxis, uInt xOutAxis, uInt yOutAxis, uInt xInCorrAxis, uInt yInCorrAxis, uInt xOutCorrAxis, uInt yOutCorrAxis, const IPosition &outPos, const IPosition &cursorShape) |
| Make replication coordinate grid for this cursor. More...
|
|
void | make1DCoordinateGrid (Block< typename NumericTraits< T >::BaseType > &xOut, Vector< Bool > &failed, Bool &allFailed, Bool &allGood, const Coordinate &inCoord, const Coordinate &outCoord, Int inAxisInCoordinate, Int outAxisInCoordinate, MFrequency::Convert &machine, Bool useMachine) |
| Make regridding coordinate grid for this axis. More...
|
|
void | make1DCoordinateGrid (Block< typename NumericTraits< T >::BaseType > &xOut, typename NumericTraits< T >::BaseType pixelScale) const |
| Make replication coordinate grid for this axis. More...
|
|
void | regrid1D (MaskedLattice< T > &outLattice, const MaskedLattice< T > &inLattice, const Coordinate &inCoord, const Coordinate &outCoord, const Vector< Int > &inPixelAxes, const Vector< Int > &outPixelAxes, Int inAxisInCoordinate, Int outAxisInCoordinate, const Vector< Int > pixelAxisMap, typename Interpolate2D::Method method, MFrequency::Convert &machine, Bool replicate, Bool useMachine, Bool showProgress) |
| Regrid 1 axis. More...
|
|
void | regrid2DMatrix (Lattice< T > &outCursor, LatticeIterator< Bool > *&outMaskIterPtr, const Interpolate2D &interp, ProgressMeter *&pProgress, Double &iPix, uInt nDim, uInt xInAxis, uInt yInAxis, uInt xOutAxis, uInt yOutAxis, Double scale, Bool inIsMasked, Bool outIsMasked, const IPosition &outPos, const IPosition &outCursorShape, const IPosition &inChunkShape, const IPosition &inChunkBlc, const IPosition &pixelAxisMap2, Array< T > &inDataChunk, Array< Bool > *&inMaskChunkPtr, const Cube< Double > &pix2DPos, const Matrix< Bool > &succeed) |
|
void | findXYExtent (Bool &missedIt, Bool &allFailed, Double &minInX, Double &minInY, Double &maxInX, Double &maxInY, Cube< Double > &in2DPos, const Matrix< Bool > &succeed, uInt xInAxis, uInt yInAxis, uInt xOutAxis, uInt yOutAxis, const IPosition &outPos, const IPosition &outCursorShape, const IPosition &inShape) |
|
Bool | minmax (Double &minX, Double &maxX, Double &minY, Double &maxY, const Array< Double > &xData, const Array< Double > &yData, const Array< Bool > &mask) |
|
template<class T>
class casacore::ImageRegrid< T >
This regrids one image to match the coordinate system of another
Intended use:
Public interface
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Etymology
Regrids, or resamples, images.
Synopsis
This class enables you to regrid one image to the coordinate system of another. You can regrid any or all of the axes in the image. A range of interpolation schemes are available.
It will cope with coordinate systems being in different orders (coordinate, world axes, pixel axes). The basic approach is to make a mapping from the input to the output coordinate systems, but the output CoordinateSystem order is preserved in the output image.
Any DirectionCoordinate or LinearCoordinate holding exactly two axes is regridded in one pass with a 2-D interpolation scheme. All other axes are regridded in separate passes with a 1D interpolation scheme. This means that a LinearCoordinate holding say 3 axes where some of them are coupled will not be correctly regridded. StokesCoordinates cannot be regridded.
Multiple passes are made through the data, and the output of each pass is the input of the next pass. The intermediate images are stored as TempImages which may be in memory or on disk, depending on their size.
It can also simply insert this image into that one via an integer shift.
Example
Motivation
A common image analysis need is to regrid images, e.g. to compare images from different telescopes.
Thrown Exceptions
Definition at line 119 of file ImageRegrid.h.