Gitlab updates will be applied at 1:30pm, (17:30 UTC), today. No downtime expected.

Commit 40c23765 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot

Merge topic 'fix-use-of-argparse-fallback' into pv-master

126c53df Merge topic 'fix-use-of-argparse-fallback' into master
3575612f Merge topic 'unused-warnings' into master
2abb6bc8 Merge topic 'lic2' into master
aaf7c19c Rebased and merged due to conflicts
566dc51f Fix how we import our argparse fallback implementation.
433f9f20 Merge topic 'timing_test_sample_distance' into master
1fbeb5b9 Merge topic '15353-add-TDX_INCLUDE_DIR' into master
b570910e Merge topic 'empty-text' into master
fec981bf Add back in LIC for OpenGL2
afde5294 Merge topic 'minor_fix' into master
e96f816b Remove window size change
498b0781 Merge topic 'volume_cropping_bug' into master
211a428a Merge topic 'particlepath_fix' into master
929c87e7 Fix volume cropping issue
6497141b Added test with shading
b5ec065e Merge remote-tracking branch 'pvvtk/pv-master' into HEAD
...
parents 7232a4a4 126c53df
......@@ -174,11 +174,11 @@ void vtkOpenGLStickMapper::ReplaceShaderValues(std::string &VSSource,
"//VTK::Picking::Impl",
"if (mapperIndex == vec3(0.0,0.0,0.0))\n"
" {\n"
" gl_FragColor = vec4(selectionIdFrag.rgb, 1.0);\n"
" gl_FragData[0] = vec4(selectionIdFrag.rgb, 1.0);\n"
" }\n"
" else\n"
" {\n"
" gl_FragColor = vec4(mapperIndex,1.0);\n"
" gl_FragData[0] = vec4(mapperIndex,1.0);\n"
" }"
);
}
......
......@@ -144,17 +144,24 @@ void vtkCachingInterpolatedVelocityField::SetDataSet(int I, vtkDataSet* dataset,
void vtkCachingInterpolatedVelocityField::SetLastCellInfo(vtkIdType c, int datasetindex)
{
if ((this->LastCacheIndex != datasetindex) || (this->LastCellId != c))
{
{
this->LastCacheIndex = datasetindex;
this->Cache = &this->CacheList[this->LastCacheIndex];
this->LastCellId = c;
// if the dataset changes, then the cached cell is invalidated
// we might as well prefetch the new cached cell - we'll need it on the next test anyway
if (this->LastCellId!=-1)
{
this->Cache->DataSet->GetCell(this->LastCellId, this->Cache->Cell);
{
if(c < this->Cache->DataSet->GetNumberOfCells())
{
this->Cache->DataSet->GetCell(this->LastCellId, this->Cache->Cell);
}
else
{
this->LastCellId = -1;
}
}
}
}
}
//---------------------------------------------------------------------------
void vtkCachingInterpolatedVelocityField::ClearLastCellInfo() {
......
......@@ -1143,7 +1143,7 @@ void vtkParticleTracerBase::IntegrateParticle(
{
if(previous.PointId <0)
{
vtkWarningMacro("the particle should have been added");
vtkDebugMacro("the particle should have been added");
}
else
{
......
......@@ -323,110 +323,6 @@ void vtkOOGLExporter::WriteAnActor(vtkActor *anActor, FILE *fp, int count)
// Get the material properties
prop = anActor->GetProperty();
// is there a texture map (for the moment, we don't deal with textures)
if ( 1 == 2 /*anActor->GetTexture()*/)
{
vtkTexture *aTexture = anActor->GetTexture();
int *size, xsize, ysize, bpp;
vtkDataArray *scalars;
vtkUnsignedCharArray *mappedScalars;
unsigned char *txtrData;
int totalValues;
// make sure it is updated and then get some info
if (aTexture->GetInput() == NULL)
{
vtkErrorMacro(<< "texture has no input!\n");
return;
}
aTexture->GetInputAlgorithm()->Update();
size = aTexture->GetInput()->GetDimensions();
scalars = aTexture->GetInput()->GetPointData()->GetScalars();
// make sure scalars are non null
if (!scalars)
{
vtkErrorMacro(<< "No scalar values found for texture input!\n");
return;
}
// make sure using unsigned char data of color scalars type
if (aTexture->GetMapColorScalarsThroughLookupTable () ||
(scalars->GetDataType() != VTK_UNSIGNED_CHAR) )
{
mappedScalars = aTexture->GetMappedScalars ();
}
else
{
mappedScalars = static_cast<vtkUnsignedCharArray*>(scalars);
}
// we only support 2d texture maps right now
// so one of the three sizes must be 1, but it
// could be any of them, so lets find it
if (size[0] == 1)
{
xsize = size[1]; ysize = size[2];
}
else
{
xsize = size[0];
if (size[1] == 1)
{
ysize = size[2];
}
else
{
ysize = size[1];
if (size[2] != 1)
{
vtkErrorMacro(<< "3D texture maps currently are not supported!\n");
return;
}
}
}
fprintf(fp, "%sTexture2 {\n", indent);
VTK_INDENT_MORE;
bpp = mappedScalars->GetNumberOfComponents();
fprintf(fp, "%simage %d %d %d\n", indent, xsize, ysize, bpp);
VTK_INDENT_MORE;
txtrData = static_cast<vtkUnsignedCharArray *>(mappedScalars)->GetPointer(0);
totalValues = xsize*ysize;
fprintf(fp,"%s",indent);
for (i = 0; i < totalValues; i++)
{
fprintf(fp,"%.2x",*txtrData);
txtrData++;
if (bpp > 1)
{
fprintf(fp,"%.2x",*txtrData);
txtrData++;
}
if (bpp > 2)
{
fprintf(fp,"%.2x",*txtrData);
txtrData++;
}
if (bpp > 3)
{
fprintf(fp,"%.2x",*txtrData);
txtrData++;
}
if (i%8 == 0)
{
fprintf(fp,"\n%s ", indent);
}
else
{
fprintf(fp," ");
}
}
VTK_INDENT_LESS;
fprintf(fp, "%s}\n", indent);
VTK_INDENT_LESS;
}
// start an INST object
fprintf(fp, "%s{ INST\n", indent);
......
......@@ -846,25 +846,9 @@ void vtkAVSucdReader::ReadNodeData(vtkUnstructuredGrid *output)
scalars->SetNumberOfTuples(this->NumberOfNodes);
scalars->SetName(PointDataArraySelection->GetArrayName(i));
this->FileStream->seekg(this->NodeDataInfo[i].foffset, ios::beg);
if(1) // this->NodeDataInfo[i].veclen == 1)
{
ptr = scalars->GetPointer(0);
this->ReadFloatBlock(this->NumberOfNodes *
this->NodeDataInfo[i].veclen, ptr);
}
else
{
ptr = new float[this->NodeDataInfo[i].veclen];
for(n=0; n < this->NumberOfNodes; n++)
{
this->ReadFloatBlock(this->NodeDataInfo[i].veclen, ptr);
for(j=0; j < this->NodeDataInfo[i].veclen; j++)
{
scalars->SetComponent(n, j, ptr[j]);
}
}
delete [] ptr;
}
ptr = scalars->GetPointer(0);
this->ReadFloatBlock(this->NumberOfNodes *
this->NodeDataInfo[i].veclen, ptr);
output->GetPointData()->AddArray(scalars);
if (!output->GetPointData()->GetScalars())
......@@ -957,29 +941,9 @@ void vtkAVSucdReader::ReadCellData(vtkUnstructuredGrid *output)
scalars->SetNumberOfTuples(this->NumberOfCells);
scalars->SetName(CellDataArraySelection->GetArrayName(i));
this->FileStream->seekg(this->CellDataInfo[i].foffset, ios::beg);
if(1) // this->CellDataInfo[i].veclen == 1)
{
ptr = scalars->GetPointer(0);
this->ReadFloatBlock(this->NumberOfCells *
this->CellDataInfo[i].veclen, ptr);
}
else
{
ptr = new float[this->NumberOfCells];
for(j=0; j < this->CellDataInfo[i].veclen; j++)
{
this->FileStream->seekg(this->CellDataInfo[i].foffset +
j*this->NumberOfCells,
ios::beg);
this->ReadFloatBlock(this->NumberOfCells, ptr);
for(n=0; n < this->NumberOfCells; n++)
{
scalars->SetComponent(n, j, ptr[n]);
}
}
delete [] ptr;
}
ptr = scalars->GetPointer(0);
this->ReadFloatBlock(this->NumberOfCells *
this->CellDataInfo[i].veclen, ptr);
output->GetCellData()->AddArray(scalars);
if (!output->GetCellData()->GetScalars())
......
......@@ -18,7 +18,7 @@ except ImportError:
try:
import argparse
except ImportError:
import _argparse as argparse
from vtk.util import _argparse as argparse
from vtk.test import Testing
......
......@@ -376,141 +376,92 @@ void vtkResliceCursor::BuildPolyData()
vtkSmartPointer< vtkCellArray > lines
= vtkSmartPointer< vtkCellArray >::New();
if (1)
{
// Precompute the half thickness prior to use within the loop.
const double ht[3] = { this->Thickness[0] / 2.0,
this->Thickness[1] / 2.0,
this->Thickness[2] / 2.0 };
points->Allocate(24);
lines->Allocate(lines->Allocate(lines->EstimateSize(18,4)));
double pts[30][3];
for (int i = 0; i < 3; i++)
{
pts[0][i] = this->Center[i] - pdLength * this->XAxis[i];
pts[1][i] = this->Center[i] + pdLength * this->XAxis[i];
pts[2][i] = pts[0][i] - ht[1] * this->YAxis[i] - ht[2] * this->ZAxis[i];
pts[3][i] = pts[1][i] - ht[1] * this->YAxis[i] - ht[2] * this->ZAxis[i];
pts[4][i] = pts[0][i] + ht[1] * this->YAxis[i] - ht[2] * this->ZAxis[i];
pts[5][i] = pts[1][i] + ht[1] * this->YAxis[i] - ht[2] * this->ZAxis[i];
pts[6][i] = pts[0][i] + ht[1] * this->YAxis[i] + ht[2] * this->ZAxis[i];
pts[7][i] = pts[1][i] + ht[1] * this->YAxis[i] + ht[2] * this->ZAxis[i];
pts[8][i] = pts[0][i] - ht[1] * this->YAxis[i] + ht[2] * this->ZAxis[i];
pts[9][i] = pts[1][i] - ht[1] * this->YAxis[i] + ht[2] * this->ZAxis[i];
pts[10][i] = this->Center[i] - pdLength * this->YAxis[i];
pts[11][i] = this->Center[i] + pdLength * this->YAxis[i];
pts[12][i] = pts[10][i] - ht[0] * this->XAxis[i] - ht[2] * this->ZAxis[i];
pts[13][i] = pts[11][i] - ht[0] * this->XAxis[i] - ht[2] * this->ZAxis[i];
pts[14][i] = pts[10][i] + ht[0] * this->XAxis[i] - ht[2] * this->ZAxis[i];
pts[15][i] = pts[11][i] + ht[0] * this->XAxis[i] - ht[2] * this->ZAxis[i];
pts[16][i] = pts[10][i] + ht[0] * this->XAxis[i] + ht[2] * this->ZAxis[i];
pts[17][i] = pts[11][i] + ht[0] * this->XAxis[i] + ht[2] * this->ZAxis[i];
pts[18][i] = pts[10][i] - ht[0] * this->XAxis[i] + ht[2] * this->ZAxis[i];
pts[19][i] = pts[11][i] - ht[0] * this->XAxis[i] + ht[2] * this->ZAxis[i];
pts[20][i] = this->Center[i] - pdLength * this->ZAxis[i];
pts[21][i] = this->Center[i] + pdLength * this->ZAxis[i];
pts[22][i] = pts[20][i] - ht[1] * this->YAxis[i] - ht[0] * this->XAxis[i];
pts[23][i] = pts[21][i] - ht[1] * this->YAxis[i] - ht[0] * this->XAxis[i];
pts[24][i] = pts[20][i] + ht[1] * this->YAxis[i] - ht[0] * this->XAxis[i];
pts[25][i] = pts[21][i] + ht[1] * this->YAxis[i] - ht[0] * this->XAxis[i];
pts[26][i] = pts[20][i] + ht[1] * this->YAxis[i] + ht[0] * this->XAxis[i];
pts[27][i] = pts[21][i] + ht[1] * this->YAxis[i] + ht[0] * this->XAxis[i];
pts[28][i] = pts[20][i] - ht[1] * this->YAxis[i] + ht[0] * this->XAxis[i];
pts[29][i] = pts[21][i] - ht[1] * this->YAxis[i] + ht[0] * this->XAxis[i];
}
vtkIdType ptIds[2];
// Precompute the half thickness prior to use within the loop.
const double ht[3] = { this->Thickness[0] / 2.0,
this->Thickness[1] / 2.0,
this->Thickness[2] / 2.0 };
vtkIdType facePtIds[6][4] =
{ { 0, 2, 4, 6 }, { 1, 7, 5, 3 }, { 1,3,2,0 }, { 0,6,7,1 }, { 2,3,5,4 }, {6,4,5,7} };
points->Allocate(24);
lines->Allocate(lines->Allocate(lines->EstimateSize(18,4)));
for (int j = 0; j < 3; j++)
{
vtkPoints *centerlinePoints = this->CenterlineAxis[j]->GetPoints();
double pts[30][3];
for (int i = 0; i < 3; i++)
{
pts[0][i] = this->Center[i] - pdLength * this->XAxis[i];
pts[1][i] = this->Center[i] + pdLength * this->XAxis[i];
pts[2][i] = pts[0][i] - ht[1] * this->YAxis[i] - ht[2] * this->ZAxis[i];
pts[3][i] = pts[1][i] - ht[1] * this->YAxis[i] - ht[2] * this->ZAxis[i];
pts[4][i] = pts[0][i] + ht[1] * this->YAxis[i] - ht[2] * this->ZAxis[i];
pts[5][i] = pts[1][i] + ht[1] * this->YAxis[i] - ht[2] * this->ZAxis[i];
pts[6][i] = pts[0][i] + ht[1] * this->YAxis[i] + ht[2] * this->ZAxis[i];
pts[7][i] = pts[1][i] + ht[1] * this->YAxis[i] + ht[2] * this->ZAxis[i];
pts[8][i] = pts[0][i] - ht[1] * this->YAxis[i] + ht[2] * this->ZAxis[i];
pts[9][i] = pts[1][i] - ht[1] * this->YAxis[i] + ht[2] * this->ZAxis[i];
pts[10][i] = this->Center[i] - pdLength * this->YAxis[i];
pts[11][i] = this->Center[i] + pdLength * this->YAxis[i];
pts[12][i] = pts[10][i] - ht[0] * this->XAxis[i] - ht[2] * this->ZAxis[i];
pts[13][i] = pts[11][i] - ht[0] * this->XAxis[i] - ht[2] * this->ZAxis[i];
pts[14][i] = pts[10][i] + ht[0] * this->XAxis[i] - ht[2] * this->ZAxis[i];
pts[15][i] = pts[11][i] + ht[0] * this->XAxis[i] - ht[2] * this->ZAxis[i];
pts[16][i] = pts[10][i] + ht[0] * this->XAxis[i] + ht[2] * this->ZAxis[i];
pts[17][i] = pts[11][i] + ht[0] * this->XAxis[i] + ht[2] * this->ZAxis[i];
pts[18][i] = pts[10][i] - ht[0] * this->XAxis[i] + ht[2] * this->ZAxis[i];
pts[19][i] = pts[11][i] - ht[0] * this->XAxis[i] + ht[2] * this->ZAxis[i];
pts[20][i] = this->Center[i] - pdLength * this->ZAxis[i];
pts[21][i] = this->Center[i] + pdLength * this->ZAxis[i];
pts[22][i] = pts[20][i] - ht[1] * this->YAxis[i] - ht[0] * this->XAxis[i];
pts[23][i] = pts[21][i] - ht[1] * this->YAxis[i] - ht[0] * this->XAxis[i];
pts[24][i] = pts[20][i] + ht[1] * this->YAxis[i] - ht[0] * this->XAxis[i];
pts[25][i] = pts[21][i] + ht[1] * this->YAxis[i] - ht[0] * this->XAxis[i];
pts[26][i] = pts[20][i] + ht[1] * this->YAxis[i] + ht[0] * this->XAxis[i];
pts[27][i] = pts[21][i] + ht[1] * this->YAxis[i] + ht[0] * this->XAxis[i];
pts[28][i] = pts[20][i] - ht[1] * this->YAxis[i] + ht[0] * this->XAxis[i];
pts[29][i] = pts[21][i] - ht[1] * this->YAxis[i] + ht[0] * this->XAxis[i];
}
for (int i = 0; i < 4; i++)
{
ptIds[0] = 10 * j + 2 + 2*i;
ptIds[1] = ptIds[0] + 1;
vtkIdType ptIds[2];
points->InsertNextPoint(pts[ptIds[0]]);
points->InsertNextPoint(pts[ptIds[1]]);
}
vtkIdType facePtIds[6][4] =
{ { 0, 2, 4, 6 }, { 1, 7, 5, 3 }, { 1,3,2,0 }, { 0,6,7,1 }, { 2,3,5,4 }, {6,4,5,7} };
centerlinePoints->SetPoint(0, pts[10*j]);
centerlinePoints->SetPoint(1, pts[10*j+1]);
for (int j = 0; j < 3; j++)
{
vtkSmartPointer< vtkCellArray > slabPolys =
vtkSmartPointer< vtkCellArray >::New();
slabPolys->Allocate(slabPolys->EstimateSize(6,4));
vtkPoints *centerlinePoints = this->CenterlineAxis[j]->GetPoints();
for (int i = 0; i < 6; i++)
{
vtkIdType currFacePtIds[4] = {facePtIds[i][0] + 8*j,
facePtIds[i][1] + 8*j,
facePtIds[i][2] + 8*j,
facePtIds[i][3] + 8*j };
lines->InsertNextCell(4,currFacePtIds);
slabPolys->InsertNextCell(4,facePtIds[i]);
}
for (int i = 0; i < 4; i++)
{
ptIds[0] = 10 * j + 2 + 2*i;
ptIds[1] = ptIds[0] + 1;
this->CenterlineAxis[j]->Modified();
points->InsertNextPoint(pts[ptIds[0]]);
points->InsertNextPoint(pts[ptIds[1]]);
}
this->PolyData->SetPolys(lines);
}
else
{
// Allocate space for 6 points, 3 cells.
points->Allocate(6);
lines->Allocate(lines->Allocate(lines->EstimateSize(3,2)));
// Just 3 cells..
centerlinePoints->SetPoint(0, pts[10*j]);
centerlinePoints->SetPoint(1, pts[10*j+1]);
double pts[6][3];
vtkIdType ptIds[2];
for (int i = 0; i < 3; i++)
{
pts[0][i] = this->Center[i] - pdLength * this->XAxis[i];
pts[1][i] = this->Center[i] + pdLength * this->XAxis[i];
pts[2][i] = this->Center[i] - pdLength * this->YAxis[i];
pts[3][i] = this->Center[i] + pdLength * this->YAxis[i];
pts[4][i] = this->Center[i] - pdLength * this->ZAxis[i];
pts[5][i] = this->Center[i] + pdLength * this->ZAxis[i];
}
vtkSmartPointer< vtkCellArray > slabPolys =
vtkSmartPointer< vtkCellArray >::New();
slabPolys->Allocate(slabPolys->EstimateSize(6,4));
for (int i = 0; i < 6; i++)
{
points->InsertNextPoint(pts[i]);
vtkIdType currFacePtIds[4] = {facePtIds[i][0] + 8*j,
facePtIds[i][1] + 8*j,
facePtIds[i][2] + 8*j,
facePtIds[i][3] + 8*j };
lines->InsertNextCell(4,currFacePtIds);
slabPolys->InsertNextCell(4,facePtIds[i]);
}
ptIds[0] = 0;
ptIds[1] = 1;
lines->InsertNextCell(2, ptIds);
ptIds[0] = 2;
ptIds[1] = 3;
lines->InsertNextCell(2, ptIds);
ptIds[0] = 4;
ptIds[1] = 5;
lines->InsertNextCell(2, ptIds);
for (int i = 0; i < 3; i++)
{
vtkPoints *centerlinePoints = this->CenterlineAxis[i]->GetPoints();
centerlinePoints->SetPoint(2*i, pts[2*i]);
centerlinePoints->SetPoint(2*i+1, pts[2*i+1]);
this->CenterlineAxis[i]->Modified();
}
this->PolyData->SetLines(lines);
this->CenterlineAxis[j]->Modified();
}
this->PolyData->SetPolys(lines);
this->PolyData->SetPoints(points);
this->PolyData->Modified();
......
......@@ -255,14 +255,14 @@ void vtkImageActor::GetDisplayExtent(int extent[6])
// Get the bounds for this Volume as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
double *vtkImageActor::GetDisplayBounds()
{
vtkAlgorithm* inputAlg = this->Mapper->GetInputAlgorithm();
vtkAlgorithm* inputAlg = NULL;
if (this->Mapper)
if (this->Mapper && this->Mapper->GetNumberOfInputConnections(0) > 0)
{
inputAlg = this->Mapper->GetInputAlgorithm();
}
if (!this->Mapper || !inputAlg)
if (!inputAlg)
{
return this->DisplayBounds;
}
......
......@@ -18,6 +18,7 @@
#include "vtkColorSeries.h"
#include "vtkDataArray.h"
#include "vtkDataSet.h"
#include "vtkDoubleArray.h"
#include "vtkExecutive.h"
#include "vtkLookupTable.h"
#include "vtkFloatArray.h"
......@@ -619,9 +620,18 @@ void CreateColorTextureCoordinates(T* input, float* output,
vtkIdType numScalars, int numComps,
int component, double* range,
const double* table_range,
int tableNumberOfColors,
bool use_log_scale)
{
double inv_range_width = 1.0 / (range[1]-range[0]);
// We have to change the range used for computing texture
// coordinates slightly to accomodate the special above- and
// below-range colors that are the first and last texels,
// respectively.
double scalar_texel_width = (range[1] - range[0]) / static_cast<double>(tableNumberOfColors);
double padded_range[2];
padded_range[0] = range[0] - scalar_texel_width;
padded_range[1] = range[1] + scalar_texel_width;
double inv_range_width = 1.0 / (padded_range[1] - padded_range[0]);
if (component < 0 || component >= numComps)
{
......@@ -640,7 +650,7 @@ void CreateColorTextureCoordinates(T* input, float* output,
magnitude = vtkLookupTable::ApplyLogScale(
magnitude, table_range, range);
}
ScalarToTextureCoordinate(magnitude, range[0], inv_range_width,
ScalarToTextureCoordinate(magnitude, padded_range[0], inv_range_width,
output[0], output[1]);
output += 2;
}
......@@ -656,7 +666,7 @@ void CreateColorTextureCoordinates(T* input, float* output,
input_value = vtkLookupTable::ApplyLogScale(
input_value, table_range, range);
}
ScalarToTextureCoordinate(input_value, range[0], inv_range_width,
ScalarToTextureCoordinate(input_value, padded_range[0], inv_range_width,
output[0], output[1]);
output += 2;
input = input + numComps;
......@@ -666,7 +676,6 @@ void CreateColorTextureCoordinates(T* input, float* output,
} // end anonymous namespace
#define ColorTextureMapSize 256
// a side effect of this is that this->ColorCoordinates and
// this->ColorTexture are set.
void vtkMapper::MapScalarsToTexture(vtkDataArray* scalars, double alpha)
......@@ -708,24 +717,30 @@ void vtkMapper::MapScalarsToTexture(vtkDataArray* scalars, double alpha)
// Get the texture map from the lookup table.
// Create a dummy ramp of scalars.
// In the future, we could extend vtkScalarsToColors.
double k = (range[1]-range[0]) / (ColorTextureMapSize-1);
vtkFloatArray* tmp = vtkFloatArray::New();
tmp->SetNumberOfTuples(ColorTextureMapSize*2);
float* ptr = tmp->GetPointer(0);
for (int i = 0; i < ColorTextureMapSize; ++i)
vtkIdType numberOfColors = this->LookupTable->GetNumberOfAvailableColors();
numberOfColors += 2;
double k = (range[1]-range[0]) / (numberOfColors-1-2);
vtkDoubleArray* tmp = vtkDoubleArray::New();
tmp->SetNumberOfTuples(numberOfColors*2);
double* ptr = tmp->GetPointer(0);
for (int i = 0; i < numberOfColors; ++i)
{
*ptr = range[0] + i * k;
*ptr = range[0] + i * k - k; // minus k to start at below range color
if (use_log_scale)
{
*ptr = pow(10.0, *ptr);
}
++ptr;
}
// Dimension on NaN.
double nan = vtkMath::Nan();
for (int i = 0; i < ColorTextureMapSize; ++i)
for (int i = 0; i < numberOfColors; ++i)
{
*ptr = nan;
++ptr;
}
this->ColorTextureMap = vtkImageData::New();
this->ColorTextureMap->SetExtent(0,ColorTextureMapSize-1,
this->ColorTextureMap->SetExtent(0,numberOfColors-1,
0,1, 0,0);
this->ColorTextureMap->GetPointData()->SetScalars(
this->LookupTable->MapScalars(tmp, this->ColorMode, 0));
......@@ -777,10 +792,11 @@ void vtkMapper::MapScalarsToTexture(vtkDataArray* scalars, double alpha)
{