Commit 2a8cdaec authored by Edward Vigmond's avatar Edward Vigmond
Browse files

DeadData for Auxilliary grids

parent 5412f4eb
......@@ -422,7 +422,7 @@ private:
*
* \throw 1 if any error in input
*/
AuxGrid::AuxGrid( const char *fn, AuxGrid *ag, float t0, float dt ):_dt(dt),_t0(t0)
AuxGrid::AuxGrid( const char *fn, TBmeshWin *tbmw, AuxGrid *ag, float t0, float dt ):_dt(dt),_t0(t0)
{
if( strstr( fn, ".pts_t" ) )
_indexer = new AuxGridIndexer(fn);
......@@ -490,6 +490,8 @@ AuxGrid::AuxGrid( const char *fn, AuxGrid *ag, float t0, float dt ):_dt(dt),_t0(
_rd_pts.ambient = 0.5;
_rd_pts.diffuse = 1.;
_rd_pts.specular = 1.;
_deadData = new DeadDataGUI( tbmw, &cs, VBO_Aux );
}
......@@ -633,6 +635,7 @@ AuxGrid::~AuxGrid()
if( _timeplot )
delete _timeplot;
_timeplot = NULL;
if( _deadData ){ delete _deadData; }
}
void AuxGrid :: optimize_cs( int tm )
......
......@@ -12,6 +12,9 @@
#include "Model.h"
#include "DrawingObjects.h"
#include "plottingwin.h"
#include "DeadDataGUI.h"
class TBmeshWin;
class AuxGridFetcher;
......@@ -44,7 +47,7 @@ class AuxGrid {
GLfloat _mat_prop[4] = { 0.7, 0.7, 80, 1. };
string _absfile;
public:
AuxGrid( const char *fn, AuxGrid *ag=NULL, float t0=0, float dt=1 );
AuxGrid( const char *fn, TBmeshWin *, AuxGrid *ag=NULL, float t0=0, float dt=1 );
~AuxGrid();
Colourscale cs;
......@@ -76,6 +79,7 @@ class AuxGrid {
_rd_pts.set_material(s,_mat_prop );_rd_lns.set_material(s,_mat_prop); }
GLfloat *get_mat() { return _mat_prop; }
string file(){ return _absfile; }
DeadDataGUI* _deadData = NULL;
};
#endif
......@@ -2,19 +2,22 @@
version 1.0400
header_name {.h}
code_name {.cxx}
decl {\#include "TBmeshWin.h"} {private local
decl {\#include "TBmeshWin.h"} {private global
}
decl {class TBmeshWin;} {public local
decl {class TBmeshWin;} {public global
}
decl {\#include "Colourscale.h"} {public global
}
class DeadDataGUI {open
} {
Function {DeadDataGUI( TBmeshWin *w)} {open
Function {DeadDataGUI( TBmeshWin *tb, Colourscale *c, unsigned int cond)} {open
} {
Fl_Window window {
label {Dead Data } open
xywh {1015 298 285 380} type Double hotspot visible
xywh {630 45 285 380} type Double hide hotspot
} {
Fl_Light_Button showDeadData {
label {Dead data}
......@@ -23,12 +26,12 @@ class DeadDataGUI {open
deadgrp->activate();
} else {
deadgrp->deactivate();
mwtb->cs->noDead();
cs->noDead();
}
mwtb->redraw(VBO_Colour);}
tbmw->redraw(reason);}
tooltip {Determine if data is valid or not} xywh {20 11 110 40}
}
Fl_Group deadgrp {open selected
Fl_Group deadgrp {open
xywh {13 12 260 357} deactivate
} {
Fl_Value_Input minValidVal {
......@@ -46,14 +49,14 @@ mwtb->redraw(VBO_Colour);}
if( minValid->value() )
min = minValidVal->value();
else
min = mwtb->cs->min();
min = cs->min();
if( maxValid->value() )
max = maxValidVal->value();
else
max = mwtb->cs->max();
max = cs->max();
mwtb->cs->calibrate( min, max );}
cs->calibrate( min, max );}
tooltip {recalibrate colour scale using valid max & min values} xywh {161 12 110 40} color 134
}
Fl_Box dead_color {
......@@ -100,7 +103,7 @@ if( maxValid->value() )
if( nan->value() )
dr += DEAD_NaN;
mwtb->cs->deadRange(minValidVal->value(),
cs->deadRange(minValidVal->value(),
maxValidVal->value(),
nan->value(),
static_cast<DeadRange>(dr) );
......@@ -110,9 +113,9 @@ col[0] = dead_color->r();
col[1] = dead_color->g();
col[2] = dead_color->b();
mwtb->cs->deadColour(col,deadopac->value());
cs->deadColour(col,deadopac->value());
mwtb->redraw(VBO_Colour);}
tbmw->redraw(reason);}
tooltip {apply colour and range changes} xywh {13 333 125 36} color 238
}
Fl_Light_Button maxValid {
......@@ -134,8 +137,14 @@ else
tooltip {close window} xywh {147 334 125 35} color 215
}
}
code {mwtb = w;} {}
code {tbmw = tb;
cs = c;
reason = cond;} {}
}
decl {TBmeshWin *tbmw;} {private local
}
decl {Colourscale *cs;} {private local
}
decl {TBmeshWin *mwtb;} {private local
decl {unsigned int reason;} {private local
}
}
......@@ -130,7 +130,7 @@ TBmeshWin ::TBmeshWin(int x, int y, int w, int h, const char *l )
dataopac = new DataOpacity( this );
cplane = new ClipPlane( this );
isosurfwin = new IsosurfControl(this);
deadData = new DeadDataGUI(this);
deadData = new DeadDataGUI(this,cs,VBO_Colour);
memset( hilight, 0, sizeof(int)*maxobject );
bgd( 1. );
......@@ -1448,9 +1448,9 @@ TBmeshWin::readAuxGrid( void *vp, const char* agfile )
try {
if( dataBuffer ) {
newAuxGrid = new AuxGrid( agfile, auxGrid, dataBuffer->t0(), dataBuffer->dt() );
newAuxGrid = new AuxGrid( agfile, this, auxGrid, dataBuffer->t0(), dataBuffer->dt() );
}else
newAuxGrid = new AuxGrid( agfile, auxGrid );
newAuxGrid = new AuxGrid( agfile, this, auxGrid );
} catch (...) {
return 1;
}
......
# data file for the Fltk User Interface Designer (fluid)
version 1.0305
version 1.0400
header_name {.h}
code_name {.cc}
decl {\#include "Surfaces.h"} {public local
......@@ -116,7 +116,7 @@ class Controls {open
} {
Fl_Window window {
label {Meshalyzer Controls} open
xywh {1439 185 350 705} type Double box UP_BOX
xywh {234 45 350 705} type Double box UP_BOX
code0 {\#include <FL/Fl_Color_Chooser.H>}
code1 {\#include "VecData.h"} visible
} {
......@@ -910,8 +910,8 @@ reglist->do_callback();}
xywh {10 270 330 260} align 0
} {
Fl_Group hilightgrp {
label Highlight open selected
xywh {10 305 330 225} color 11 labelfont 1 labelsize 12 labelcolor 121 align 4
label Highlight
xywh {10 305 330 225} color 11 labelfont 1 labelsize 12 labelcolor 121 align 4 hide
} {
Fl_Value_Input tethi {
label {VolEle:}
......@@ -1592,8 +1592,8 @@ mwtb->redraw();}
}
}
Fl_Group auxgridgrp {
label {Aux Grid}
xywh {15 305 325 220} box UP_BOX color 60 labelfont 1 labelsize 12 labelcolor 60 align 4 hide deactivate
label {Aux Grid} open
xywh {15 305 325 220} box UP_BOX color 60 labelfont 1 labelsize 12 labelcolor 60 align 4 deactivate
} {
Fl_Light_Button auxgriddispbut {
label On
......@@ -1602,11 +1602,11 @@ mwtb->redraw(VBO_Aux);}
xywh {25 325 35 25} value 1 labelsize 10
}
Fl_Group auxDataGrp {open
xywh {25 320 310 75}
xywh {25 309 310 75}
} {
Fl_Choice auxcstype {
label {colour scale} open
xywh {200 365 90 25} down_box BORDER_BOX labelsize 10 align 2
label {colour scale}
xywh {200 354 90 25} down_box BORDER_BOX labelsize 10 align 2
code0 {\#include "Colourscale.h"}
code1 {o->value(1);}
} {
......@@ -1719,33 +1719,33 @@ mwtb->redraw(VBO_Aux);}
label min
callback {mwtb->auxGrid->cs.calibrate(o->value(),mwtb->auxGrid->cs.max());
mwtb->redraw(VBO_Aux);}
tooltip {minimum data value} xywh {25 365 65 25} labelsize 10 align 2 when 4 textsize 12
tooltip {minimum data value} xywh {25 354 65 25} labelsize 10 align 2 when 4 textsize 12
}
Fl_Value_Input auxmaxcolval {
label max
callback {mwtb->auxGrid->cs.calibrate(mwtb->auxGrid->cs.min(),o->value());
mwtb->redraw(VBO_Aux);}
tooltip {maximum data value} xywh {95 365 65 25} labelsize 10 align 2 when 4 textsize 12
tooltip {maximum data value} xywh {95 354 65 25} labelsize 10 align 2 when 4 textsize 12
}
Fl_Value_Input auxnumcolev {
label levels
callback {mwtb->auxGrid->cs.size((int)(o->value()));
mwtb->redraw(VBO_Aux);}
tooltip {colourmap size} xywh {165 365 30 25} labelsize 10 align 2 when 4 minimum 4 maximum 252 step 1 value 64 textsize 12
tooltip {colourmap size} xywh {165 354 30 25} labelsize 10 align 2 when 4 minimum 4 maximum 252 step 1 value 64 textsize 12
}
Fl_Light_Button auxautocalibratebut {
label auto
callback {mwtb->auxGrid->autocolor(o->value());}
tooltip {autoscale every timestep} xywh {295 365 40 25} labelsize 10 align 16
tooltip {autoscale every timestep} xywh {295 354 40 25} labelsize 10 align 16
}
Fl_Button plotAuxTS {
label Plot
callback {mwtb->auxGrid->plot(tmslider->value());}
tooltip {show time series for highlighted point} xywh {310 325 25 25} labelsize 10 deactivate
tooltip {show time series for highlighted point} xywh {300 323 30 25} labelsize 10 deactivate
}
Fl_Value_Output auxvertval {
label {hi value:}
tooltip {value of highlighted vertex} xywh {200 325 70 25} color 17 selection_color 0 labelsize 10 align 2
tooltip {value of highlighted vertex} xywh {180 324 70 25} color 17 selection_color 0 labelsize 10 align 2
}
Fl_Button {} {
label optimal
......@@ -1753,12 +1753,12 @@ mwtb->redraw(VBO_Aux);}
auxmincolval->value(mwtb->auxGrid->cs.min());
auxmaxcolval->value(mwtb->auxGrid->cs.max());
mwtb->redraw(VBO_Aux);}
tooltip {calibrate for current time} xywh {103 325 45 25} box ROUND_UP_BOX labelsize 10
tooltip {calibrate for current time} xywh {70 324 42 26} box ROUND_UP_BOX labelsize 10
}
}
Fl_Group {} {
label Vertex
xywh {65 400 255 28} labelsize 12 align 4
xywh {65 413 255 28} labelsize 12 align 4
} {
Fl_Button auxptcolor {
label color
......@@ -1767,22 +1767,22 @@ mwtb->redraw(VBO_Aux);}
if( !cc )
cc = new AuxColourChoice(mwtb->auxGrid->color(Vertex),Vertex,mwtb);
cc->window->show();}
xywh {65 408 55 20}
xywh {65 421 55 20}
}
Fl_Light_Button auxptdat {
label data
callback {mwtb->auxGrid->datify(Vertex,o->value());
mwtb->redraw(VBO_Aux);}
tooltip {datify colour} xywh {125 408 50 20}
tooltip {datify colour} xywh {125 421 50 20}
}
Fl_Value_Input auxptsize {
label {size:}
callback {mwtb->auxGrid->size(Vertex,o->value());
mwtb->redraw(VBO_Aux);}
xywh {205 408 55 20} labelsize 12 maximum 1e+06 step 10 value 50
xywh {205 421 55 20} labelsize 12 maximum 1e+06 step 10 value 50
}
Fl_Choice auxptstyle {
xywh {260 408 60 20} down_box BORDER_BOX labelsize 10 align 8
xywh {260 421 60 20} down_box BORDER_BOX labelsize 10 align 8
code0 {o->value(2);}
} {
MenuItem {} {
......@@ -1811,29 +1811,29 @@ mwtb->redraw(VBO_Aux);}
}
Fl_Group {} {
label Cnnx
xywh {65 425 255 28} labelsize 12 align 4
xywh {65 438 255 28} labelsize 12 align 4
} {
Fl_Button auxlinecolor {
label color
callback {static AuxColourChoice *cc=NULL;
if( !cc ) cc =new AuxColourChoice(mwtb->auxGrid->color(Cnnx),Cnnx,mwtb);
cc->window->show();}
xywh {65 433 55 20}
xywh {65 446 55 20}
}
Fl_Light_Button auxlinedat {
label data
callback {mwtb->auxGrid->datify(Cnnx,o->value());
mwtb->redraw(VBO_Aux);}
tooltip {datify colour} xywh {125 433 50 20}
tooltip {datify colour} xywh {125 446 50 20}
}
Fl_Value_Input auxlinewidth {
label {size:}
callback {mwtb->auxGrid->size(Cnnx,o->value());
mwtb->redraw(VBO_Aux);}
xywh {205 433 55 20} labelsize 12 maximum 10000 step 10 value 100
xywh {205 446 55 20} labelsize 12 maximum 10000 step 10 value 100
}
Fl_Choice auxlinestyle {open
xywh {260 433 60 20} down_box BORDER_BOX labelsize 12 align 8
xywh {260 446 60 20} down_box BORDER_BOX labelsize 12 align 8
code0 {o->value(2);}
} {
MenuItem {} {
......@@ -1862,7 +1862,7 @@ mwtb->redraw(VBO_Aux);}
}
Fl_Group {} {
label Surface
xywh {65 450 265 28} labelsize 12 align 4
xywh {65 463 265 28} labelsize 12 align 4
} {
Fl_Button auxsurfcolor {
label color
......@@ -1870,22 +1870,22 @@ mwtb->redraw(VBO_Aux);}
if(!cc)
cc = new AuxSurfColourChoice(mwtb->auxGrid->color(SurfEle),mwtb->auxGrid->get_mat(),mwtb);
cc->window->show();}
xywh {65 458 55 20}
xywh {65 471 55 20}
}
Fl_Light_Button auxsurfdat {
label data
callback {mwtb->auxGrid->datify(SurfEle,o->value());
mwtb->redraw(VBO_Aux);}
tooltip {datify colour} xywh {125 458 50 20}
tooltip {datify colour} xywh {125 471 50 20}
}
Fl_Value_Input auxsurfline {
label {size:}
callback {mwtb->auxGrid->size(SurfEle,o->value());
mwtb->redraw();}
xywh {205 458 55 20} labelsize 12 maximum 100000 step 1 value 5
xywh {205 471 55 20} labelsize 12 maximum 100000 step 1 value 5
}
Fl_Choice auxsurfstyle {open
xywh {260 458 60 20} down_box BORDER_BOX align 8
xywh {260 471 60 20} down_box BORDER_BOX align 8
code0 {o->value(2);}
} {
MenuItem {} {
......@@ -1912,7 +1912,7 @@ mwtb->redraw(wason?VBO_None:VBO_Aux);}
}
Fl_Group {} {
label VoxEle
xywh {65 474 255 31} labelsize 12 align 4
xywh {65 487 255 31} labelsize 12 align 4
} {
Fl_Button auxvolcolor {
label color
......@@ -1920,22 +1920,22 @@ mwtb->redraw(wason?VBO_None:VBO_Aux);}
if(!cc)
cc=new AuxColourChoice(mwtb->auxGrid->color(VolEle),VolEle,mwtb);
cc->window->show();}
xywh {65 485 55 20}
xywh {65 498 55 20}
}
Fl_Light_Button auxvoldat {
label data
callback {mwtb->auxGrid->datify(VolEle,o->value());
mwtb->redraw(VBO_Aux);}
tooltip {datify colour} xywh {125 484 50 20}
tooltip {datify colour} xywh {125 497 50 20}
}
Fl_Value_Input auxvolline {
label {size:}
callback {mwtb->auxGrid->size(VolEle,o->value());
mwtb->redraw();}
xywh {205 483 55 20} labelsize 12 maximum 10000 step 1 value 5
xywh {205 496 55 20} labelsize 12 maximum 10000 step 1 value 5
}
Fl_Choice auxvolstyle {open
xywh {260 483 60 20} down_box BORDER_BOX align 8
xywh {260 496 60 20} down_box BORDER_BOX align 8
code0 {o->value(1);}
} {
MenuItem {} {
......@@ -1979,7 +1979,7 @@ if( o->value() ) {
plotAuxTS->deactivate();
}
mwtb->redraw(VBO_Aux);}
tooltip {turn on highlighting} xywh {275 325 30 25} labelsize 10
tooltip {turn on highlighting} xywh {260 325 30 25} labelsize 10
}
Fl_Value_Input auxhivert {
label Hilight
......@@ -1987,7 +1987,7 @@ mwtb->redraw(VBO_Aux);}
if( mwtb->auxGrid->highlight_vertex(o->value(),val) )
auxvertval->value(val);
mwtb->redraw(VBO_Aux);}
tooltip {vertex to highlight and display time series if present} xywh {150 325 45 25} labelsize 10 align 2 step 1 deactivate
tooltip {vertex to highlight and display time series if present} xywh {120 325 50 25} labelsize 10 align 2 step 1 deactivate
code0 {\#include "MyValueInput.h"}
class MyValueInput
}
......@@ -1995,7 +1995,13 @@ mwtb->redraw(VBO_Aux);}
label Clip
callback {mwtb->auxGrid->clip(o->value());
mwtb->redraw();}
tooltip {applying clipping to auxiliary grid} xywh {65 325 35 25} box THIN_UP_BOX labelsize 10
tooltip {applying clipping to auxiliary grid} xywh {100 390 60 20} box THIN_UP_BOX labelsize 10
}
Fl_Button {} {
label {Dead Data}
callback {if( mwtb->auxGrid )
mwtb->auxGrid->_deadData->window->show();} selected
xywh {175 390 80 20}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment