DisplayShapeWithCoords.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef TRIALDISPLAY_DISPLAYSHAPEWITHCOORDS_H
00028 #define TRIALDISPLAY_DISPLAYSHAPEWITHCOORDS_H
00029
00030 #include <casa/aips.h>
00031 #include <display/DisplayShapes/DisplayShape.h>
00032
00033 namespace casa {
00034
00035
00036
00037
00038
00039 class Record;
00040 class PixelCanvas;
00041 class PanelDisplay;
00042 class WorldCanvas;
00043
00044 template <class T> class Vector;
00045 template <class T> class Matrix;
00046
00047 class DisplayShapeWithCoords {
00048
00049 public:
00050 virtual Record getRawOptions() = 0;
00051
00052 static void floatToPix(Record& inHere, const String& field);
00053 static void floatPointToPix(Record& inHere, const String& field);
00054
00055 static void matrixFloatToQuant(Record& inHere, const String& field,
00056 const String& unit);
00057 static void matrixFloatFromQuant(Record& inHere,
00058 const String& field,
00059 const String& onlyParseTheseUnits);
00060
00061 static void floatFromPix(Record& inHere, const String& field);
00062 static void floatPointFromPix(Record& inHere, const String& field);
00063
00064 static WorldCanvas* chooseWCFromWorldPoint(const Record& settings,
00065 PanelDisplay* pd);
00066
00067 static WorldCanvas* chooseWCFromWorldPoints(const Record& settings,
00068 const String& fieldWithPoints,
00069 PanelDisplay* pd);
00070
00071 static WorldCanvas* chooseWCFromPixPoint(const Float& xPos,
00072 const Float& yPos,
00073 PanelDisplay* pd);
00074
00075 static WorldCanvas* chooseWCFromPixPoints(const Matrix<Float> points,
00076 PanelDisplay* pd);
00077
00078 static Vector<Float> floatPointFromQuant(const Record &inHere,
00079 const String& field,
00080 String& units);
00081
00082 static Vector<Float> relToScreen(const Vector<Float>& rel, PixelCanvas* pc);
00083 static Vector<Float> screenToRel(const Vector<Float>& screen,
00084 PixelCanvas* pc);
00085
00086 static Matrix<Float> relToScreen(const Matrix<Float>& rel, PixelCanvas* pc);
00087 static Matrix<Float> screenToRel(const Matrix<Float>& screen,
00088 PixelCanvas* pc);
00089
00090 static Bool inWorldCanvasDrawArea(const Matrix<Float> points,
00091 WorldCanvas* wc);
00092
00093 static void pixelToWorldPoints(Record& inHere, const String& fieldname,
00094 WorldCanvas* wc);
00095 virtual ~DisplayShapeWithCoords() {}
00096
00097 };
00098
00099 }
00100
00101 #endif
00102
00103
00104
00105
00106
00107