Commit c03fe55a authored by Mathieu Malaterre's avatar Mathieu Malaterre

FIX: Some warnings to make borland happier

parent 5b770c56
...@@ -265,19 +265,19 @@ int TestORG(ostream& strm) ...@@ -265,19 +265,19 @@ int TestORG(ostream& strm)
rg3D->GetCell(k * (19 * 19) + j * 19 + i, gcell3D); rg3D->GetCell(k * (19 * 19) + j * 19 + i, gcell3D);
strm << "gcell3D: " << *gcell3D ; strm << "gcell3D: " << *gcell3D ;
i = 10; j = 15; k = 7; i = 10; j = 15;
rg2Dxy->GetCell(j * 19 + i,gcell2D); rg2Dxy->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ; strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7; i = 10; j = 15;
rg2Dxz->GetCell(j * 19 + i,gcell2D); rg2Dxz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ; strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7; i = 10; j = 15;
rg2Dxz->GetCell(j * 19 + i,gcell2D); rg2Dxz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ; strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7; i = 10; j = 15;
rg2Dyz->GetCell(j * 19 + i,gcell2D); rg2Dyz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ; strm << "gcell2D: " << *gcell2D ;
......
...@@ -305,15 +305,15 @@ int TestOSG(ostream& strm) ...@@ -305,15 +305,15 @@ int TestOSG(ostream& strm)
sg3D->GetCell(k * (19 * 19) + j * 19 + i, gcell3D); sg3D->GetCell(k * (19 * 19) + j * 19 + i, gcell3D);
strm << "gcell3D: " << *gcell3D ; strm << "gcell3D: " << *gcell3D ;
i = 10; j = 15; k = 7; i = 10; j = 15;
sg2Dxy->GetCell(j * 19 + i,gcell2D); sg2Dxy->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ; strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7; i = 10; j = 15;
sg2Dxz->GetCell(j * 19 + i,gcell2D); sg2Dxz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ; strm << "gcell2D: " << *gcell2D ;
i = 10; j = 15; k = 7; i = 10; j = 15;
sg2Dyz->GetCell(j * 19 + i,gcell2D); sg2Dyz->GetCell(j * 19 + i,gcell2D);
strm << "gcell2D: " << *gcell2D ; strm << "gcell2D: " << *gcell2D ;
......
...@@ -109,7 +109,7 @@ int main( int argc, char *argv[] ) ...@@ -109,7 +109,7 @@ int main( int argc, char *argv[] )
vtkPolyDataMapper *mapper; vtkPolyDataMapper *mapper;
vtkCellArray *cells; vtkCellArray *cells;
vtkActor *actor; vtkActor *actor;
vtkGlyph3D *filter = NULL; vtkGlyph3D *filter;
vtkPolyData *data; vtkPolyData *data;
vtkPoints *pnts = 0; vtkPoints *pnts = 0;
vtkTriangleFilter *tfilter; vtkTriangleFilter *tfilter;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "vtkViewport.h" #include "vtkViewport.h"
#include "vtkWindow.h" #include "vtkWindow.h"
vtkCxxRevisionMacro(vtkAxisActor2D, "1.40"); vtkCxxRevisionMacro(vtkAxisActor2D, "1.41");
vtkStandardNewMacro(vtkAxisActor2D); vtkStandardNewMacro(vtkAxisActor2D);
vtkCxxSetObjectMacro(vtkAxisActor2D,LabelTextProperty,vtkTextProperty); vtkCxxSetObjectMacro(vtkAxisActor2D,LabelTextProperty,vtkTextProperty);
...@@ -681,7 +681,7 @@ int vtkAxisActor2DComputeTicks(double sRange[2], double &interval, ...@@ -681,7 +681,7 @@ int vtkAxisActor2DComputeTicks(double sRange[2], double &interval,
double &root) double &root)
{ {
// first we try assuming the first value is reasonable // first we try assuming the first value is reasonable
int numTicks = 0; int numTicks;
double range = fabs(sRange[1]-sRange[0]); double range = fabs(sRange[1]-sRange[0]);
int rootPower = static_cast<int>(floor(log10(range)-1)); int rootPower = static_cast<int>(floor(log10(range)-1));
root = pow(10.0,rootPower); root = pow(10.0,rootPower);
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define VTK_FTFC_DEBUG_CD 0 #define VTK_FTFC_DEBUG_CD 0
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkFreeTypeUtilities, "1.5"); vtkCxxRevisionMacro(vtkFreeTypeUtilities, "1.6");
vtkInstantiatorNewMacro(vtkFreeTypeUtilities); vtkInstantiatorNewMacro(vtkFreeTypeUtilities);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -263,7 +263,6 @@ void vtkFreeTypeUtilities::MapTextPropertyToId(vtkTextProperty *tprop, ...@@ -263,7 +263,6 @@ void vtkFreeTypeUtilities::MapTextPropertyToId(vtkTextProperty *tprop,
// - 1/10th degree: 12 bits (11.8) // - 1/10th degree: 12 bits (11.8)
int angle = (vtkMath::Round(tprop->GetOrientation() * 10.0) % 3600) << bits; int angle = (vtkMath::Round(tprop->GetOrientation() * 10.0) % 3600) << bits;
bits += 12;
// We really should not use more than 32 bits // We really should not use more than 32 bits
...@@ -310,7 +309,6 @@ void vtkFreeTypeUtilities::MapIdToTextProperty(unsigned long id, ...@@ -310,7 +309,6 @@ void vtkFreeTypeUtilities::MapIdToTextProperty(unsigned long id,
// - 1/10th degree: 12 bits (11.8) // - 1/10th degree: 12 bits (11.8)
int angle = id >> bits; int angle = id >> bits;
bits += 12;
tprop->SetOrientation((float)(angle & ((1 << 12) - 1)) / 10.0); tprop->SetOrientation((float)(angle & ((1 << 12) - 1)) / 10.0);
// We really should not use more than 32 bits // We really should not use more than 32 bits
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "vtkProp.h" #include "vtkProp.h"
#include "vtkRenderer.h" #include "vtkRenderer.h"
vtkCxxRevisionMacro(vtkFrustumCoverageCuller, "1.32"); vtkCxxRevisionMacro(vtkFrustumCoverageCuller, "1.33");
vtkStandardNewMacro(vtkFrustumCoverageCuller); vtkStandardNewMacro(vtkFrustumCoverageCuller);
// Create a frustum coverage culler with default values // Create a frustum coverage culler with default values
...@@ -106,7 +106,6 @@ double vtkFrustumCoverageCuller::Cull( vtkRenderer *ren, ...@@ -106,7 +106,6 @@ double vtkFrustumCoverageCuller::Cull( vtkRenderer *ren,
if (!vtkMath::AreBoundsInitialized(bounds)) if (!vtkMath::AreBoundsInitialized(bounds))
{ {
coverage = 0.0; coverage = 0.0;
i = 7;
} }
else else
{ {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "vtkTransform.h" #include "vtkTransform.h"
#include "vtkUnsignedCharArray.h" #include "vtkUnsignedCharArray.h"
vtkCxxRevisionMacro(vtkIVExporter, "1.60"); vtkCxxRevisionMacro(vtkIVExporter, "1.61");
vtkStandardNewMacro(vtkIVExporter); vtkStandardNewMacro(vtkIVExporter);
vtkIVExporter::vtkIVExporter() vtkIVExporter::vtkIVExporter()
...@@ -244,7 +244,7 @@ void vtkIVExporter::WriteAnActor(vtkActor *anActor, FILE *fp) ...@@ -244,7 +244,7 @@ void vtkIVExporter::WriteAnActor(vtkActor *anActor, FILE *fp)
vtkPolyData *pd; vtkPolyData *pd;
vtkGeometryFilter *gf = NULL; vtkGeometryFilter *gf = NULL;
vtkPointData *pntData; vtkPointData *pntData;
vtkPoints *points = NULL; vtkPoints *points;
vtkDataArray *normals = NULL; vtkDataArray *normals = NULL;
vtkDataArray *tcoords = NULL; vtkDataArray *tcoords = NULL;
int i; int i;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <math.h> #include <math.h>
vtkCxxRevisionMacro(vtkLODProp3D, "1.42"); vtkCxxRevisionMacro(vtkLODProp3D, "1.43");
vtkStandardNewMacro(vtkLODProp3D); vtkStandardNewMacro(vtkLODProp3D);
#define VTK_INDEX_NOT_IN_USE -1 #define VTK_INDEX_NOT_IN_USE -1
...@@ -1026,7 +1026,7 @@ void vtkLODProp3D::PrintSelf(ostream& os, vtkIndent indent) ...@@ -1026,7 +1026,7 @@ void vtkLODProp3D::PrintSelf(ostream& os, vtkIndent indent)
void vtkLODProp3D::GetActors(vtkPropCollection *ac) void vtkLODProp3D::GetActors(vtkPropCollection *ac)
{ {
vtkDebugMacro(<< "vtkLODProp3D::GetActors"); vtkDebugMacro(<< "vtkLODProp3D::GetActors");
int index = 0; int index;
int lodID; int lodID;
lodID = this->GetPickLODID(); lodID = this->GetPickLODID();
...@@ -1043,12 +1043,12 @@ void vtkLODProp3D::GetActors(vtkPropCollection *ac) ...@@ -1043,12 +1043,12 @@ void vtkLODProp3D::GetActors(vtkPropCollection *ac)
} }
} }
int vtkLODProp3D::GetAutomaticPickPropIndex(void) int vtkLODProp3D::GetAutomaticPickPropIndex()
{ {
double bestTime = -1.0; double bestTime = -1.0;
int index = 0; int index = 0;
double targetTime = 0; double targetTime = 0;
double estimatedTime = 0.0; double estimatedTime;
for (int i = 0; i < this->NumberOfEntries; i++ ) for (int i = 0; i < this->NumberOfEntries; i++ )
{ {
...@@ -1062,7 +1062,6 @@ int vtkLODProp3D::GetAutomaticPickPropIndex(void) ...@@ -1062,7 +1062,6 @@ int vtkLODProp3D::GetAutomaticPickPropIndex(void)
if ( estimatedTime == 0.0 ) if ( estimatedTime == 0.0 )
{ {
index = i; index = i;
bestTime = 0.0;
break; break;
} }
...@@ -1095,10 +1094,10 @@ int vtkLODProp3D::GetAutomaticPickPropIndex(void) ...@@ -1095,10 +1094,10 @@ int vtkLODProp3D::GetAutomaticPickPropIndex(void)
int vtkLODProp3D::GetPickLODID(void) int vtkLODProp3D::GetPickLODID(void)
{ {
int lodID=0; int lodID;
vtkDebugMacro(<< "vtkLODProp3D::GetPickLODID"); vtkDebugMacro(<< "vtkLODProp3D::GetPickLODID");
int index = 0; int index;
if (this->AutomaticPickLODSelection) if (this->AutomaticPickLODSelection)
{ {
if ( this->SelectedLODIndex < 0 || if ( this->SelectedLODIndex < 0 ||
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "vtkRendererCollection.h" #include "vtkRendererCollection.h"
#include "vtkTransform.h" #include "vtkTransform.h"
vtkCxxRevisionMacro(vtkOBJExporter, "1.55"); vtkCxxRevisionMacro(vtkOBJExporter, "1.56");
vtkStandardNewMacro(vtkOBJExporter); vtkStandardNewMacro(vtkOBJExporter);
vtkOBJExporter::vtkOBJExporter() vtkOBJExporter::vtkOBJExporter()
...@@ -124,9 +124,9 @@ void vtkOBJExporter::WriteAnActor(vtkActor *anActor, FILE *fpObj, FILE *fpMtl, ...@@ -124,9 +124,9 @@ void vtkOBJExporter::WriteAnActor(vtkActor *anActor, FILE *fpObj, FILE *fpMtl,
vtkPolyData *pd; vtkPolyData *pd;
vtkGeometryFilter *gf = NULL; vtkGeometryFilter *gf = NULL;
vtkPointData *pntData; vtkPointData *pntData;
vtkPoints *points = NULL; vtkPoints *points;
vtkDataArray *normals = NULL; vtkDataArray *normals = NULL;
vtkDataArray *tcoords = NULL; vtkDataArray *tcoords;
int i, i1, i2, idNext; int i, i1, i2, idNext;
vtkProperty *prop; vtkProperty *prop;
double *tempd; double *tempd;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "vtkTriangleStrip.h" #include "vtkTriangleStrip.h"
#include "vtkVersion.h" #include "vtkVersion.h"
vtkCxxRevisionMacro(vtkOOGLExporter, "1.30"); vtkCxxRevisionMacro(vtkOOGLExporter, "1.31");
vtkStandardNewMacro(vtkOOGLExporter); vtkStandardNewMacro(vtkOOGLExporter);
vtkOOGLExporter::vtkOOGLExporter() vtkOOGLExporter::vtkOOGLExporter()
...@@ -272,7 +272,7 @@ void vtkOOGLExporter::WriteAnActor(vtkActor *anActor, FILE *fp, int count) ...@@ -272,7 +272,7 @@ void vtkOOGLExporter::WriteAnActor(vtkActor *anActor, FILE *fp, int count)
vtkDataSet *ds; vtkDataSet *ds;
vtkPolyData *pd; vtkPolyData *pd;
vtkGeometryFilter *gf = NULL; vtkGeometryFilter *gf = NULL;
vtkPoints *points = NULL; vtkPoints *points;
int i; int i;
vtkProperty *prop; vtkProperty *prop;
static double defcolor[3] = { 1.0, 1.0, 1.0 }; static double defcolor[3] = { 1.0, 1.0, 1.0 };
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <limits.h> #include <limits.h>
#ifndef VTK_IMPLEMENT_MESA_CXX #ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(vtkOpenGLImageMapper, "1.57"); vtkCxxRevisionMacro(vtkOpenGLImageMapper, "1.58");
vtkStandardNewMacro(vtkOpenGLImageMapper); vtkStandardNewMacro(vtkOpenGLImageMapper);
#endif #endif
...@@ -126,7 +126,7 @@ void vtkOpenGLImageMapperRender(vtkOpenGLImageMapper *self, vtkImageData *data, ...@@ -126,7 +126,7 @@ void vtkOpenGLImageMapperRender(vtkOpenGLImageMapper *self, vtkImageData *data,
T *inPtr = (T *)dataPtr; T *inPtr = (T *)dataPtr;
T *inPtr1 = inPtr; T *inPtr1 = inPtr;
int i = width; int i;
int j = height; int j = height;
unsigned char *newPtr; unsigned char *newPtr;
...@@ -273,7 +273,7 @@ void vtkOpenGLImageMapperRenderShort(vtkOpenGLImageMapper *self, vtkImageData *d ...@@ -273,7 +273,7 @@ void vtkOpenGLImageMapperRenderShort(vtkOpenGLImageMapper *self, vtkImageData *d
T *inPtr = (T *)dataPtr; T *inPtr = (T *)dataPtr;
T *inPtr1 = inPtr; T *inPtr1 = inPtr;
int i = width; int i;
int j = height; int j = height;
unsigned char *newPtr; unsigned char *newPtr;
...@@ -421,7 +421,7 @@ void vtkOpenGLImageMapperRenderChar(vtkOpenGLImageMapper *self, vtkImageData *da ...@@ -421,7 +421,7 @@ void vtkOpenGLImageMapperRenderChar(vtkOpenGLImageMapper *self, vtkImageData *da
T *inPtr1 = inPtr; T *inPtr1 = inPtr;
unsigned char tmp; unsigned char tmp;
int i = width; int i;
int j = height; int j = height;
unsigned char *newPtr; unsigned char *newPtr;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#ifndef VTK_IMPLEMENT_MESA_CXX #ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(vtkOpenGLPolyDataMapper, "1.98"); vtkCxxRevisionMacro(vtkOpenGLPolyDataMapper, "1.99");
vtkStandardNewMacro(vtkOpenGLPolyDataMapper); vtkStandardNewMacro(vtkOpenGLPolyDataMapper);
#endif #endif
...@@ -1460,7 +1460,7 @@ void vtkOpenGLPolyDataMapperDrawTStripLines(int idx, ...@@ -1460,7 +1460,7 @@ void vtkOpenGLPolyDataMapperDrawTStripLines(int idx,
default: default:
{ {
int j; int j;
vtkIdType nPts = 0; vtkIdType nPts;
int count = 0; int count = 0;
for (ca->InitTraversal(); noAbort && ca->GetNextCell(nPts,ptIds); for (ca->InitTraversal(); noAbort && ca->GetNextCell(nPts,ptIds);
count++) count++)
...@@ -1604,7 +1604,7 @@ int vtkOpenGLPolyDataMapper::Draw(vtkRenderer *aren, vtkActor *act) ...@@ -1604,7 +1604,7 @@ int vtkOpenGLPolyDataMapper::Draw(vtkRenderer *aren, vtkActor *act)
vtkPolyData *input = this->GetInput(); vtkPolyData *input = this->GetInput();
int cellScalars = 0; int cellScalars = 0;
vtkIdType cellNum = 0; vtkIdType cellNum = 0;
int cellNormals = 0; int cellNormals;
int resolve=0, zResolve=0; int resolve=0, zResolve=0;
double zRes = 0.0; double zRes = 0.0;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "vtkUnsignedCharArray.h" #include "vtkUnsignedCharArray.h"
#ifndef VTK_IMPLEMENT_MESA_CXX #ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(vtkOpenGLRenderWindow, "1.66"); vtkCxxRevisionMacro(vtkOpenGLRenderWindow, "1.67");
#endif #endif
#define MAX_LIGHTS 8 #define MAX_LIGHTS 8
...@@ -207,8 +207,8 @@ unsigned char* vtkOpenGLRenderWindow::GetPixelData(int x1, int y1, ...@@ -207,8 +207,8 @@ unsigned char* vtkOpenGLRenderWindow::GetPixelData(int x1, int y1,
x_hi = x1; x_hi = x1;
} }
unsigned char *data = NULL; unsigned char *data =
data = new unsigned char[(x_hi - x_low + 1)*(y_hi - y_low + 1)*3]; new unsigned char[(x_hi - x_low + 1)*(y_hi - y_low + 1)*3];
this->GetPixelData(x1, y1, x2, y2, front, data); this->GetPixelData(x1, y1, x2, y2, front, data);
return data; return data;
} }
...@@ -1172,7 +1172,7 @@ int vtkOpenGLRenderWindow::GetZbufferData( int x1, int y1, int x2, int y2, ...@@ -1172,7 +1172,7 @@ int vtkOpenGLRenderWindow::GetZbufferData( int x1, int y1, int x2, int y2,
float *vtkOpenGLRenderWindow::GetZbufferData( int x1, int y1, int x2, int y2 ) float *vtkOpenGLRenderWindow::GetZbufferData( int x1, int y1, int x2, int y2 )
{ {
float *z_data = NULL; float *z_data;
int width, height; int width, height;
width = abs(x2 - x1)+1; width = abs(x2 - x1)+1;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "vtkTimerLog.h" #include "vtkTimerLog.h"
#include "vtkVolume.h" #include "vtkVolume.h"
vtkCxxRevisionMacro(vtkRenderer, "1.208"); vtkCxxRevisionMacro(vtkRenderer, "1.209");
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro. // Needed when we don't use the vtkStandardNewMacro.
...@@ -217,7 +217,7 @@ void vtkRenderer::Render(void) ...@@ -217,7 +217,7 @@ void vtkRenderer::Render(void)
this->PropArrayCount = 0; this->PropArrayCount = 0;
vtkCollectionSimpleIterator pit; vtkCollectionSimpleIterator pit;
for ( i = 0, this->Props->InitTraversal(pit); for ( this->Props->InitTraversal(pit);
(aProp = this->Props->GetNextProp(pit));i++ ) (aProp = this->Props->GetNextProp(pit));i++ )
{ {
if ( aProp->GetVisibility() ) if ( aProp->GetVisibility() )
...@@ -621,7 +621,6 @@ void vtkRenderer::CreateLight(void) ...@@ -621,7 +621,6 @@ void vtkRenderer::CreateLight(void)
this->CreatedLight->Register(this); this->CreatedLight->Register(this);
this->AddLight(this->CreatedLight); this->AddLight(this->CreatedLight);
l->Delete(); l->Delete();
l = NULL;
this->CreatedLight->SetLightTypeToHeadlight(); this->CreatedLight->SetLightTypeToHeadlight();
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <sys/stat.h> #include <sys/stat.h>
vtkStandardNewMacro(vtkTesting); vtkStandardNewMacro(vtkTesting);
vtkCxxRevisionMacro(vtkTesting, "1.18"); vtkCxxRevisionMacro(vtkTesting, "1.19");
vtkCxxSetObjectMacro(vtkTesting, RenderWindow, vtkRenderWindow); vtkCxxSetObjectMacro(vtkTesting, RenderWindow, vtkRenderWindow);
// Function returning either a command line argument, an environment variable // Function returning either a command line argument, an environment variable
...@@ -52,7 +52,7 @@ char* vtkTestUtilitiesGetArgOrEnvOrDefault(const char* arg, ...@@ -52,7 +52,7 @@ char* vtkTestUtilitiesGetArgOrEnvOrDefault(const char* arg,
} }
} }
char* value = 0; char* value;
if (index != -1) if (index != -1)
{ {
...@@ -90,7 +90,7 @@ char* vtkTestUtilitiesExpandFileNameWithArgOrEnvOrDefault(const char* arg, ...@@ -90,7 +90,7 @@ char* vtkTestUtilitiesExpandFileNameWithArgOrEnvOrDefault(const char* arg,
const char* fname, const char* fname,
int slash) int slash)
{ {
char* fullName = 0; char* fullName;
char* value = vtkTestUtilitiesGetArgOrEnvOrDefault(arg, argc, argv, char* value = vtkTestUtilitiesGetArgOrEnvOrDefault(arg, argc, argv,
env, def); env, def);
...@@ -511,7 +511,7 @@ int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os) ...@@ -511,7 +511,7 @@ int vtkTesting::RegressionTest(vtkImageData* image, double thresh, ostream& os)
// If the test failed with the first image (foo.png) check if there are // If the test failed with the first image (foo.png) check if there are
// images of the form foo_N.png (where N=1,2,3...) and compare against // images of the form foo_N.png (where N=1,2,3...) and compare against
// them. // them.
double error=0; double error;
int count=1, errIndex=-1; int count=1, errIndex=-1;
char* newFileName; char* newFileName;
while (!passed) while (!passed)
......
...@@ -330,8 +330,7 @@ extern "C" ...@@ -330,8 +330,7 @@ extern "C"
if (self->ImageViewer) if (self->ImageViewer)
{ {
int netRefCount = 0; int netRefCount = self->ImageViewer->GetReferenceCount();
netRefCount = self->ImageViewer->GetReferenceCount();
if (self->ImageViewer->GetRenderWindow()->GetInteractor() && if (self->ImageViewer->GetRenderWindow()->GetInteractor() &&
self->ImageViewer->GetRenderWindow()->GetInteractor()->GetRenderWindow() == self->ImageViewer->GetRenderWindow() && self->ImageViewer->GetRenderWindow()->GetInteractor()->GetRenderWindow() == self->ImageViewer->GetRenderWindow() &&
self->ImageViewer->GetRenderWindow()->GetInteractor()->GetReferenceCount() == 1) self->ImageViewer->GetRenderWindow()->GetInteractor()->GetReferenceCount() == 1)
...@@ -565,8 +564,7 @@ static int vtkTkImageViewerWidget_MakeImageViewer(struct vtkTkImageViewerWidget ...@@ -565,8 +564,7 @@ static int vtkTkImageViewerWidget_MakeImageViewer(struct vtkTkImageViewerWidget
if (self->IV[0] == '\0') if (self->IV[0] == '\0')
{ {
// Make the ImageViewer window. // Make the ImageViewer window.
self->ImageViewer = vtkImageViewer::New(); self->ImageViewer = ImageViewer = vtkImageViewer::New();
ImageViewer = (vtkImageViewer *)(self->ImageViewer);
#ifndef VTK_PYTHON_BUILD #ifndef VTK_PYTHON_BUILD
vtkTclGetObjectFromPointer(self->Interp, self->ImageViewer, vtkTclGetObjectFromPointer(self->Interp, self->ImageViewer,
vtkImageViewerCommand); vtkImageViewerCommand);
......
...@@ -133,7 +133,7 @@ extern "C" { ...@@ -133,7 +133,7 @@ extern "C" {
char **argv) char **argv)
{ {
int status = 0; int status = 0;
vtkImageData* image = NULL; vtkImageData* image;
Tk_PhotoHandle photo; Tk_PhotoHandle photo;
int slice = 0; int slice = 0;
double window = 256.0; double window = 256.0;
...@@ -610,8 +610,7 @@ extern "C" ...@@ -610,8 +610,7 @@ extern "C"
if (self->RenderWindow) if (self->RenderWindow)
{ {
int netRefCount = 0; int netRefCount = self->RenderWindow->GetReferenceCount();
netRefCount = self->RenderWindow->GetReferenceCount();
if (self->RenderWindow->GetInteractor() && if (self->RenderWindow->GetInteractor() &&
self->RenderWindow->GetInteractor()->GetRenderWindow() == self->RenderWindow && self->RenderWindow->GetInteractor()->GetRenderWindow() == self->RenderWindow &&
self->RenderWindow->GetInteractor()->GetReferenceCount() == 1) self->RenderWindow->GetInteractor()->GetReferenceCount() == 1)
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "vtkVolumeProperty.h" #include "vtkVolumeProperty.h"
#include "vtkUnstructuredGridVolumeRayCastIterator.h" #include "vtkUnstructuredGridVolumeRayCastIterator.h"
vtkCxxRevisionMacro(vtkUnstructuredGridBunykRayCastFunction, "1.31"); vtkCxxRevisionMacro(vtkUnstructuredGridBunykRayCastFunction, "1.32");
vtkStandardNewMacro(vtkUnstructuredGridBunykRayCastFunction); vtkStandardNewMacro(vtkUnstructuredGridBunykRayCastFunction);
#define VTK_BUNYKRCF_NUMLISTS 100000 #define VTK_BUNYKRCF_NUMLISTS 100000
...@@ -96,7 +96,7 @@ private: ...@@ -96,7 +96,7 @@ private:
void operator=(const vtkUnstructuredGridBunykRayCastIterator&); // Not implemented void operator=(const vtkUnstructuredGridBunykRayCastIterator&); // Not implemented
}; };
vtkCxxRevisionMacro(vtkUnstructuredGridBunykRayCastIterator, "1.31"); vtkCxxRevisionMacro(vtkUnstructuredGridBunykRayCastIterator, "1.32");
vtkStandardNewMacro(vtkUnstructuredGridBunykRayCastIterator); vtkStandardNewMacro(vtkUnstructuredGridBunykRayCastIterator);
vtkUnstructuredGridBunykRayCastIterator::vtkUnstructuredGridBunykRayCastIterator() vtkUnstructuredGridBunykRayCastIterator::vtkUnstructuredGridBunykRayCastIterator()
...@@ -566,8 +566,6 @@ void vtkUnstructuredGridBunykRayCastFunction::UpdateTriangleList() ...@@ -566,8 +566,6 @@ void vtkUnstructuredGridBunykRayCastFunction::UpdateTriangleList()
// Provide a warning if we find anything other than tetra // Provide a warning if we find anything other than tetra
int warningNeeded = 0; int warningNeeded = 0;
int searchCount = 0;
// Create a set of links from each tetra to the four triangles // Create a set of links from each tetra to the four triangles
// This is redundant information, but saves time during rendering // This is redundant information, but saves time during rendering
this->TetraTriangles = new Triangle *[4 * numCells]; this->TetraTriangles = new Triangle *[4 * numCells];
...@@ -629,7 +627,6 @@ void vtkUnstructuredGridBunykRayCastFunction::UpdateTriangleList() ...@@ -629,7 +627,6 @@ void vtkUnstructuredGridBunykRayCastFunction::UpdateTriangleList()
Triangle *triPtr = tmpList[tri[0]%VTK_BUNYKRCF_NUMLISTS]; Triangle *triPtr = tmpList[tri[0]%VTK_BUNYKRCF_NUMLISTS];
while ( triPtr ) while ( triPtr )
{ {
searchCount++;
if ( triPtr->PointIndex[0] == tri[0] && if ( triPtr->PointIndex[0] == tri[0] &&
triPtr->PointIndex[1] == tri[1] && triPtr->PointIndex[1] == tri[1] &&
triPtr->PointIndex[2] == tri[2] ) triPtr->PointIndex[2] == tri[2] )
...@@ -752,21 +749,11 @@ void vtkUnstructuredGridBunykRayCastFunction::ComputeViewDependentInfo() ...@@ -752,21 +749,11 @@ void vtkUnstructuredGridBunykRayCastFunction::ComputeViewDependentInfo()
void vtkUnstructuredGridBunykRayCastFunction::ComputePixelIntersections() void vtkUnstructuredGridBunykRayCastFunction::ComputePixelIntersections()
{ {
int numExterior = 0;
int numInterior = 0;
Triangle *triPtr = this->TriangleList; Triangle *triPtr = this->TriangleList;
while ( triPtr ) while ( triPtr )
{ {
if ( triPtr->ReferredByTetra[1] != -1 )
{
numInterior++;
}
if ( triPtr->ReferredByTetra[1] == -1 ) if ( triPtr->ReferredByTetra[1] == -1 )
{ {
numExterior++;
if ( this->IsTriangleFrontFacing( triPtr, triPtr->ReferredByTetra[0] ) ) if ( this->IsTriangleFrontFacing( triPtr, triPtr->ReferredByTetra[0] ) )
{ {
int minX = static_cast<int>(this->Points[3*triPtr->PointIndex[0]]); int minX = static_cast<int>(this->Points[3*triPtr->PointIndex[0]]);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "vtkTexture.h" #include "vtkTexture.h"
#include "vtkTransform.h" #include "vtkTransform.h"
vtkCxxRevisionMacro(vtkVRMLExporter, "1.78"); vtkCxxRevisionMacro(vtkVRMLExporter, "1.79");
vtkStandardNewMacro(vtkVRMLExporter); vtkStandardNewMacro(vtkVRMLExporter);