Commit 6bbb5225 authored by hrchilds's avatar hrchilds

Update from January 27, 2007

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@801 18c085ea-50e0-402c-830e-de6fd14e8384
parent a5bea3a8
......@@ -48,7 +48,7 @@
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -71,7 +71,7 @@ ColorControlPointList::ColorControlPointList() : AttributeSubject("a*bbbb")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -113,7 +113,7 @@ ColorControlPointList::ColorControlPointList(const ColorControlPointList &obj) :
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -137,15 +137,16 @@ ColorControlPointList::~ColorControlPointList()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
// ****************************************************************************
void
ColorControlPointList&
ColorControlPointList::operator = (const ColorControlPointList &obj)
{
if (this == &obj) return *this;
AttributeGroupVector::const_iterator pos;
// *** Copy the controlPoints field ***
......@@ -169,6 +170,7 @@ ColorControlPointList::operator = (const ColorControlPointList &obj)
externalFlag = obj.externalFlag;
SelectAll();
return *this;
}
// ****************************************************************************
......@@ -180,7 +182,7 @@ ColorControlPointList::operator = (const ColorControlPointList &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -217,7 +219,7 @@ ColorControlPointList::operator == (const ColorControlPointList &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -238,7 +240,7 @@ ColorControlPointList::operator != (const ColorControlPointList &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -259,7 +261,7 @@ ColorControlPointList::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -287,7 +289,7 @@ ColorControlPointList::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -313,7 +315,7 @@ ColorControlPointList::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -340,7 +342,7 @@ ColorControlPointList::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -365,7 +367,7 @@ ColorControlPointList::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -390,7 +392,7 @@ ColorControlPointList::CreateSubAttributeGroup(int)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -629,7 +631,7 @@ ColorControlPointList::SelectControlPoints()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -654,7 +656,7 @@ ColorControlPointList::AddColorControlPoint(const ColorControlPoint &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -682,7 +684,7 @@ ColorControlPointList::ClearColorControlPoints()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -717,7 +719,7 @@ ColorControlPointList::RemoveColorControlPoint(int index)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -738,7 +740,7 @@ ColorControlPointList::GetNumColorControlPoints() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -759,7 +761,7 @@ ColorControlPointList::GetColorControlPoint(int i)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -780,7 +782,7 @@ ColorControlPointList::GetColorControlPoint(int i) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -801,7 +803,7 @@ ColorControlPointList::operator [] (int i)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -826,7 +828,7 @@ ColorControlPointList::operator [] (int i) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -855,7 +857,7 @@ ColorControlPointList::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -884,7 +886,7 @@ ColorControlPointList::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -913,7 +915,7 @@ ColorControlPointList::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -988,6 +990,10 @@ ColorControlPointList::FieldsEqual(int index_, const AttributeGroup *rhs) const
//
// Modifications:
//
// Hank Childs, Sat Jan 27 12:03:56 PST 2007
// Fix indexing bug that can come up with huge numbers of colors. This
// bug ultimately led to memory overwrites and a crash.
//
// ****************************************************************************
void
......@@ -1170,9 +1176,9 @@ ColorControlPointList::GetColors(unsigned char *rgb, int ncolors) const
{
for(i = 0; i < color_start_i; i++)
{
dest[c++] = (unsigned char)(c1_r[0] * 255);
dest[c++] = (unsigned char)(c1_g[0] * 255);
dest[c++] = (unsigned char)(c1_b[0] * 255);
dest[3*i+0] = (unsigned char)(c1_r[0] * 255);
dest[3*i+1] = (unsigned char)(c1_g[0] * 255);
dest[3*i+2] = (unsigned char)(c1_b[0] * 255);
}
}
......@@ -1193,9 +1199,9 @@ ColorControlPointList::GetColors(unsigned char *rgb, int ncolors) const
for(i = color_start_i; i < color_end_i; i++)
{
// Store the colors as 24 bit rgb.
dest[c++] = (unsigned char)(r_sum * 255);
dest[c++] = (unsigned char)(g_sum * 255);
dest[c++] = (unsigned char)(b_sum * 255);
dest[3*i+0] = (unsigned char)(r_sum * 255);
dest[3*i+1] = (unsigned char)(g_sum * 255);
dest[3*i+2] = (unsigned char)(b_sum * 255);
// Add the color deltas.
r_sum += delta_r; g_sum += delta_g; b_sum += delta_b;
......@@ -1205,17 +1211,17 @@ ColorControlPointList::GetColors(unsigned char *rgb, int ncolors) const
{
for(i = color_end_i; i < ncolors; i++)
{
dest[c++] = (unsigned char)(c2_r[0] * 255);
dest[c++] = (unsigned char)(c2_g[0] * 255);
dest[c++] = (unsigned char)(c2_b[0] * 255);
dest[3*i+0] = (unsigned char)(c2_r[0] * 255);
dest[3*i+1] = (unsigned char)(c2_g[0] * 255);
dest[3*i+2] = (unsigned char)(c2_b[0] * 255);
}
}
}
else
{
dest[c++] = (unsigned char)(c1_r[0] * 255);
dest[c++] = (unsigned char)(c1_g[0] * 255);
dest[c++] = (unsigned char)(c1_b[0] * 255);
dest[3*color_start_i+0] = (unsigned char)(c1_r[0] * 255);
dest[3*color_start_i+1] = (unsigned char)(c1_g[0] * 255);
dest[3*color_start_i+2] = (unsigned char)(c1_b[0] * 255);
}
c1_pos++;
......
......@@ -17,6 +17,10 @@ Definition:
//
// Modifications:
//
// Hank Childs, Sat Jan 27 12:03:56 PST 2007
// Fix indexing bug that can come up with huge numbers of colors. This
// bug ultimately led to memory overwrites and a crash.
//
// ****************************************************************************
void
......@@ -199,9 +203,9 @@ ColorControlPointList::GetColors(unsigned char *rgb, int ncolors) const
{
for(i = 0; i < color_start_i; i++)
{
dest[c++] = (unsigned char)(c1_r[0] * 255);
dest[c++] = (unsigned char)(c1_g[0] * 255);
dest[c++] = (unsigned char)(c1_b[0] * 255);
dest[3*i+0] = (unsigned char)(c1_r[0] * 255);
dest[3*i+1] = (unsigned char)(c1_g[0] * 255);
dest[3*i+2] = (unsigned char)(c1_b[0] * 255);
}
}
......@@ -222,9 +226,9 @@ ColorControlPointList::GetColors(unsigned char *rgb, int ncolors) const
for(i = color_start_i; i < color_end_i; i++)
{
// Store the colors as 24 bit rgb.
dest[c++] = (unsigned char)(r_sum * 255);
dest[c++] = (unsigned char)(g_sum * 255);
dest[c++] = (unsigned char)(b_sum * 255);
dest[3*i+0] = (unsigned char)(r_sum * 255);
dest[3*i+1] = (unsigned char)(g_sum * 255);
dest[3*i+2] = (unsigned char)(b_sum * 255);
// Add the color deltas.
r_sum += delta_r; g_sum += delta_g; b_sum += delta_b;
......@@ -234,17 +238,17 @@ ColorControlPointList::GetColors(unsigned char *rgb, int ncolors) const
{
for(i = color_end_i; i < ncolors; i++)
{
dest[c++] = (unsigned char)(c2_r[0] * 255);
dest[c++] = (unsigned char)(c2_g[0] * 255);
dest[c++] = (unsigned char)(c2_b[0] * 255);
dest[3*i+0] = (unsigned char)(c2_r[0] * 255);
dest[3*i+1] = (unsigned char)(c2_g[0] * 255);
dest[3*i+2] = (unsigned char)(c2_b[0] * 255);
}
}
}
else
{
dest[c++] = (unsigned char)(c1_r[0] * 255);
dest[c++] = (unsigned char)(c1_g[0] * 255);
dest[c++] = (unsigned char)(c1_b[0] * 255);
dest[3*color_start_i+0] = (unsigned char)(c1_r[0] * 255);
dest[3*color_start_i+1] = (unsigned char)(c1_g[0] * 255);
dest[3*color_start_i+2] = (unsigned char)(c1_b[0] * 255);
}
c1_pos++;
......
......@@ -50,7 +50,7 @@ class ColorControlPoint;
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:01 PDT 2003
// Creation: Sat Jan 27 12:06:49 PDT 2007
//
// Modifications:
//
......@@ -63,7 +63,7 @@ public:
ColorControlPointList(const ColorControlPointList &obj);
virtual ~ColorControlPointList();
virtual void operator = (const ColorControlPointList &obj);
virtual ColorControlPointList& operator = (const ColorControlPointList &obj);
virtual bool operator == (const ColorControlPointList &obj) const;
virtual bool operator != (const ColorControlPointList &obj) const;
......@@ -77,7 +77,6 @@ public:
void SelectControlPoints();
// Property setting methods
void SetControlPoints(const AttributeGroupVector &controlPoints_);
void SetSmoothingFlag(bool smoothingFlag_);
void SetEqualSpacingFlag(bool equalSpacingFlag_);
void SetDiscreteFlag(bool discreteFlag_);
......
......@@ -59,5 +59,5 @@ PYVERSION=python2.1
##
## Silo
##
DEFAULT_SILO_INCLUDES=/usr/gapps/silo/4.5.1/linux_rhel3_gcc_3.2.2/include
DEFAULT_SILO_LIBRARY=/usr/gapps/silo/4.5.1/linux_rhel3_gcc_3.2.2/lib
DEFAULT_SILO_INCLUDES=/usr/gapps/visit/silo/4.5.1/linux_rhel3_gcc_3.2.2/include
DEFAULT_SILO_LIBRARY=/usr/gapps/visit/silo/4.5.1/linux_rhel3_gcc_3.2.2/lib
......@@ -41,12 +41,13 @@
#include <avtThresholdFilter.h>
#include <vtkDataSet.h>
#include <vtkCellData.h>
#include <vtkPointData.h>
#include <vtkPolyData.h>
#include <vtkDataArray.h>
#include <vtkDataObject.h>
#include <vtkDataSet.h>
#include <vtkIdList.h>
#include <vtkPointData.h>
#include <vtkPolyData.h>
#include <vtkRectilinearGrid.h>
#include <vtkStructuredGrid.h>
#include <vtkThreshold.h>
......@@ -546,6 +547,9 @@ avtThresholdFilter::GetAssignments(vtkDataSet *in_ds, const int *dims,
// Mark Blair, Tue Mar 7 13:25:00 PST 2006
// Rewrote to support multi-variable thresholding.
//
// Hank Childs, Sat Jan 27 12:53:20 PST 2007
// Only add points that are actually incident to cells.
//
// ****************************************************************************
vtkDataSet *
......@@ -612,6 +616,12 @@ avtThresholdFilter::ThresholdToPointMesh(vtkDataSet *in_ds)
outPointData->CopyAllocate(inPointData, plotPointCount*curVarCount);
outMeshPoints->Delete();
bool needToSeeIfPointIsIncidentToCell = true;
if (in_ds->GetDataObjectType() == VTK_RECTILINEAR_GRID)
needToSeeIfPointIsIncidentToCell = false;
if (in_ds->GetDataObjectType() == VTK_STRUCTURED_GRID)
needToSeeIfPointIsIncidentToCell = false;
vtkIdList *idList = vtkIdList::New();
for (inPointID = 0; inPointID < inPointCount; inPointID++)
{
for (curVarNum = 0; curVarNum < curVarCount; curVarNum++)
......@@ -622,7 +632,18 @@ avtThresholdFilter::ThresholdToPointMesh(vtkDataSet *in_ds)
if (doubleValue > curUpperBounds[curVarNum]) break;
}
if (curVarNum >= curVarCount)
bool shouldAdd = true;
if (curVarNum < curVarCount)
shouldAdd = false;
if (shouldAdd && needToSeeIfPointIsIncidentToCell)
{
in_ds->GetPointCells(inPointID, idList);
if (idList->GetNumberOfIds() <= 0)
shouldAdd = false;
}
if (shouldAdd)
{
outPointData->CopyData(inPointData, inPointID, outPointID);
in_ds->GetPoint(inPointID, pointXYZ);
......@@ -632,6 +653,7 @@ avtThresholdFilter::ThresholdToPointMesh(vtkDataSet *in_ds)
}
}
idList->Delete();
return outputMesh;
}
......
......@@ -84,6 +84,9 @@ void vtkSlicer::Execute()
// Brad Whitlock, Thu Aug 12 14:51:27 PST 2004
// Added float casts to the pow() arguments so it builds on MSVC7.Net.
//
// Hank Childs, Sat Jan 27 12:45:03 PST 2007
// Add check for 1xJxK and Ix1xK meshes (instead of crashing).
//
///////////////////////////////////////////////////////////////////////////////
void
......@@ -94,7 +97,7 @@ vtkSlicer::StructuredGridExecute(void)
vtkStructuredGrid *sg = (vtkStructuredGrid *) GetInput();
int pt_dims[3];
sg->GetDimensions(pt_dims);
if (pt_dims[2] <= 1)
if (pt_dims[0] <= 1 || pt_dims[1] <= 1 || pt_dims[2] <= 1)
{
GeneralExecute();
return;
......@@ -185,6 +188,9 @@ vtkSlicer::StructuredGridExecute(void)
// Brad Whitlock, Thu Aug 12 14:51:27 PST 2004
// Added float casts to the pow() arguments so it builds on MSVC7.Net.
//
// Hank Childs, Sat Jan 27 12:45:03 PST 2007
// Add check for 1xJxK and Ix1xK meshes (instead of crashing).
//
///////////////////////////////////////////////////////////////////////////////
void vtkSlicer::RectilinearGridExecute(void)
......@@ -194,7 +200,7 @@ void vtkSlicer::RectilinearGridExecute(void)
vtkRectilinearGrid *rg = (vtkRectilinearGrid *) GetInput();
int pt_dims[3];
rg->GetDimensions(pt_dims);
if (pt_dims[2] <= 1)
if (pt_dims[0] <= 1 || pt_dims[1] <= 1 || pt_dims[2] <= 1)
{
GeneralExecute();
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment