From e59fe4a0a69ae0180c502e68c57faff544b935ca Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Fri, 14 Nov 2008 15:57:05 +0000 Subject: [PATCH] Avoid warnings --- .../wxWindows/Contour/AutoControlPoints.cxx | 14 +++++++------- .../wxWindows/Contour/ContourPropagation.cxx | 2 +- .../wxWindows/Contour/ExtractControlPoints2D.cxx | 4 ++-- .../interface/wxWindows/Contour/Propagation.cxx | 2 +- .../wxWindows/widgets/InterfaceVtkPanelWidgets.h | 6 +++--- .../wxWindows/widgets/pPlotter/pColorBar.cxx | 14 +++++++------- .../interface/wxWindows/widgets/wxMPRBaseData.cxx | 2 +- .../interface/wxWindows/widgets/wxMPRWidget.cxx | 9 +++++---- lib/maracasVisuLib/src/kernel/marTypes.h | 9 +++++---- lib/maracasVisuLib/src/kernel/volume.cxx | 6 +++--- 10 files changed, 35 insertions(+), 33 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx index 034ebc3..bd1c723 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/AutoControlPoints.cxx @@ -847,16 +847,16 @@ void AutoControlPoints::AddControlPoint(bool activate) { if(_errorpos != -1) { - double xmax = _interpointsX[_errorpos]; - double ymax = _interpointsY[_errorpos]; - double xx = _intervectorX[_errorpos].get_var(); - double yy = _intervectorY[_errorpos].get_var(); + double xmax = _interpointsX[(int)_errorpos]; + double ymax = _interpointsY[(int)_errorpos]; + double xx = _intervectorX[(int)_errorpos].get_var(); + double yy = _intervectorY[(int)_errorpos].get_var(); printf("\n XMAX = %f, YMAX = %f, XX = %f, YY = %f",xmax,ymax,xx,yy); int i,ii,j,posA=-1,posB=-1; bool findA=false, findB=false; //CASE A - for(i=_errorpos; findA!=true; i++) + for(i=(int)_errorpos; findA!=true; i++) { ii = i%_errorvector.size(); for(j=0; j<_controlpointsX.size(); j++) @@ -870,7 +870,7 @@ printf("\n XMAX = %f, YMAX = %f, XX = %f, YY = %f",xmax,ymax,xx,yy); } } //CASE B - for(i=_errorpos; findB!=true; i--) + for(i=(int)_errorpos; findB!=true; i--) { if(_errorpos==-1) { @@ -893,7 +893,7 @@ printf("\n XMAX = %f, YMAX = %f, XX = %f, YY = %f",xmax,ymax,xx,yy); if(posA*pOutX, if(_InX.size() != 0) { - autoc->SetNumSplineInterpolation(_numinterspline); + autoc->SetNumSplineInterpolation((int)_numinterspline); autoc->CalculeInitialControlPoints(&_InX,&_InY,&_InZ); autoc->GetInitialControlPoints(pOutX,pOutY,pOutZ); } @@ -66,7 +66,7 @@ void ExtractControlPoints2D::GetControlPoints(std::vector*pOutX, std::ve if(_InX.size() != 0) { - autoc->SetNumSplineInterpolation(_numinterspline); + autoc->SetNumSplineInterpolation((int)_numinterspline); autoc->CalculeControlPoints(&_InX,&_InY,&_InZ); autoc->GetControlPoints(pOutX,pOutY,pOutZ); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx index be6cddb..2ccb89b 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.cxx @@ -1083,7 +1083,7 @@ void PropContour::SetKeyContours(std::vector*InX, std::vector*In int tmpIdKeyContSizes = 0; bool okFind = false; int i; - int sizeKeyContour,Z=(*InZ)[0]; + int sizeKeyContour,Z=(int)(*InZ)[0]; sizeKeyContour = _KeyContourZ.size(); for (i=0; i getRealX(); + int actualX = (int)actualPoint -> getRealX(); bool isInsideActual = figure -> isPointInside (convertToPixelValue(actualX), convertToPixelValue(xRealValue)); if( actualX == xRealValue || isInsideActual) { @@ -732,7 +732,7 @@ pColorBar :: ~pColorBar() for (int a =0; a getRealX(); + int actualX = (int)actualPoint -> getRealX(); bool isInsideActual = figure -> isPointInside (convertToPixelValue(actualX), clickedValue); if( actualX == xRealValue || isInsideActual) { @@ -770,7 +770,7 @@ pColorBar :: ~pColorBar() temp_dc.SetPen(wxPen( wxColour(167,165,191),1,wxSOLID )); temp_dc.DrawRectangle(0, 0, bar_height, bar_width-deviceEndMargin); } - wxPoint figPoints[4]; + //wxPoint figPoints[4]; // JPRx if( _logicalBar -> getCount() >0) { @@ -1163,11 +1163,11 @@ pColorBar :: ~pColorBar() */ void pColorBar :: setRepresentedValues ( double minRealValue, double maxRealValue ) { - temporalMinXToShow = minRealValue; - temporalMaxXToShow = maxRealValue; + temporalMinXToShow = (int)minRealValue; + temporalMaxXToShow = (int)maxRealValue; - minX_represented_Tshow = minRealValue; - maxX_represented_Tshow = maxRealValue; + minX_represented_Tshow = (int)minRealValue; + maxX_represented_Tshow = (int)maxRealValue; _logicalBar->setMinValue(minX_represented_Tshow); _logicalBar->setMaxValue(maxX_represented_Tshow); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx index 9358a92..28c84b7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRBaseData.cxx @@ -100,7 +100,7 @@ void vtkBaseData::SetT(double t) { t=0; } - _t=t; + _t=(int)t; } //------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx index f5d6a4f..127cdb9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: wxMPRWidget.cxx,v $ Language: C++ - Date: $Date: 2008/11/06 11:00:47 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/11/14 15:57:07 $ + Version: $Revision: 1.3 $ Copyright: (c) 2002, 2003 License: @@ -2617,7 +2617,8 @@ void wxVtkMPR3DViewCntrlPanel::OnEditColorTable(wxCommandEvent& event) double r = (*ctfunVectorRed)[i]; double g = (*ctfunVectorGreen)[i]; double b = (*ctfunVectorBlue)[i]; - hDlg->addColorPoint(gr,r*255,g*255,b*255); + +hDlg->addColorPoint(gr,(int)(r*255),(int)(g*255),(int)(b*255)); i++; } } @@ -3331,7 +3332,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event) double r=(*rctf)[i]; double g=(*gctf)[i]; double b=(*bctf)[i]; - hDlg->addColorPoint(gr,r*255,g*255,b*255); + hDlg->addColorPoint(gr,(int)(r*255),(int)(g*255),(int)(b*255)); i++; } } diff --git a/lib/maracasVisuLib/src/kernel/marTypes.h b/lib/maracasVisuLib/src/kernel/marTypes.h index d119451..e0e57de 100644 --- a/lib/maracasVisuLib/src/kernel/marTypes.h +++ b/lib/maracasVisuLib/src/kernel/marTypes.h @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: marTypes.h,v $ Language: C++ - Date: $Date: 2008/11/05 15:27:03 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/11/14 15:57:12 $ + Version: $Revision: 1.3 $ Copyright: (c) 2002, 2003 License: @@ -31,7 +31,7 @@ */ //JHCL - Start -//If we're using windws +//If we're using windows #if defined(WIN32) //If we're using a dynamic library # ifdef maracasVisuLib_BUILD_SHARED @@ -82,7 +82,8 @@ typedef unsigned long ulong; /*!< unsigned long redefintion. */ typedef unsigned short ushort; /*!< unsigned short redefintion. */ // Is this compilation using LibIDO? -#define KGFO_USE_IDO + +//#define KGFO_USE_IDO // JPRx : Do NOT use LibIDO // Is this compilation using VTK? #define KGFO_USE_VTK diff --git a/lib/maracasVisuLib/src/kernel/volume.cxx b/lib/maracasVisuLib/src/kernel/volume.cxx index 22e0556..13257d2 100644 --- a/lib/maracasVisuLib/src/kernel/volume.cxx +++ b/lib/maracasVisuLib/src/kernel/volume.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: volume.cxx,v $ Language: C++ - Date: $Date: 2008/10/31 16:32:56 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/11/14 15:57:12 $ + Version: $Revision: 1.2 $ Copyright: (c) 2002, 2003 License: @@ -385,7 +385,7 @@ void kVolume::convertCast( Type type ) } // fswitch break; - + } // fswitch _type = type; -- 2.47.1