void SetActive(bool active);
private:
- bool _active;
- int _fitting_mode;
+ bool _active;
+ int _fitting_mode;
- int _dimBase[3];
- double _spcBase[3];
- double _spcOrg[3];
+ int _dimBase[3];
+ double _spcBase[3];
+ double _spcOrg[3];
- bool _thresholdGo;
- ColorLayerImageViewManager *_colorLayerImageViewManager;
+ bool _thresholdGo;
+ ColorLayerImageViewManager *_colorLayerImageViewManager;
// ColorLayerImageView *_colorLayerImageView;
wxButton *_btn_ReadImage;
wxSlider *_opacity;
#include "wxMPRBaseData.h"
#include "wxVtk2DBaseView.h"
#include "wxVTKRenderWindowInteractor.h"
-
-
+#include "vtkTextProperty.h"
//---------------------------------------------------------------------------------------------
};
-//---------------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------------
-//---------------------------------------------------------------------------------------------
-
-ColorLayerImageBasevtkInteractor::ColorLayerImageBasevtkInteractor(LayerImageBase* layerImageBase)
-{
- _state = false;
- _stateKey = false;
- _layerImageBase = layerImageBase;
-
-}
-
-//---------------------------------------------------------------------------------------------
-ColorLayerImageBasevtkInteractor::~ColorLayerImageBasevtkInteractor()
-{
-}
-
-//---------------------------------------------------------------------------------------------
-bool ColorLayerImageBasevtkInteractor::OnChar()
-{
- return true;
-}
-
-
-//---------------------------------------------------------------------------------------------
-bool ColorLayerImageBasevtkInteractor::OnMouseMove() // vitual
-{
- printf("EED ColorLayerImageBasevtkInteractor::OnMouseMove start \n");
-
- vtkRenderWindowInteractor *interactor = _vtkInteractorStyleBaseView->GetInteractor();
-
- // For example in ManualPaint Action
- // This is not working, because the order of insertion events mecanism (_vtkInteractorStyleBaseView)
- // Layer first Paint after.
- // the only way to make it works is to take the axes an paint. this force a first SetParent_refresh_waiting()
-// if ( this->_vtkInteractorStyleBaseView->GetParent_refresh_waiting() == true )
-
- if ( interactor->GetControlKey()==1 ) // EED This if for ManaulPaint Interaction compatibility
- {
- printf("EED ColorLayerImageBasevtkInteractor::OnMouseMove need Refresh \n" );
- _layerImageBase->onThreshold();
- _layerImageBase->GetvtkImageReslice()->Modified();
- } else {
- printf("EED ColorLayerImageBasevtkInteractor::OnMouseMove NOT need Refresh \n" );
- }
-
-
- if ( (_state==true) && (_layerImageBase->GetActorPresent()) )
- {
- wxVtk2DBaseView *wxvtk2Dbaseview = (wxVtk2DBaseView*) _vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
- wxVTKRenderWindowInteractor *wxVTKiren = wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor();
- int px, py;
- wxVTKiren->GetEventPosition(px, py);
-
-// int typeView = 1;
- double X = (double) px;
- double Y = (double) py;
- double Z = wxvtk2Dbaseview->GetActualSlice();
-// wxvtk2Dbaseview->TransFromCoordScreenToWorld(X, Y, Z,true, typeView);
- wxvtk2Dbaseview->TransFromCoordScreenToWorld(X, Y, Z, true);
-
-// _manualPaintControler->PaintImage((int) X, (int) Y, (int) Z);
-
- _layerImageBase->SetX( (int)X );
- _layerImageBase->SetY( (int)Y );
- _layerImageBase->SetZ( (int)Z );
- _layerImageBase->onThreshold();
-// _layerImageBase->Refresh();
-
- this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-
- if (_vtkInteractorStyleBaseView->GetRefresh_waiting()==true)
- {
- _layerImageBase->GetvtkImageReslice()->Modified();
- }
- printf("EED ColorLayerImageBasevtkInteractor::YESSSSSS \n");
- }
- return true;
-}
-
-//---------------------------------------------------------------------------------------------
-bool ColorLayerImageBasevtkInteractor::OnRightButtonDown() // virtual
-{
- printf("EED ColorLayerImageBasevtkInteractor::OnRightButtonDown \n");
- _state=true;
- return true;
-}
-
-
-//---------------------------------------------------------------------------------------------
-bool ColorLayerImageBasevtkInteractor::OnRightButtonUp() // virtual
-{
- printf("EED ColorLayerImageBasevtkInteractor::OnRightButtonUp \n");
- _state=false;
- return true;
-}
-
//---------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
// _scalarbarActor->SetLookupTable( _thresholdTable );
_scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
-
_scalarbarActor->SetTitle("Value");
- _scalarbarActor->SetNumberOfLabels(5);
+ _scalarbarActor->SetNumberOfLabels(4);
+ int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize();
+ _scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
+
// _scalarbarActor->SetTextPad(4); ??
} // _image
virtual bool OnRightButtonUp();
private:
- bool _state;
- bool _stateKey;
+ bool _state;
+ bool _stateKey;
LayerImageBase* _layerImageBase;
protected:
xValues=(double*)malloc(NUM_POINTS*sizeof(double));
yValues=(double*)malloc(NUM_POINTS*sizeof(double));
- unsigned short* histogramPointer=(unsigned short*)histogramImageData->GetScalarPointer(0,0,0);
+ double* histogramPointer=(double*)histogramImageData->GetScalarPointer(0,0,0);
- for(int i=0; i< histogramSize; i++)
+ int i;
+ for(i=0; i< histogramSize; i++)
{
xValues[i]=i;
- yValues[i]=log( (double) histogramPointer[i])*10;
- }
+ if (histogramPointer[i]==0)
+ {
+ yValues[i]=0;
+ } else {
+ yValues[i]=log(histogramPointer[i])*10;
+ } // if histogramPointer
+ } // for i
pGraphicalFunction* histogramFunction=plotter->getFunctionForVectors(xValues,histogramSize,yValues,histogramSize);
/*
ok Button
*/
- //wxButton *okBtn;
+ //wxButton *okBtn;
wxBitmapButton *okBtn;
/*
cancel Button
*/
- //wxButton *cancelBtn;
+ //wxButton *cancelBtn;
wxBitmapButton *cancelBtn;
/*
save Button
*/
- wxButton *saveDataBtn;
+ wxButton *saveDataBtn;
/*
Load Button
*/
- wxButton *loadDataBtn;
+ wxButton *loadDataBtn;
/*
Refresh Button
*/
- wxButton *refreshBtn;
+ wxButton *refreshBtn;
- wxPanel* _panextracontrols;
+ wxPanel *_panextracontrols;
// the user had pressed refresh
bool refreshed;
- vtkColorTransferFunction *_ctfun;
+ vtkColorTransferFunction *_ctfun;
vtkPiecewiseFunction *_tfun;
- vtkVolumeRayCastMapper *volumeMapper;
+ vtkVolumeRayCastMapper *volumeMapper;
vtkVolume *newvol;
//things to refresh
- //wxVtkMPR3DView *wxvtkmpr3Dview;
- //wxVtkClipping3DView *wxvtkclipping3Dview;
+ //wxVtkMPR3DView *wxvtkmpr3Dview;
+ //wxVtkClipping3DView *wxvtkclipping3Dview;
wxSizer* getControls(bool extracontrols = false);
void HistogramWidget::initializeHistogram(vtkImageData* img){
- if(histogram ==NULL){
+ if(histogram ==NULL)
+ {
histogram= new pHistogram(img);
}
//draw
xValues=(double*)malloc(NUM_POINTS*sizeof(double));
yValues=(double*)malloc(NUM_POINTS*sizeof(double));
- unsigned short* histogramPointer=(unsigned short*)histogramImageData->GetScalarPointer(0,0,0);
-
- for(int i=0; i< histogramSize; i++)
+ double* histogramPointer=(double*)histogramImageData->GetScalarPointer(0,0,0);
+ int i;
+ for(i=0; i< histogramSize; i++)
{
xValues[i]=i;
- yValues[i]=log( (double) histogramPointer[i]);
- }
+ if (histogramPointer[i]==0)
+ {
+ yValues[i]=0;
+ } else {
+ yValues[i]=log(histogramPointer[i])*10;
+ } // histogramPointer
+ } // for i
pGraphicalFunction* histogramFunction=plotter->getFunctionForVectors(xValues,histogramSize,yValues,histogramSize);
*/
void HistogramWidget::drawTransferenceFunction()
{
-
double xValues[5],yValues[5];
//xValues
int maxValueGrey=histogram->getMaximumLevelOfGrey();
yValues[4]=0;
pGraphicalFunction * tf = plotter ->getFunctionForVectors( xValues, 5, yValues, 5 );
- printf("EED %p HistogramWidget::drawTransferenceFunction %p\n", this , tf);
+ printf("EED %p HistogramWidget::drawTransferenceFunction %p\n", this , tf);
// Including and drawing the created function in the plotter
if (tf)
{
tf->SetShowPoints(true);
idTransferenceFunction=plotter->addFunction( tf );
if(type==1)
+ {
plotter->addFunctionToMove(tf);
+ }
wxPen mypen(*wxBLACK,0.5, wxSOLID );
mypen.SetWidth(2);
tf->SetPen( mypen );
- }
+ } // if tf
}
/*
GetClientSize(&scrX,&scrY);
plotter->SetSize(scrX,scrY);
pGraphicalFunction* actual=plotter->getFunction(idTransferenceFunction);
- if(actual!=NULL){
+ if(actual!=NULL)
+ {
actual->setScreens(scrX,scrY);
actual->setScales();
}
void HistogramWidget::getTransferenceFunctionPoint(int index,int& x,int& y)
{
pGraphicalFunction* tf=plotter->getFunction(idTransferenceFunction);
- if(tf)
+ if(tf!=NULL)
{
- wxNode* pnode=tf->GetPointAt(index);
- pFunctionPoint* point=(pFunctionPoint*)pnode->GetData();
- x=point->getRealX();
- y=point->getRealY();
+ wxNode* pnode = tf->GetPointAt(index);
+ pFunctionPoint* point = (pFunctionPoint*)pnode->GetData();
+ x = point->getRealX();
+ y = point->getRealY();
}
}
/*
/*
get a color int the bqr color
*/
- void HistogramWidget:: getDataBarColorPoint(int index,int&x, int& red,int& green,int& blue)
+ void HistogramWidget::getDataBarColorPoint(int index,int&x, int& red,int& green,int& blue)
{
- double tmp=x;
+ double tmp = x;
plotter->getBarColorDataAt(index,tmp,red,green,blue);
- x=(int)tmp;
+ x = (int)tmp;
}
/*
Returns the maximum value ot the histogram that is show to the user
*/
float HistogramWidget::getMaxShowedPorcentage()
{
- float porcentageMaxX=plotter->getMaxShowedPorcentage();
- pGraphicalFunction* histogramFunction=plotter->getFunction(idHistogram);
- int min=histogramFunction->getMinX();
- float x=porcentageMaxX*(histogramFunction->getMaxX()-min);
+ float porcentageMaxX = plotter->getMaxShowedPorcentage();
+ pGraphicalFunction* histogramFunction = plotter->getFunction(idHistogram);
+ int min = histogramFunction->getMinX();
+ float x = porcentageMaxX*(histogramFunction->getMaxX()-min);
return min+ x;
}
/*
*/
float HistogramWidget::getMinShowedPorcentage()
{
- float porcentageMinX=plotter->getMinShowedPorcentage();
- pGraphicalFunction* histogramFunction=plotter->getFunction(idHistogram);
- int min=histogramFunction->getMinX();
- float x=porcentageMinX*(histogramFunction->getMaxX()-min);
+ float porcentageMinX = plotter->getMinShowedPorcentage();
+ pGraphicalFunction* histogramFunction = plotter->getFunction(idHistogram);
+ int min = histogramFunction->getMinX();
+ float x = porcentageMinX*(histogramFunction->getMaxX()-min);
return min+ x;
}
/*
*/
float HistogramWidget::getActualShowedPorcentage()
{
- float porcentageActualX=plotter->getMinShowedPorcentage();
- pGraphicalFunction* histogramFunction=plotter->getFunction(idHistogram);
- int min=histogramFunction->getMinX();
- float x=porcentageActualX*(histogramFunction->getMaxX()-min);
- return min+ x;
+ float porcentageActualX = plotter->getMinShowedPorcentage();
+ pGraphicalFunction* histogramFunction = plotter->getFunction(idHistogram);
+ int min = histogramFunction->getMinX();
+ float x = porcentageActualX*(histogramFunction->getMaxX()-min);
+ return min + x;
}
//---------------------------------------
// setting data in transferences function
bool result=false;
pGraphicalFunction* tf=plotter->getFunction(idTransferenceFunction);
//printf("EED %p HistogramWidget::addPointToTransferenceFunction tp%p x%f y%f %d\n",this, tf, x ,y, idTransferenceFunction);
- if (tf!=NULL) { result=tf->AddPoint(x,y); }
+ if (tf!=NULL)
+ {
+ result=tf->AddPoint(x,y);
+ } // if tf
return result;
}
void HistogramWidget::setTransferenceFunctionHasPoints(bool hasPoints)
{
- transferenceFunctionHasPoints=hasPoints;
+ transferenceFunctionHasPoints = hasPoints;
}
void HistogramWidget::setTransferenceFunctionHasColor(bool hasColorPoints)
{
- transferenceFunctionHasPoints=hasColorPoints;
+ transferenceFunctionHasPoints = hasColorPoints;
}
+
int HistogramWidget::getHistogramSize()
{
return histogramSize;
}
+
void HistogramWidget::setType(int type)
{
- this->type=type;
+ this->type = type;
}
/**
** Returns two vectors, the grey level of the point and its value, the value is between [0,1]
**/
- void HistogramWidget::GetValuesPointsFunction(std::vector<double>& greylevel,std::vector<double>& value){
+ void HistogramWidget::GetValuesPointsFunction(std::vector<double>& greylevel,std::vector<double>& value)
+ {
plotter->GetValuesPointsFunction(greylevel,value,histogramSize);
}
int mBarRange::filtreValue(int value)
{
if(value<_min)
+ {
value = _min;
- else if (value>_max)
+ } else if (value>_max) {
value = _max;
-
+ }
return value;
}
-
+//----------------------------------------------------------------------------
int mBarRange::GetStart()
{
return _start;
void mBarRange::SetStart(int newstart)
{
_start = filtreValue(newstart);
- if (_start>_end) { _start=_end; }
+
+ if (_start>_end)
+ {
+ _start=_end;
+ }
+
if (_in_rangeProperty==true)
{
if (_start>_actual) { _start=_actual; }
}
+
RefreshForce();
}
//----------------------------------------------------------------------------
if (_end<_start) { _end=_start; }
if (_in_rangeProperty==true)
{
- if (_end<_actual) { _end=_actual; }
+ if (_end<_actual)
+ {
+ _end=_actual;
+ } // _end
}
RefreshForce();
}
{
return trianglesHalfWidth;
}
+
//----------------------------------------------------------------------------
void mBarRange::SetTrianglesHalfWidth(int nwTriHalfWidth)
{
if(_orientation)
{
SetWidth( rectTotal.GetWidth() - deviceEndMargin );
- }
- else
- {
+ } else {
SetWidth( rectTotal.GetHeight() - deviceEndMargin);
}
_selectionMoveId = -1;
//----------------------------------------------------------------------------
void mBarRange::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
- if (_bitmap_bar!=NULL){
+ if (_bitmap_bar!=NULL)
+ {
//repaint rectangle
if(_orientation)
{
// dc.Blit(0,_w, _h+deviceStart_y+200, _w+deviceStart_x+200-deviceEndMargin, &temp_dc, deviceStart_y,_w+deviceStart_x);
// }
-
}
- }
+ } // _bitmap_bar
}
//----------------------------------------------------------------------------
pHistogram::pHistogram(std::string filePath)
{
- path=filePath;
- points= vtkImageData::New();
- size=100;
- sizeImage=0;
+ path = filePath;
+ points = vtkImageData::New();
+ size = 100;
+ sizeImage = 0;
buildHistogram();
}
pHistogram::pHistogram(vtkImageData* imageData)
{
- points= vtkImageData::New();
- size=100;
- sizeImage=0;
+ points = vtkImageData::New();
+ size = 100;
+ sizeImage = 0;
//cast
/*
vtkImageCast* cast= vtkImageCast::New();
buildHistogram(imageData);
}
+//----------------------------------------------------------------------------
pHistogram::~pHistogram()
{
if(points!=NULL)points->Delete();
}
-//----------------------------------------------------------------------------
-// Methods
-//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
void pHistogram::setImagePath(std::string filePath)
{
path=filePath;
}
+//----------------------------------------------------------------------------
void pHistogram::buildHistogram()
{
/*
imageData->GetScalarRange(range);
initializePoints(size);
setPoints(imageData);
-
}
/*
//setting image data of the points
points->SetDimensions(xDimension,1,1);
//EED points->SetScalarTypeToUnsignedShort();
- points->SetScalarTypeToShort();
+ points->SetScalarTypeToDouble();
points->AllocateScalars();
points->Update();
}
/*
Pointers
*/
- unsigned short* dataImagePointerUS = NULL;
- short* dataImagePointerS = NULL;
- double* dataImagePointerD = NULL;
- short* dataHistogramPointer = NULL;
+ char* dataImagePointerC = (char*)imageData->GetScalarPointer(0,0,0);
+ unsigned char* dataImagePointerUC = (unsigned char*)imageData->GetScalarPointer(0,0,0);
+ short* dataImagePointerS = (short*)imageData->GetScalarPointer(0,0,0);
+ unsigned short* dataImagePointerUS = (unsigned short*)imageData->GetScalarPointer(0,0,0);
+ float* dataImagePointerF = (float*)imageData->GetScalarPointer(0,0,0);
+ double* dataImagePointerD = (double*)imageData->GetScalarPointer(0,0,0);
- dataImagePointerUS = (unsigned short*)imageData->GetScalarPointer(0,0,0);
- dataImagePointerS = (short*)imageData->GetScalarPointer(0,0,0);
- dataImagePointerD = (double*)imageData->GetScalarPointer(0,0,0);
-
- dataHistogramPointer = (short*)points->GetScalarPointer(0,0,0);
+ double* dataHistogramPointer = (double*)points->GetScalarPointer(0,0,0);
/*
Range of greys
*/
double range[2];
if(imageData==NULL)
- range[1]=1;
- else
+ {
+ range[1] = 1;
+ } else {
imageData->GetScalarRange(range);
+ } // imageData
+
/*
Setting the minimun and maximum levels of grey
*/
- maxLevelOfGrey=range[1];
- minLevelOfGrey=range[0];
+ maxLevelOfGrey = range[1];
+ minLevelOfGrey = range[0];
//std::cout<<"maxLevelOfGrey "<<maxLevelOfGrey<<" minLevelOfGrey "<<minLevelOfGrey<<std::endl;
/*
Image Size
int ext[6];
imageData->GetExtent(ext);
int sx,sy,sz;
- sx=ext[1]+1;
- sy=ext[3]+1;
- sz=ext[5]+1;
+ sx=ext[1]-ext[0]+1;
+ sy=ext[3]-ext[2]+1;
+ sz=ext[5]-ext[4]+1;
sizeImage=sx*sy*sz;
dataHistogramPointer[i]=0;
}
- /*
- Constructing the Histogram
- */
- //int k=size/(maxLevelOfGrey-minLevelOfGrey);
int j=0;
- for(i=0;i<sizeImage;i++)
+
+
+ if (imageData->GetScalarType()==VTK_CHAR)
{
- /*
- hashing the histogram
- */
- //double p=((float)*dataImagePointer-minLevelOfGrey);
- //j=p*k;
- if (imageData->GetScalarType()==VTK_UNSIGNED_SHORT)
- {
- j=getIndex(*dataImagePointerUS);
- dataImagePointerUS++;
- }
- if (imageData->GetScalarType()==VTK_SHORT)
+ for(i=0;i<sizeImage;i++)
+ {
+ j=getIndex(*dataImagePointerC);
+ dataImagePointerC++;
+ dataHistogramPointer[j]++;
+ } // for i
+ } // CHAR
+
+ if (imageData->GetScalarType()==VTK_UNSIGNED_CHAR)
+ {
+ for(i=0;i<sizeImage;i++)
+ {
+ j=getIndex(*dataImagePointerUC);
+ dataImagePointerUC++;
+ dataHistogramPointer[j]++;
+ } // for i
+ } // UNSIGNED CHAR
+
+
+ if (imageData->GetScalarType()==VTK_SHORT)
+ {
+ for(i=0;i<sizeImage;i++)
{
j=getIndex(*dataImagePointerS);
dataImagePointerS++;
- }
- if (imageData->GetScalarType()==VTK_DOUBLE)
+ dataHistogramPointer[j]++;
+ } // for i
+ } // SHORT
+
+ if (imageData->GetScalarType()==VTK_UNSIGNED_SHORT)
+ {
+ for(i=0;i<sizeImage;i++)
+ {
+ j=getIndex(*dataImagePointerUS);
+ dataImagePointerUS++;
+ dataHistogramPointer[j]++;
+ } // for i
+ } // UNSIGNED SHORT
+
+
+ if (imageData->GetScalarType()==VTK_FLOAT)
+ {
+ for(i=0;i<sizeImage;i++)
+ {
+ j=getIndex(*dataImagePointerF);
+ dataImagePointerF++;
+ dataHistogramPointer[j]++;
+ } // for i
+ } // FLOAT
+
+
+ if (imageData->GetScalarType()==VTK_DOUBLE)
+ {
+ for(i=0;i<sizeImage;i++)
{
j=getIndex(*dataImagePointerD);
dataImagePointerD++;
- }
-//EED j=getIndex(*dataImagePointer);
+ dataHistogramPointer[j]++;
+ } // for i
+ } // DOUBLE
- //std::cout<<j<<std::endl;
- dataHistogramPointer[j]++;
- }
- /*
- BORRAME
- */
- /*
- k=0;
- for(i=0;i<size;i++)
- {
- k=dataHistogramPointer[i];
- }
- */
}
+
+
/*
Returns the poins of the histograms
*/
//double p=((float)gValue-minLevelOfGrey)/(maxLevelOfGrey-minLevelOfGrey); // JPRx
//double k=p*size;
- unsigned short* dataHistogramPointer=NULL;
- dataHistogramPointer=(unsigned short*)points->GetScalarPointer(0,0,0);
-
+ double* dataHistogramPointer = dataHistogramPointer=(double*)points->GetScalarPointer(0,0,0);
return dataHistogramPointer[gValue];
}
*/
void pPlotter::onActualChange_Bar(wxCommandEvent& event)
{
- text.Clear();
- text = _T( "Last event was on min-max bar: Actual triangle moved to: " );
int lastActual_X = barrange->GetActual();
-
- text << lastActual_X;
color_bar ->setRealX_vertical_line (lastActual_X);
- m_plot->setRealGuideX (lastActual_X);
-
color_bar -> RefreshForce();
+
+ m_plot->setRealGuideX (lastActual_X);
m_plot->UpdateAll();
+ text.Clear();
+ text = _T( "Last event was on min-max bar: Actual triangle moved to: " );
+ text << lastActual_X;
sendTMessage(text);
}
//----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(pPlotterWindow,mpWindow)
-EVT_MOTION (pPlotterWindow::onMouseMove)
-EVT_LEFT_DCLICK(pPlotterWindow::onChangeActual)
-EVT_LEFT_DOWN(pPlotterWindow::onAddPoint)
-EVT_MENU(pwID_DELPOINT, pPlotterWindow::onDeletePoint)
-EVT_MENU(pwID_SHOWPOINTS, pPlotterWindow::onShowPoints)
-EVT_MENU(pwID_STARTDRAWING, pPlotterWindow::onStartDrawing)
-//EVT_MENU(pwID_DELFUNCTION,pPlotterWindow::onDeleteFunction)
-EVT_MENU(pwID_STOPDRAWING, pPlotterWindow::onStopDrawing)
-EVT_MENU(pwID_ADDNEWPOINT, pPlotterWindow::onAddNewPoint)
-EVT_MENU(pwID_NOSHOWPOINTS, pPlotterWindow::onNoShowPoints)
-EVT_MENU(pwID_MYZOOMOUT,pPlotterWindow::onMyZoomOut)
-EVT_MENU(pwID_MYZOOMIN,pPlotterWindow::onMyZoomIn)
-EVT_MENU(pwID_SPLINE,pPlotterWindow::onSplinePoints)
-EVT_MENU(pwID_LINE,pPlotterWindow::onLine)
-EVT_MENU(pwID_SAVE,pPlotterWindow::onSave)
-EVT_MENU(pwID_LOAD,pPlotterWindow::onLoad)
-EVT_MENU(pwID_CHANGECOLOR,pPlotterWindow::onChangeColor)
-EVT_MENU( mpID_LINE_GUIDES, pPlotterWindow::OnGuideLines)
-EVT_MENU( pwID_TRASLATEACTUALFUNCTION, pPlotterWindow::onMoveFunction)
-EVT_LEFT_UP(pPlotterWindow::onLeftUp)
+ EVT_MOTION (pPlotterWindow::onMouseMove)
+ EVT_LEFT_DCLICK(pPlotterWindow::onChangeActual)
+ EVT_LEFT_DOWN(pPlotterWindow::onAddPoint)
+ EVT_MENU(pwID_DELPOINT, pPlotterWindow::onDeletePoint)
+ EVT_MENU(pwID_SHOWPOINTS, pPlotterWindow::onShowPoints)
+ EVT_MENU(pwID_STARTDRAWING, pPlotterWindow::onStartDrawing)
+ //EVT_MENU(pwID_DELFUNCTION,pPlotterWindow::onDeleteFunction)
+ EVT_MENU(pwID_STOPDRAWING, pPlotterWindow::onStopDrawing)
+ EVT_MENU(pwID_ADDNEWPOINT, pPlotterWindow::onAddNewPoint)
+ EVT_MENU(pwID_NOSHOWPOINTS, pPlotterWindow::onNoShowPoints)
+ EVT_MENU(pwID_MYZOOMOUT,pPlotterWindow::onMyZoomOut)
+ EVT_MENU(pwID_MYZOOMIN,pPlotterWindow::onMyZoomIn)
+ EVT_MENU(pwID_SPLINE,pPlotterWindow::onSplinePoints)
+ EVT_MENU(pwID_LINE,pPlotterWindow::onLine)
+ EVT_MENU(pwID_SAVE,pPlotterWindow::onSave)
+ EVT_MENU(pwID_LOAD,pPlotterWindow::onLoad)
+ EVT_MENU(pwID_CHANGECOLOR,pPlotterWindow::onChangeColor)
+ EVT_MENU( mpID_LINE_GUIDES, pPlotterWindow::OnGuideLines)
+ EVT_MENU( pwID_TRASLATEACTUALFUNCTION, pPlotterWindow::onMoveFunction)
+ EVT_LEFT_UP(pPlotterWindow::onLeftUp)
END_EVENT_TABLE()
//----------------------------------------------------------------------------
Use to Show Information
*/
- wxTextCtrl *m_log;
+ wxTextCtrl *m_log;
wxString text;
/*