00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GEOEDITLABEL_H
00019 #define GEOEDITLABEL_H
00020
00021 #include <odinqt/float3d.h>
00022
00023 #include <odinpara/geometry.h>
00024
00025 #include <odindata/image.h>
00026
00027 #define REL_READVEC_LENGTH 0.2
00028 #define READVEC_ARROW_LENGTH 0.1
00029 #define CROSSSECT_COLOR "Red"
00030 #define PROJECTION_COLOR "Green"
00031
00032
00033
00035
00036
00037
00038 class GeoEditComp {
00039 public:
00040 static const char* get_compName();
00041 };
00042
00043
00045
00046
00047 class GeoEditLabel : public floatBox3D {
00048 Q_OBJECT
00049
00050 public:
00051 GeoEditLabel(const Image& background, unsigned int coarseFactor, QWidget *parent);
00052
00053 void drawImagingArea(const Geometry& ia, bool drawProj, bool drawCross);
00054
00055 private:
00056 int xcoord2labelxpos(double pos) { return label->xpos2labelxpos(int((double)label->get_nx()*(0.5+secureDivision(pos,backgr.get_geometry().get_FOV(readDirection)))));}
00057 int ycoord2labelypos(double pos) { return label->ypos2labelypos(int((double)label->get_ny()*(0.5+secureDivision(pos,backgr.get_geometry().get_FOV(phaseDirection)))));}
00058
00059 void drawSliceProjection(const darray& cornersProj, GuiPainter& painter);
00060 void drawSliceCrossSection(const darray& connectPoints, double slicethick, GuiPainter& painter, unsigned int slice);
00061
00062 void drawVoxelProjection(const darray& cornersProj, GuiPainter& painter);
00063
00064 void drawReadVector(const dvector& readvecstart_proj, const dvector& readvec_proj, GuiPainter& painter);
00065
00066
00067 void repaint() {if(ia_cache) drawImagingArea(*ia_cache,drawProj_cache,drawCross_cache);}
00068
00069 Image backgr;
00070 unsigned int coarse;
00071
00072 const Geometry* ia_cache;
00073 bool drawProj_cache;
00074 bool drawCross_cache;
00075 };
00076
00077
00078 #endif