|
template<class T > |
static void | openImage (PtrHolder< ImageInterface< T > > &image, const String &fileName) |
| Open disk image (can be any registered image). More...
|
|
template<class T > |
static void | openImage (ImageInterface< T > *&image, const String &fileName) |
|
template<class T > |
static std::shared_ptr
< ImageInterface< T > > | openImage (const String &fileName) |
|
template<typename T , typename U > |
static void | copyMiscellaneous (ImageInterface< T > &out, const ImageInterface< U > &in, Bool copyImageInfo=True) |
| Copy MiscInfo, ImageInfo, brightness unit and logger (history) from in to out. More...
|
|
template<typename T , typename U > |
static void | copyMask (ImageInterface< T > &out, const ImageInterface< U > &in, const String &maskOut, const String &maskIn, AxesSpecifier axesSpecifier) |
| Copy a mask from one image to another. More...
|
|
static void | copyAttributes (ImageAttrHandler &out, ImageAttrHandler &in) |
| Copy the attributes from one image to another. More...
|
|
template<typename T > |
static void | addDegenerateAxes (LogIO &os, PtrHolder< ImageInterface< T > > &outImage, const ImageInterface< T > &inImage, const String &outFile, Bool direction, Bool spectral, const String &stokes, Bool linear, Bool tabular, Bool overwrite, Bool silent=False) |
| Add one degenerate axis for each of the specified coordinate types. More...
|
|
template<typename T > |
static void | bin (MaskedArray< T > &out, Coordinate &coordOut, const MaskedArray< T > &in, const Coordinate &coordIn, uInt axis, uInt bin) |
| Function to bin up (average data) one axis of an N-D MaskedArray. More...
|
|
static Bool | pixToWorld (Vector< String > &sWorld, const CoordinateSystem &cSys, const Int &pixelAxis, const Vector< Int > &cursorAxes, const IPosition &blc, const IPosition &trc, const Vector< Double > &pixels, const Int &prec, const Bool usePrecForMixed=False) |
| This function converts pixel coordinates to world coordinates. More...
|
|
static String | shortAxisName (const String &axisName) |
| Convert long axis names "Right Ascension", "Declination", "Frequency" and "Velocity" to "RA", "Dec", "Freq", "Vel" respectively. More...
|
|
static void | writeImage (const TiledShape &mapShape, const CoordinateSystem &coordinateInfo, const String &imageName, const Array< Float > &pixels, LogIO &log, const Array< Bool > &pixelMask=Array< Bool >()) |
| write the specified image and add the specified pixels to it. More...
|
|
static GaussianBeam | makeFakeBeam (LogIO &logIO, const CoordinateSystem &csys, Bool suppressWarnings=False) |
|
static void | getUnitAndDoppler (String &xUnit, String &doppler, const uInt axis, const CoordinateSystem &csys) |
|
Utility functions for Image manipulation.
Intended use:
Public interface
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Synopsis
Some helpful static functions that are common to some of my image analysis application classes.
Motivation
I needed some bits and pieces. My goal isto move this rag-tag bunch out of here into other classes as time goes on. So far I have eliminated 80% of the original !
To Do
Definition at line 87 of file ImageUtilities.h.
This function converts pixel coordinates to world coordinates.
You specify a vector of pixel coordinates (pixels
) for only one axis, the pixelAxis
. For the other pixel axes in the CoordinateSystem
, if a pixel axis "i" is found in the CursorAxes
vector, its pixel coordinate is set to the average of the selected region from the image for that axis ((blc(i)+trc(i))/2)
), otherwise it is set to the reference pixel. The vector of world coordinates for pixelAxis
is returned as formatted Strings. If for some reason it can't make the conversion, the element element is returned as "?" Returns False
if the lengths of <blc
and trc
are not equal to the number of pixel axes in the coordinate system.