Commit d26e417d authored by Francois Bertel's avatar Francois Bertel

COMP:Fixed some old style casts.

parent c88a6e47
......@@ -78,7 +78,7 @@ int expCos( int argc, char *argv[] )
for (i=0; i<numPts; i++)
{
input->GetPoint(i,x);
r = sqrt((double)x[0]*x[0] + x[1]*x[1]);
r = sqrt(static_cast<double>(x[0]*x[0]) + x[1]*x[1]);
x[2] = exp(-r) * cos (10.0*r);
newPts->SetPoint(i,x);
deriv = -exp(-r) * (cos(10.0*r) + 10.0*sin(10.0*r));
......
......@@ -61,7 +61,8 @@ static void EndPick(vtkObject *vtkNotUsed( caller ),
double y1 = renderer->GetPickY2();
sel->SetRenderPasses(0,1,0,1,1);
sel->SetArea((int)x0,(int)y0,(int)x1,(int)y1);
sel->SetArea(static_cast<int>(x0),static_cast<int>(y0),static_cast<int>(x1),
static_cast<int>(y1));
sel->Select();
vtkSelection *res = vtkSelection::New();
sel->GetSelectedIds(res);
......@@ -180,7 +181,7 @@ int TestAreaSelections(int argc, char* argv[])
//pass pick events to the VisibleCellSelector
vtkCallbackCommand *cbc = vtkCallbackCommand::New();
cbc->SetCallback(EndPick);
cbc->SetClientData((void *)renderer);
cbc->SetClientData(renderer);
rwi->AddObserver(vtkCommand::EndPickEvent,cbc);
cbc->Delete();
......
......@@ -43,7 +43,7 @@ public:
{
if (vtkCommand::TimerEvent == eventId)
{
int tid = * (int *) callData;
int tid = * static_cast<int *>(callData);
if (tid == this->ReallyFastTimerId)
{
......@@ -66,7 +66,7 @@ public:
n = 20 - n;
}
double f = (double) n / 10.0;
double f = static_cast<double>(n) / 10.0;
vtkRenderer *renderer = iren->GetRenderWindow()->GetRenderers()->GetFirstRenderer();
if (renderer)
......
......@@ -126,7 +126,10 @@ public:
vtkstd::map< vtkProp *, vtkstd::string > m_ActorDescription;
protected:
TestScenePickerCommand() { this->SetActorDescription((vtkActor*)NULL, "None"); }
TestScenePickerCommand()
{
this->SetActorDescription(static_cast<vtkActor*>(NULL), "None");
}
virtual ~TestScenePickerCommand() {}
};
......
......@@ -122,7 +122,7 @@ double VTKBenchmark::BuildTheFractal()
this->TriFilter->GetOutput()->GetNumberOfPolys() << "\n";
cerr << "Average Strip Length: " <<
this->TriFilter->GetOutput()->GetNumberOfPolys()/
(double)this->Stripper->GetOutput()->GetNumberOfStrips() << "\n";
static_cast<double>(this->Stripper->GetOutput()->GetNumberOfStrips()) << "\n";
this->Timer->StopTimer();
......@@ -216,7 +216,8 @@ double VTKBenchmark::DrawTheFractal()
this->Timer->StopTimer();
// compute the M triangles per second
double numTris = (double)this->TriFilter->GetOutput()->GetNumberOfPolys();
double numTris =
static_cast<double>(this->TriFilter->GetOutput()->GetNumberOfPolys());
return 6.0e-6*numTris/this->Timer->GetElapsedTime();
}
......
......@@ -28,7 +28,7 @@
#include <math.h>
#ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(vtkOpenGLTexture, "1.63");
vtkCxxRevisionMacro(vtkOpenGLTexture, "1.64");
vtkStandardNewMacro(vtkOpenGLTexture);
#endif
......@@ -53,7 +53,7 @@ void vtkOpenGLTexture::ReleaseGraphicsResources(vtkWindow *renWin)
{
if (this->Index && renWin)
{
((vtkRenderWindow *) renWin)->MakeCurrent();
static_cast<vtkRenderWindow *>(renWin)->MakeCurrent();
#ifdef GL_VERSION_1_1
// free any textures
if (glIsTexture(this->Index))
......@@ -151,8 +151,8 @@ void vtkOpenGLTexture::Load(vtkRenderer *ren)
}
// xsize and ysize must be a power of 2 in OpenGL
xs = (unsigned short)xsize;
ys = (unsigned short)ysize;
xs = static_cast<unsigned short>(xsize);
ys = static_cast<unsigned short>(ysize);
while (!(xs & 0x01))
{
xs = xs >> 1;
......@@ -232,18 +232,18 @@ void vtkOpenGLTexture::Load(vtkRenderer *ren)
// get a unique display list id
#ifdef GL_VERSION_1_1
glGenTextures(1, &tempIndex);
this->Index = (long) tempIndex;
this->Index = static_cast<long>(tempIndex);
glBindTexture(GL_TEXTURE_2D, this->Index);
#else
this->Index = glGenLists(1);
glDeleteLists ((GLuint) this->Index, (GLsizei) 0);
glNewList ((GLuint) this->Index, GL_COMPILE);
glDeleteLists (static_cast<GLuint>(this->Index), static_cast<GLsizei>(0));
glNewList (static_cast<GLuint>(this->Index), GL_COMPILE);
#endif
//seg fault protection for those wackos that don't use an
//opengl render window
if(this->RenderWindow->IsA("vtkOpenGLRenderWindow"))
{
((vtkOpenGLRenderWindow *)(ren->GetRenderWindow()))->
static_cast<vtkOpenGLRenderWindow *>(ren->GetRenderWindow())->
RegisterTextureResource( this->Index );
}
......@@ -302,7 +302,7 @@ void vtkOpenGLTexture::Load(vtkRenderer *ren)
#endif
glTexImage2D( GL_TEXTURE_2D, 0 , internalFormat,
xsize, ysize, 0, format,
GL_UNSIGNED_BYTE, (const GLvoid *)resultData );
GL_UNSIGNED_BYTE, static_cast<const GLvoid *>(resultData) );
#ifndef GL_VERSION_1_1
glEndList ();
#endif
......@@ -325,7 +325,7 @@ void vtkOpenGLTexture::Load(vtkRenderer *ren)
// don't accept fragments if they have zero opacity. this will stop the
// zbuffer from be blocked by totally transparent texture fragments.
glAlphaFunc (GL_GREATER, (GLclampf) 0);
glAlphaFunc (GL_GREATER, static_cast<GLclampf>(0));
glEnable (GL_ALPHA_TEST);
// now bind it
......@@ -381,8 +381,8 @@ unsigned char *vtkOpenGLTexture::ResampleToPowerOfTwo(int &xs, int &ys, unsigned
xsize = FindPowerOfTwo(xs);
ysize = FindPowerOfTwo(ys);
hx = (float)(xs - 1.0) / (xsize - 1.0);
hy = (float)(ys - 1.0) / (ysize - 1.0);
hx = static_cast<float>(xs - 1.0) / (xsize - 1.0);
hy = static_cast<float>(ys - 1.0) / (ysize - 1.0);
tptr = p = new unsigned char[xsize*ysize*bpp];
......@@ -391,7 +391,7 @@ unsigned char *vtkOpenGLTexture::ResampleToPowerOfTwo(int &xs, int &ys, unsigned
{
pcoords[1] = j*hy;
jIdx = (int)pcoords[1];
jIdx = static_cast<int>(pcoords[1]);
if ( jIdx >= (ys-1) ) //make sure to interpolate correctly at edge
{
jIdx = ys - 2;
......@@ -407,7 +407,7 @@ unsigned char *vtkOpenGLTexture::ResampleToPowerOfTwo(int &xs, int &ys, unsigned
for (i=0; i < xsize; i++)
{
pcoords[0] = i*hx;
iIdx = (int)pcoords[0];
iIdx = static_cast<int>(pcoords[0]);
if ( iIdx >= (xs-1) )
{
iIdx = xs - 2;
......@@ -432,7 +432,8 @@ unsigned char *vtkOpenGLTexture::ResampleToPowerOfTwo(int &xs, int &ys, unsigned
w3 = pcoords[0]*pcoords[1];
for (k=0; k < bpp; k++)
{
*p++ = (unsigned char) (p1[k]*w0 + p2[k]*w1 + p3[k]*w2 + p4[k]*w3);
*p++ = static_cast<unsigned char>(p1[k]*w0 + p2[k]*w1 + p3[k]*w2
+ p4[k]*w3);
}
}
}
......
......@@ -36,35 +36,42 @@ class VTK_RENDERING_EXPORT vtkRenderWindowCollection : public vtkCollection
// Description:
// Add a RenderWindow to the list.
void AddItem(vtkRenderWindow *a) {
this->vtkCollection::AddItem((vtkObject *)a);};
void AddItem(vtkRenderWindow *a)
{
this->vtkCollection::AddItem(a);
}
// Description:
// Get the next RenderWindow in the list. Return NULL when at the end of the
// list.
vtkRenderWindow *GetNextItem() {
return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject());};
vtkRenderWindow *GetNextItem()
{
return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject());
}
//BTX
// Description:
// Reentrant safe way to get an object in a collection. Just pass the
// same cookie back and forth.
vtkRenderWindow *GetNextRenderWindow(vtkCollectionSimpleIterator &cookie) {
return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject(cookie));};
vtkRenderWindow *GetNextRenderWindow(vtkCollectionSimpleIterator &cookie)
{
return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject(cookie));
}
//ETX
protected:
vtkRenderWindowCollection() {};
~vtkRenderWindowCollection() {};
vtkRenderWindowCollection() {}
~vtkRenderWindowCollection() {}
private:
// hide the standard AddItem from the user and the compiler.
void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
void AddItem(vtkObject *o)
{
this->vtkCollection::AddItem(o);
}
private:
vtkRenderWindowCollection(const vtkRenderWindowCollection&); // Not implemented.
void operator=(const vtkRenderWindowCollection&); // Not implemented.
};
#endif
......@@ -28,7 +28,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkEncodedGradientShader, "1.3");
vtkCxxRevisionMacro(vtkEncodedGradientShader, "1.4");
vtkStandardNewMacro(vtkEncodedGradientShader);
vtkEncodedGradientShader::vtkEncodedGradientShader()
......@@ -263,10 +263,9 @@ void vtkEncodedGradientShader::UpdateShadingTable( vtkRenderer *ren,
viewDirection[1] = cameraFocalPoint[1] - cameraPosition[1];
viewDirection[2] = cameraFocalPoint[2] - cameraPosition[2];
mag = sqrt( (double)(
viewDirection[0] * viewDirection[0] +
viewDirection[1] * viewDirection[1] +
viewDirection[2] * viewDirection[2] ) );
mag = sqrt(static_cast<double>(viewDirection[0] * viewDirection[0] +
viewDirection[1] * viewDirection[1] +
viewDirection[2] * viewDirection[2] ) );
if ( mag )
{
......@@ -333,9 +332,9 @@ void vtkEncodedGradientShader::UpdateShadingTable( vtkRenderer *ren,
lightDirection[1] = lightFocalPoint[1] - lightPosition[1];
lightDirection[2] = lightFocalPoint[2] - lightPosition[2];
norm = sqrt( (double) ( lightDirection[0] * lightDirection[0] +
lightDirection[1] * lightDirection[1] +
lightDirection[2] * lightDirection[2] ) );
norm = sqrt(static_cast<double>( lightDirection[0] * lightDirection[0] +
lightDirection[1] * lightDirection[1] +
lightDirection[2] * lightDirection[2] ) );
lightDirection[0] /= -norm;
lightDirection[1] /= -norm;
......@@ -413,7 +412,8 @@ void vtkEncodedGradientShader::BuildShadingTable( int index,
half_y = ly - viewDirection[1];
half_z = lz - viewDirection[2];
mag = sqrt( (double)(half_x*half_x + half_y*half_y + half_z*half_z ) );
mag = sqrt( static_cast<double>(half_x*half_x + half_y*half_y
+ half_z*half_z ) );
if( mag != 0.0 )
{
......@@ -546,7 +546,8 @@ void vtkEncodedGradientShader::BuildShadingTable( int index,
if ( n_dot_h > 0.001 )
{
specular_value = Ks_intensity * pow( (double)n_dot_h, (double)Es );
specular_value = Ks_intensity * pow(static_cast<double>(n_dot_h),
static_cast<double>(Es) );
*(ssr_ptr) += specular_value * lightColor[0];
*(ssg_ptr) += specular_value * lightColor[1];
*(ssb_ptr) += specular_value * lightColor[2];
......
......@@ -29,7 +29,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkFixedPointVolumeRayCastCompositeGOHelper, "1.8");
vtkCxxRevisionMacro(vtkFixedPointVolumeRayCastCompositeGOHelper, "1.9");
vtkStandardNewMacro(vtkFixedPointVolumeRayCastCompositeGOHelper);
// Construct a new vtkFixedPointVolumeRayCastCompositeGOHelper with default values
......@@ -779,7 +779,7 @@ void vtkFixedPointVolumeRayCastCompositeGOHelper::GenerateImage( int threadID,
{
vtkTemplateMacro(
vtkFixedPointCompositeGOHelperGenerateImageOneSimpleNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -789,7 +789,7 @@ void vtkFixedPointVolumeRayCastCompositeGOHelper::GenerateImage( int threadID,
{
vtkTemplateMacro(
vtkFixedPointCompositeGOHelperGenerateImageOneNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -801,7 +801,7 @@ void vtkFixedPointVolumeRayCastCompositeGOHelper::GenerateImage( int threadID,
{
vtkTemplateMacro(
vtkFixedPointCompositeGOHelperGenerateImageIndependentNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -816,7 +816,7 @@ void vtkFixedPointVolumeRayCastCompositeGOHelper::GenerateImage( int threadID,
{
vtkTemplateMacro(
vtkFixedPointCompositeGOHelperGenerateImageTwoDependentNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -827,7 +827,8 @@ void vtkFixedPointVolumeRayCastCompositeGOHelper::GenerateImage( int threadID,
if ( scalarType == VTK_UNSIGNED_CHAR )
{
vtkFixedPointCompositeGOHelperGenerateImageFourDependentNN(
static_cast<unsigned char *>(data), threadID, threadCount, mapper, vol );
static_cast<unsigned char *>(data), threadID, threadCount, mapper,
vol );
}
else
{
......@@ -843,13 +844,14 @@ void vtkFixedPointVolumeRayCastCompositeGOHelper::GenerateImage( int threadID,
if ( mapper->GetCurrentScalars()->GetNumberOfComponents() == 1 )
{
// Scale == 1.0 and shift == 0.0 - simple case (faster)
if ( mapper->GetTableScale()[0] == 1.0 && mapper->GetTableShift()[0] == 0.0 )
if ( mapper->GetTableScale()[0] == 1.0 &&
mapper->GetTableShift()[0] == 0.0 )
{
switch ( scalarType )
{
vtkTemplateMacro(
vtkFixedPointCompositeGOHelperGenerateImageOneSimpleTrilin(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -860,7 +862,7 @@ void vtkFixedPointVolumeRayCastCompositeGOHelper::GenerateImage( int threadID,
{
vtkTemplateMacro(
vtkFixedPointCompositeGOHelperGenerateImageOneTrilin(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -872,33 +874,35 @@ void vtkFixedPointVolumeRayCastCompositeGOHelper::GenerateImage( int threadID,
{
vtkTemplateMacro(
vtkFixedPointCompositeGOHelperGenerateImageIndependentTrilin(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
// Dependent components
else
{
// Two components - the first specifies color (through a lookup table) and
// the second specified opacity (through a lookup table)
// Two components - the first specifies color (through a lookup table)
// and the second specified opacity (through a lookup table)
if ( mapper->GetCurrentScalars()->GetNumberOfComponents() == 2 )
{
switch ( scalarType )
{
vtkTemplateMacro(
vtkFixedPointCompositeGOHelperGenerateImageTwoDependentTrilin(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
// Four components - they must be unsigned char, the first three directly
// specify color and the fourth specifies opacity (through a lookup table)
// specify color and the fourth specifies opacity (through a lookup
// table)
else
{
if ( scalarType == VTK_UNSIGNED_CHAR )
{
vtkFixedPointCompositeGOHelperGenerateImageFourDependentTrilin(
static_cast<unsigned char *>(data), threadID, threadCount, mapper, vol );
static_cast<unsigned char *>(data), threadID, threadCount, mapper,
vol );
}
else
{
......
......@@ -29,7 +29,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkFixedPointVolumeRayCastCompositeGOShadeHelper, "1.8");
vtkCxxRevisionMacro(vtkFixedPointVolumeRayCastCompositeGOShadeHelper, "1.9");
vtkStandardNewMacro(vtkFixedPointVolumeRayCastCompositeGOShadeHelper);
// Construct a new vtkFixedPointVolumeRayCastCompositeGOShadeHelper with default values
......@@ -865,13 +865,14 @@ void vtkFixedPointVolumeRayCastCompositeGOShadeHelper::GenerateImage( int thread
if ( mapper->GetCurrentScalars()->GetNumberOfComponents() == 1 )
{
// Scale == 1.0 and shift == 0.0 - simple case (faster)
if ( mapper->GetTableScale()[0] == 1.0 && mapper->GetTableShift()[0] == 0.0 )
if ( mapper->GetTableScale()[0] == 1.0 &&
mapper->GetTableShift()[0] == 0.0 )
{
switch ( scalarType )
{
vtkTemplateMacro(
vtkFixedPointCompositeGOShadeHelperGenerateImageOneSimpleNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -881,7 +882,7 @@ void vtkFixedPointVolumeRayCastCompositeGOShadeHelper::GenerateImage( int thread
{
vtkTemplateMacro(
vtkFixedPointCompositeGOShadeHelperGenerateImageOneNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -893,33 +894,35 @@ void vtkFixedPointVolumeRayCastCompositeGOShadeHelper::GenerateImage( int thread
{
vtkTemplateMacro(
vtkFixedPointCompositeGOShadeHelperGenerateImageIndependentNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
// Dependent (color) components
else
{
// Two components - the first specifies color (through a lookup table) and
// the second specified opacity (through a lookup table)
// Two components - the first specifies color (through a lookup table)
// and the second specified opacity (through a lookup table)
if ( mapper->GetCurrentScalars()->GetNumberOfComponents() == 2 )
{
switch ( scalarType )
{
vtkTemplateMacro(
vtkFixedPointCompositeGOShadeHelperGenerateImageTwoDependentNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
// Four components - they must be unsigned char, the first three directly
// specify color and the fourth specifies opacity (through a lookup table)
// specify color and the fourth specifies opacity (through a lookup
// table)
else
{
if ( scalarType == VTK_UNSIGNED_CHAR )
{
vtkFixedPointCompositeGOShadeHelperGenerateImageFourDependentNN(
static_cast<unsigned char *>(data), threadID, threadCount, mapper, vol );
static_cast<unsigned char *>(data), threadID, threadCount, mapper,
vol );
}
else
{
......@@ -935,13 +938,14 @@ void vtkFixedPointVolumeRayCastCompositeGOShadeHelper::GenerateImage( int thread
if ( mapper->GetCurrentScalars()->GetNumberOfComponents() == 1 )
{
// Scale == 1.0 and shift == 0.0 - simple case (faster)
if ( mapper->GetTableScale()[0] == 1.0 && mapper->GetTableShift()[0] == 0.0 )
if ( mapper->GetTableScale()[0] == 1.0 &&
mapper->GetTableShift()[0] == 0.0 )
{
switch ( scalarType )
{
vtkTemplateMacro(
vtkFixedPointCompositeGOShadeHelperGenerateImageOneSimpleTrilin(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -952,7 +956,7 @@ void vtkFixedPointVolumeRayCastCompositeGOShadeHelper::GenerateImage( int thread
{
vtkTemplateMacro(
vtkFixedPointCompositeGOShadeHelperGenerateImageOneTrilin(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -964,33 +968,35 @@ void vtkFixedPointVolumeRayCastCompositeGOShadeHelper::GenerateImage( int thread
{
vtkTemplateMacro(
vtkFixedPointCompositeGOShadeHelperGenerateImageIndependentTrilin(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
// Dependent components
else
{
// Two components - the first specifies color (through a lookup table) and
// the second specified opacity (through a lookup table)
// Two components - the first specifies color (through a lookup table)
// and the second specified opacity (through a lookup table)
if ( mapper->GetCurrentScalars()->GetNumberOfComponents() == 2 )
{
switch ( scalarType )
{
vtkTemplateMacro(
vtkFixedPointCompositeGOShadeHelperGenerateImageTwoDependentTrilin(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
// Four components - they must be unsigned char, the first three directly
// specify color and the fourth specifies opacity (through a lookup table)
// specify color and the fourth specifies opacity (through a lookup
// table)
else
{
if ( scalarType == VTK_UNSIGNED_CHAR )
{
vtkFixedPointCompositeGOShadeHelperGenerateImageFourDependentTrilin(
static_cast<unsigned char *>(data), threadID, threadCount, mapper, vol );
static_cast<unsigned char *>(data), threadID, threadCount, mapper,
vol );
}
else
{
......
......@@ -29,7 +29,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkFixedPointVolumeRayCastCompositeHelper, "1.8");
vtkCxxRevisionMacro(vtkFixedPointVolumeRayCastCompositeHelper, "1.9");
vtkStandardNewMacro(vtkFixedPointVolumeRayCastCompositeHelper);
// Construct a new vtkFixedPointVolumeRayCastCompositeHelper with default values
......@@ -628,10 +628,11 @@ void vtkFixedPointCompositeHelperGenerateImageIndependentTrilin( T *data,
}
void vtkFixedPointVolumeRayCastCompositeHelper::GenerateImage( int threadID,
int threadCount,
vtkVolume *vol,
vtkFixedPointVolumeRayCastMapper *mapper )
void vtkFixedPointVolumeRayCastCompositeHelper::GenerateImage(
int threadID,
int threadCount,
vtkVolume *vol,
vtkFixedPointVolumeRayCastMapper *mapper )
{
void *data = mapper->GetCurrentScalars()->GetVoidPointer(0);
int scalarType = mapper->GetCurrentScalars()->GetDataType();
......@@ -643,13 +644,14 @@ void vtkFixedPointVolumeRayCastCompositeHelper::GenerateImage( int threadID,
if ( mapper->GetCurrentScalars()->GetNumberOfComponents() == 1 )
{
// Scale == 1.0 and shift == 0.0 - simple case (faster)
if ( mapper->GetTableScale()[0] == 1.0 && mapper->GetTableShift()[0] == 0.0 )
if ( mapper->GetTableScale()[0] == 1.0 &&
mapper->GetTableShift()[0] == 0.0 )
{
switch ( scalarType )
{
vtkTemplateMacro(
vtkFixedPointCompositeHelperGenerateImageOneSimpleNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -659,7 +661,7 @@ void vtkFixedPointVolumeRayCastCompositeHelper::GenerateImage( int threadID,
{
vtkTemplateMacro(
vtkFixedPointCompositeHelperGenerateImageOneNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
......@@ -671,33 +673,35 @@ void vtkFixedPointVolumeRayCastCompositeHelper::GenerateImage( int threadID,
{
vtkTemplateMacro(
vtkFixedPointCompositeHelperGenerateImageIndependentNN(
(VTK_TT *)(data),
static_cast<VTK_TT *>(data),
threadID, threadCount, mapper, vol) );
}
}
// Dependent (color) components