_ext2D = new ExtractControlPoints2D();
_fd = NULL;
pos = 0;
- it = NULL;
- bool inic = false;
+ //it = NULL; // JPRx
+ //bool inic = false; // JPRx
}
//------------------------------------------------------------
void ContourToControlPoints::bbUserCopyConstructor()
mwxwidget = new pPlotterWindow( bbGetWxParent() , -1,wxDefaultPosition, wxDefaultSize, 0 );
mwxwidget->AddLayer(new pPlotterScaleX());
mwxwidget->AddLayer(new pPlotterScaleY());
- pGraphicalFunction *pGF = mwxwidget->getFunctionForVectors( &(bbGetInputInX()), &(bbGetInputInY()) );
+ pGraphicalFunction *pGF = mwxwidget->getFunctionForVectors( &(bbGetInputInX()), &(bbGetInputInY()) ); // taking address of temporary ! JPRx
+
mwxwidget->addFunction(pGF);
bbtkDebugDecTab("Core",9);
bbSetOutputWidget( mwxwidget );
mwxwidget -> setIfWithActualDrawed(bbGetInputShowActual());
mwxwidget -> SetStart(bbGetInputInMinShow());
mwxwidget -> SetEnd(bbGetInputInMaxShow());
- wxWidgetSliderMinMax * eventHandler = new wxWidgetSliderMinMax(this, mwxwidget);
+ //wxWidgetSliderMinMax * eventHandler = new wxWidgetSliderMinMax(this, mwxwidget); //JPRx
bbtkDebugDecTab("Core",9);
bbSetOutputWidget( mwxwidget );
void ViewerNV::CreateWidget()
{
bbtkDebugMessageInc("Core",9,"ViewerNV::CreateWidget()"<<std::endl);
- mwxwidget = new wxMaracas_N_ViewersWidget( bbGetWxParent() , bbGetInputIn() , &(bbGetInputnTypeView()) );
+ mwxwidget = new wxMaracas_N_ViewersWidget( bbGetWxParent() , bbGetInputIn() , &(bbGetInputnTypeView()) ); // taking address of temporary JPRx
bbtkDebugDecTab("Core",9);
bbSetOutputWidget( mwxwidget );
}
tempY.clear();
vf->copyVector(&_controlpointsX,&tempX);
vf->copyVector(&_controlpointsY,&tempY);
- int i,j,pos = 0;
+ int i,j /*,pos = 0*/ ; // JPRx
double prom1=0,promactual1=1;
- double prom2=0,promactual2=1;
+ //double prom2=0,promactual2=1; // JPRx
int h = 0;
int hh = 1;
if(_contIncontpos[h]>_contIncontpos[hh])
)
{
int i;
- int np = manualviewbaseecontour->GetNumberOfPoints( ); // number of control points
+ //int np = manualviewbaseecontour->GetNumberOfPoints( ); // number of control points // JPRx
// JSTG 26-02-08 ---------------------------------------------------------------------------------------
//int nps = manualviewbaseecontour->GetNumberOfPointsSpline(); // number of points in the spline
{
while(!feof(fd))
{
- fscanf(fd,"");
- fscanf(fd," %s %d",&firstline,&size);
+ fscanf(fd,""); // ?? JPRx
+ //fscanf(fd," %s %d",&firstline,&size); // JPRx
+ fscanf(fd," %s %d",firstline,&size);
+
_SizesC.push_back(size);
for(j=0; j<size; j++)
{
{
while(!feof(fd))
{
- fscanf(fd,"");
- fscanf(fd," %s %d",&firstline,&size);
+ fscanf(fd,""); // ?? JPRx
+ //fscanf(fd," %s %d",&firstline,&size);// JPRx
+ fscanf(fd," %s %d",firstline,&size);
_SizesC.push_back(size);
for(j=0; j<size; j++)
{
)
{
int i;
- int np = manualcontourmodel->GetSizeLstPoints( ); // number of control points
+ //int np = manualcontourmodel->GetSizeLstPoints( ); // number of control points // JPRx
// JSTG 26-02-08 ---------------------------------------------------------------------------------------
//int nps = manualviewbaseecontour->GetNumberOfPointsSpline(); // number of points in the spline
//------------------------------------------------------------------------
int ContourExtractData::AnalisisContourInside(int x,
- int y,
- manualContourModel *manualcontourmodel
- )
+ int y,
+ manualContourModel *manualcontourmodel
+ )
{
int result = 0;
int i;
- int np = manualcontourmodel->GetSizeLstPoints( ); // number of control points
+ //int np = manualcontourmodel->GetSizeLstPoints( ); // number of control points // JPRx
// JSTG 26-02-08 ---------------------------------------------------------------------------------------
//int nps = manualviewbaseecontour->GetNumberOfPointsSpline(); // number of points in the spline
mbarrange -> SetStart( 10 );
mbarrange -> SetEnd( 90 );
- wxWidgetSliderMinMaxVOI * eventHandler = new wxWidgetSliderMinMaxVOI(this, mbarrange);
+ //wxWidgetSliderMinMaxVOI * eventHandler = new wxWidgetSliderMinMaxVOI(this, mbarrange); // JPRx
wxFlexGridSizer *sizer1 = new wxFlexGridSizer(10);
sizer1->AddGrowableCol(0);
- sizer1->Add(mbarrange,1,wxGROW);
+ sizer1->Add(mbarrange,1,wxGROW);
sizer = sizer1;
panel -> SetSizer(sizer);
tempZ.clear();
while(!feof(fd))
{
- fscanf(fd," %s %d",&firstline,&size);
+ //fscanf(fd," %s %d",&firstline,&size); // JPRx
+ fscanf(fd," %s %d",firstline,&size);
for(int i=0; i<size; i++)
{
fscanf(fd,"%lf %lf %d",&x,&y,&z);
std::vector<int>*Sizes)
{
int sizeS = Sizes->size();
- int sizeV = InX->size();
+ //int sizeV = InX->size(); // JPRx
int i,j,mem,posinic,dir,cont;
double leX;
//----------------------------------------------------------------------------------------------------
vtkImageData* PropContour::method_Spline(std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ, std::vector<int>*Sizes)
{
- long interval = wxGetElapsedTime(TRUE);
+ //long interval = wxGetElapsedTime(TRUE); // JPRx
int i,j,k,sizeX,sizeS,sizeInS;
int numspline;
cont = 0;
for(i=0; i<sizeS; i++)
{
- double hh=tempZ[cont+j];
+ //double hh=tempZ[cont+j]; // JPRx
_mContourModel->AddPoint(tempX[cont+j],tempY[cont+j],tempZ[cont+j]);
cont = cont + tam;
} // for i
vecX->clear();
vecY->clear();
vecZ->clear();
- int sizeplane = _planevector[id].getsize_x();
+ //int sizeplane = _planevector[id].getsize_x();
double tempx;
for(i=0; i<_planevector[id].getsize_x(); i++)
{
int size = Vector1->size();
Vector2->clear();
int i;
- if(size =! 0)
+ if( size != 0)
{
for(i=0; i<size; i++)
{
void manualViewBaseContour :: AddCompleteContourActor( bool ifControlPoints )
{
_viewControlPoints = ifControlPoints;
- vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer();
+ /*vtkRenderer * theRenderer = */ _wxvtkbaseview->GetRenderer(); // JPRx ??
//Adding the spline
AddSplineActor();
void manualViewBaseContour :: RemoveCompleteContourActor()
{
- vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer();
+ /*vtkRenderer * theRenderer =*/ _wxvtkbaseview->GetRenderer(); // JPRx ??
//Removing the spline
RemoveSplineActor();
RemoveTextActor();
}
- int id = GetManualContourModel()->AddPoint(xx,yy,zz);
+ /*int id = */ GetManualContourModel()->AddPoint(xx,yy,zz); // JPRx
GetManualViewBaseContour()->AddPoint();
AddPoint_Others();
int size= GetManualViewBaseContour()->GetNumberOfPoints();
// Insert a Control Point with shift+ClickLeft
- int tt = GetState();
+ // int tt = GetState(); // JPRx
vtkRenderWindowInteractor *vtkrenderwindowinteractor = _vtkInteractorStyleBaseView->GetInteractor();
//EED3131
if( IsEditable() )
wxVTKRenderWindowInteractor *_wxVTKiren;
_wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
_wxVTKiren->GetEventPosition(X, Y);
- int Z = GetZ();
+ //int Z = GetZ(); // JPRx
// Delete Point
if ((keyCode==8) || (keyCode==127))
{
{
if( IsEditable())
{
- int id=_manViewBaseCont->GetIdPoint(x,y,GetZ());
+ /*int id= */ _manViewBaseCont->GetIdPoint(x,y,GetZ()); // JPRx
if (GetManualContourModel()!=NULL){
double xx = x;
double yy = y;
double yy = y;
double zz = z;
GetManualViewBaseContour()->TransfromeCoordViewWorld(xx,yy,zz);
- int id = GetManualContourModel()->AddPoint(xx,yy,zz);
+ /*int id =*/ GetManualContourModel()->AddPoint(xx,yy,zz); // JPRx
GetManualViewBaseContour()->AddPoint();
// GetManualViewBaseContour()->UpdateViewPoint(id);
}
if(nameF.CompareTo( _T("/0") )>0)
file.open( (const char*) (nameF.mb_str()) );
- bool histogramReading=false,histogramPoints=false,histogramPoint=false,tf=false,ctf=false,tfp=false,ctfp=false;
- int gv=-1,in=-1,red=-1,gr=-1,bl=-1,nPoints=-1;
+ bool histogramReading=false,/*histogramPoints=false,histogramPoint=false,*/tf=false,ctf=false,tfp=false,ctfp=false; // JPRx
+ int gv=-1,in=-1,red=-1,gr=-1,bl=-1/*,nPoints=-1*/; // JPRx
if(file.is_open())
{
//-------------
//--------------
//std::getline(file,line);
- int i=0;
+ //int i=0; // JPRx
while(!file.eof())
{
std::string line;
if(xRealValue>=minValue && xRealValue<=maxValue)
{
- bool ifContinue = true;
+ // bool ifContinue = true; // JPRx
//pColorPoint * colorPoint, nextColorPoint;
int maxIndex= logicColorPoints.size()-1;
- int nextIndex = 0;
- int nextX = 0;
+ // int nextIndex = 0; // JPRx
+ //int nextX = 0; // JPRx
int i = 0;
std::vector <pColorPoint*>::iterator iter;
wxPoint points[3];
- int largestNumberWidthInPixels = 15;
+ //int largestNumberWidthInPixels = 15; // JPRx
int pxStart=GetPixelStart();
int pxEnd=GetPixelEnd();
int pxActual=GetPixelActual();
//fprintf( ff , "mBarRange :: OnMouseMove 01\n" );
//fclose(ff);
- int px1=GetPixelStart();
- int px2=GetPixelEnd();
- int px3=GetPixelActual();
+ //int px1=GetPixelStart(); // JPRx
+ //int px2=GetPixelEnd(); // JPRx
+ //int px3=GetPixelActual(); // JPRx
if (activeState)
{
wxPoint point = event.GetPosition();
int cx, cy;
GetClientSize( &cx, &cy);
- const int sx = (int)((m_maxX - m_minX) * GetScaleX());
- const int sy = (int)((m_maxY - m_minY) * GetScaleY());
- const int px = (int)((GetPosX() - m_minX) * GetScaleX() - (cx>>1));
- const int py = (int)((GetPosY() - m_minY) * GetScaleY() - (cy>>1));
+ //const int sx = (int)((m_maxX - m_minX) * GetScaleX()); // JPRx
+ //const int sy = (int)((m_maxY - m_minY) * GetScaleY()); // JPRx
+ //const int px = (int)((GetPosX() - m_minX) * GetScaleX() - (cx>>1)); // JPRx
+ //const int py = (int)((GetPosY() - m_minY) * GetScaleY() - (cy>>1)); // JPRx
//SetScrollbars( 1, 1, sx, sy, px, py);
}
startNode_show = showedColorPoints.front();
lastNode_show = showedColorPoints.back();
- int numberEdges = figure->getNumberEdges();
- wxPoint points [4];
- int i=0;
+ //int numberEdges = figure->getNumberEdges(); // JPRx
+ //wxPoint points [4]; // JPRx
+ //int i=0; // JPRx
int a;
for (a=0; a<showedColorPoints.size() && movingPointIndex==-1 ; a++ )
{
{
return logicFunction -> hasPoint( aPoint );
}
+*/
/**
* Returns the real x values of the control points of the function. It dont includes the points calculated by interpolation.
wxNode* node=logicFunction->GetPointAt(0);
pFunctionPoint* p;
- float middleWX=(((float)(screenX-100))/2)/scaleX;
- float middleWY=(((float)(screenY-50))/2)/scaleY;
+ //float middleWX=(((float)(screenX-100))/2)/scaleX; // JPRx
+ //float middleWY=(((float)(screenY-50))/2)/scaleY; // JPRx
//node=node->GetNext();
while(node)
virtual void getOffsets(int &offsetX,int &offSetY )
{
- offsetX=_offsetX;
- offsetY=_offsetY;
+ offsetX=(int)_offsetX;
+ offsetY=(int)_offsetY;
}
/*
*/
int pHistogram::getHistogramPoint(int gValue)
{
- double p=((float)gValue-minLevelOfGrey)/(maxLevelOfGrey-minLevelOfGrey);
- double k=p*size;
+ //double p=((float)gValue-minLevelOfGrey)/(maxLevelOfGrey-minLevelOfGrey); // JPRx
+ //double k=p*size;
unsigned short* dataHistogramPointer=NULL;
dataHistogramPointer=(unsigned short*)points->GetScalarPointer(0,0,0);
if(node)//point!=NULL)
{
- pFunctionPoint* point=(pFunctionPoint*)node->GetData();
+ //pFunctionPoint* point=(pFunctionPoint*)node->GetData(); // JPRx
bool deleted=realPoints.DeleteNode(node);
//delete point;
//delete node;
mpWindow* mplotWindow = ((mpWindow*)m_plot);
float minReal_X = 0; //(float)mplotWindow->getMinScrX();
float maxReal_X =(float)mplotWindow->getMaxScrX();
- float scrX=(float)mplotWindow->GetScrX()-100;
- double scaleX=(scrX/(maxReal_X))* (mplotWindow->getZoomFactor()); // ........
+ //float scrX=(float)mplotWindow->GetScrX()-100; // JPRx
+ //double scaleX=(scrX/(maxReal_X))* (mplotWindow->getZoomFactor()); // JPRx
// Creating the color bar with values according to the plotter added widget
color_bar = new pColorBar(this, (m_plot->GetSize()).GetWidth(),40, true);
- color_bar -> setRepresentedValues (minReal_X, maxReal_X);
+ color_bar -> setRepresentedValues ((int)minReal_X, (int)maxReal_X);
color_bar -> setDeviceBlitStart (70,0);
- color_bar -> setVisibleRange (minReal_X, maxReal_X);
+ color_bar -> setVisibleRange ((int)minReal_X,(int) maxReal_X);
color_bar -> setDeviceEndMargin (50);
{
text.Clear();
text = _T( "Last event was on color bar: Color point moved to: ");
- int lastReal_X = (color_bar->getLastMovedColorPoint())->getRealX();
+ int lastReal_X = (int)(color_bar->getLastMovedColorPoint())->getRealX();
text << lastReal_X;
barrange ->setRealX_vertical_line (lastReal_X);
else
color_bar ->reinitiateColorBarTo(actualColorPoints);
- color_bar -> setVisibleRange (realMin_X, maxShowed);
+ color_bar -> setVisibleRange ((int)realMin_X, maxShowed);
// Refresh
color_bar -> RefreshForce();
text += wxString::Format(_T("%d"), realMin_X);
double realMax_X = m_plot->getMaxScrX();
- color_bar -> setVisibleRange (realMin_X, realMax_X);
+ color_bar -> setVisibleRange (realMin_X, (int)realMax_X);
- m_plot->actualizeViewRange(realMin_X,realMax_X);
+ m_plot->actualizeViewRange(realMin_X, (int)realMax_X);
//setting the plotter for draw the functions that
//it has to move.
int realMax_X = barrange->GetEnd();
text += wxString::Format(_T("%d"),realMax_X);
double realMin_X = m_plot->getMinScrX();
- color_bar -> setVisibleRange (realMin_X, realMax_X);
- m_plot->actualizeViewRange(realMin_X,realMax_X);
+ color_bar -> setVisibleRange ((int)realMin_X, realMax_X);
+ m_plot->actualizeViewRange((int)realMin_X,realMax_X);
float startP=(float)barrange->getStartShowPorcentage();
float endP=(float)barrange->getEndShowPorcentage();
}
void pPlotter::eraseColorPoints()
{
- int min=color_bar->getMinValue();
- int max=color_bar->getMaxValue();
+ int min=(int)color_bar->getMinValue();
+ int max=(int)color_bar->getMaxValue();
color_bar->reinitiateColorBar(min,max);
}
std::vector<double> vy=getYSpline();
wxPoint* ppoints;
- int counter=0,minX,maxX,minY,maxY;
+ int /*counter=0,*/ minX,maxX,minY,maxY; // JPRx
/*
This is the offset of every point scale to the window
pixel
/*
it define the first point of the polygon for be drawing
- returs true if the first and second point of the polygon are setted
+ returns true if the first and second point of the polygon are set
*/
bool pPlotterLayer::initializePolygon(wxPoint* points,double x1, double y1,double x2, double y2)
{
if(points[0].x<=0&& points[1].x<=0 && points[0].y<=0&& points[1].y<=0)
{
- int offsetpx=getOffsetPixelsXv();
+ //int offsetpx=getOffsetPixelsXv(); //JPRx
//analyzing the curve
}
/**
-* Draw le lines between the points of the function
+* Draw the lines between the points of the function
*/
void pPlotterLayer::drawFunction(wxDC & dc,mpWindow & w)
{
pixel
*/
offsetpx=getOffsetPixelsXv();
- offsetpy=getOffsetPixelsYv();
-
+ offsetpy=getOffsetPixelsYv();
Rewind();
-
dc.GetSize(&scrwX, &scrwY);
//Lines between the points
/***********/
//traslation
- int xTraslation=getXTraslation();
+ //int xTraslation=getXTraslation(); //JPRx
wxNode* node= points.GetFirst();
- int i=1;//points.GetCount()+1;
+ // int i=1;//points.GetCount()+1; //JPRx
int j=2;
/*
Fill it if it is an histogram
*/
wxPoint point;
- pFunctionPoint* pointk;
+ // pFunctionPoint* pointk; //JPRx
if(type==2)
{
/*
//setting origins
const int orgy = w.GetScrY()-40;
- const int extend = w.GetScrX()-100;
+ //const int extend = w.GetScrX()-100; //JPRx
dc.SetDeviceOrigin(70,orgy);
dc.SetAxisOrientation(true,true);
void pPlotterWindow::setActualScales()
{
- int maxX,maxY;//,minX,minY;
+ // int maxX,maxY,minX,minY; // JPRx
/*
if the function is drawed interactively the maxX and the
maxY in actual are sets by the user
{
actual->setScreenX(m_scrX);
actual->setScreenY(m_scrY);
- int j=0;
+ //int j=0; // JPRx
if((initialMovingCLick==-1) && event.LeftIsDown() )
{
if(actual->isInFunction(realPoint.x,realPoint.y))
function->initializeSplineVectors();
UpdateAll();
}
- bool added1=functions.Append(function)!=NULL;
+ // bool added1= functions.Append(function)!=NULL; // JPRx
+
int id=functions.IndexOf(function);
- bool added2=AddLayer(function);
+ /* bool added2= */ AddLayer(function);// JPRx
UpdateAll();
return id;//added1 && added2;
}
*/
void pPlotterWindow :: actualizeViewRange(int newMinX, int newMaxX)
{
- int minPixX,maxPixX,min,max;
+ int minPixX,maxPixX/*, min, max*/; // JPRx
double sx;
/*
getiing pixels
*/
int pPlotterWindow::addFunctionToMove(pGraphicalFunction *function)
{
- bool added1=functionsToMove.Append(function)!=NULL;
+ // bool added1= functionsToMove.Append(function)!=NULL; // JPRx
int id=functionsToMove.IndexOf(function);
UpdateAll();
return id;
since we broke compatibilites with those project it was too hard to maintain.
Therefore source has been merge into maracas directly. As of 08/10/2003, if was
-plan to remove depencies to these lib, and also GSL as it is not in the CREATIS
+planed to remove dependencies to these lib, and also GSL as it is not in the CREATIS
dogma.
mathieu