Commit df38218c authored by camc's avatar camc

added slivr tests + fix to the resample broking operator

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22118 18c085ea-50e0-402c-830e-de6fd14e8384
parent 2c0573fe
......@@ -693,97 +693,80 @@ avtSamplePointExtractor::ExecuteTree(avtDataTree_p dt)
return;
}
unsigned long m_size, m_rss;
GetMemorySize(m_size, m_rss);
if (rayCastingSLIVR == true){
unsigned long m_size, m_rss;
GetMemorySize(m_size, m_rss);
debug5 << PAR_Rank() << " ~ avtSamplePointExtractor::ExecuteTree .. . "
<< " Memory use before: " << m_size << " rss (MB): " << m_rss/(1024*1024) << endl;
debug5 << PAR_Rank() << " ~ avtSamplePointExtractor::ExecuteTree .. . "
<< " Memory use before: " << m_size << " rss (MB): " << m_rss/(1024*1024) << endl;
totalAssignedPatches = dt->GetNChildren();
patchCount = 0;
imageMetaPatchVector.clear();
imgDataHashMap.clear();
if (rayCastingSLIVR == true)
if ((totalAssignedPatches != 0) && (dt->ChildIsPresent(0) && !( *(dt->GetChild(0)) == NULL))){
}else
totalAssignedPatches = 0;
totalAssignedPatches = dt->GetNChildren();
patchCount = 0;
imageMetaPatchVector.clear();
imgDataHashMap.clear();
if (rayCastingSLIVR == true || trilinearInterpolation == true)
if ((totalAssignedPatches != 0) && (dt->ChildIsPresent(0) && !( *(dt->GetChild(0)) == NULL))){
}else
totalAssignedPatches = 0;
for (int i = 0; i < totalAssignedPatches; i++) {
if (dt->ChildIsPresent(i) && !( *(dt->GetChild(i)) == NULL))
{
avtDataTree_p child = dt->GetChild(i);
//
// Get the dataset for this leaf in the tree.
//
vtkDataSet *ds = child->GetDataRepresentation().GetDataVTK();
//
// Iterate over all cells in the mesh and call the appropriate
// extractor for each cell to get the sample points.
//
if (kernelBasedSampling)
KernelBasedSample(ds);
else
RasterBasedSample(ds, i);
UpdateProgress(10*currentNode+9, 10*totalNodes);
currentNode++;
}
}
for (int i = 0; i < totalAssignedPatches; i++) {
if (dt->ChildIsPresent(i) && !( *(dt->GetChild(i)) == NULL))
GetMemorySize(m_size, m_rss);
debug5 << PAR_Rank() << " ~ Memory use after: " << m_size << " rss (MB): " << m_rss/(1024*1024)
<< " ... avtSamplePointExtractor::ExecuteTree done@!!!" << endl;
}else{
if (dt->GetNChildren() != 0)
{
avtDataTree_p child = dt->GetChild(i);
//
// Get the dataset for this leaf in the tree.
//
vtkDataSet *ds = child->GetDataRepresentation().GetDataVTK();
//
// Iterate over all cells in the mesh and call the appropriate
// extractor for each cell to get the sample points.
//
if (kernelBasedSampling)
KernelBasedSample(ds);
else
RasterBasedSample(ds, i);
for (int i = 0; i < dt->GetNChildren(); i++)
{
if (dt->ChildIsPresent(i))
ExecuteTree(dt->GetChild(i));
}
UpdateProgress(10*currentNode+9, 10*totalNodes);
currentNode++;
return;
}
}
GetMemorySize(m_size, m_rss);
debug5 << PAR_Rank() << " ~ Memory use after: " << m_size << " rss (MB): " << m_rss/(1024*1024)
<< " ... avtSamplePointExtractor::ExecuteTree done@!!!" << endl;
}
//
// Get the dataset for this leaf in the tree.
//
vtkDataSet *ds = dt->GetDataRepresentation().GetDataVTK();
//
// Previous recursive equivalent
//
// void
// avtSamplePointExtractor::ExecuteTree(avtDataTree_p dt)
// {
// if (*dt == NULL)
// {
// return;
// }
// if (dt->GetNChildren() <= 0 && (!(dt->HasData())))
// {
// return;
// }
// if (dt->GetNChildren() != 0)
// {
// for (int i = 0; i < dt->GetNChildren(); i++)
// {
// if (dt->ChildIsPresent(i))
// ExecuteTree(dt->GetChild(i));
// }
// return;
// }
// //
// // Get the dataset for this leaf in the tree.
// //
// vtkDataSet *ds = dt->GetDataRepresentation().GetDataVTK();
// //
// // Iterate over all cells in the mesh and call the appropriate
// // extractor for each cell to get the sample points.
// //
// if (kernelBasedSampling)
// KernelBasedSample(ds);
// else
// RasterBasedSample(ds);
// UpdateProgress(10*currentNode+9, 10*totalNodes);
// currentNode++;
// }
//
// Iterate over all cells in the mesh and call the appropriate
// extractor for each cell to get the sample points.
//
if (kernelBasedSampling)
KernelBasedSample(ds);
else
RasterBasedSample(ds);
UpdateProgress(10*currentNode+9, 10*totalNodes);
currentNode++;
}
}
// ****************************************************************************
......
......@@ -1437,6 +1437,7 @@ VolumeAttributes_GetLowGradientLightingClampValue(PyObject *self, PyObject *args
return retval;
}
/*static*/ PyObject *
VolumeAttributes_SetMaterialProperties(PyObject *self, PyObject *args)
{
......
......@@ -256,6 +256,8 @@
</Function>
<Function name="VolumeViewerPluginInfo::Permits2DViewScaling" user="false" member="true">
</Function>
<Function name="VolumeAttributes_SetMaterialProperties" user="false" member="true">
</Function>
<Include file="source" quoted="false">
ColorControlPoint.h
</Include>
......
......@@ -567,3 +567,50 @@ VolumeViewerPluginInfo::Permits2DViewScaling() const
return false;
}
Target: xml2python
Function: VolumeAttributes_SetMaterialProperties
Declaration: VolumeAttributes_SetMaterialProperties
Definition:
/*static*/ PyObject *
VolumeAttributes_SetMaterialProperties(PyObject *self, PyObject *args)
{
VolumeAttributesObject *obj = (VolumeAttributesObject *)self;
double *dvals = obj->data->GetMaterialProperties();
if(!PyArg_ParseTuple(args, "dddd", &dvals[0], &dvals[1], &dvals[2], &dvals[3]))
{
PyObject *tuple;
if(!PyArg_ParseTuple(args, "O", &tuple))
return NULL;
if(PyTuple_Check(tuple))
{
if(PyTuple_Size(tuple) != 4)
return NULL;
PyErr_Clear();
for(int i = 0; i < PyTuple_Size(tuple); ++i)
{
PyObject *item = PyTuple_GET_ITEM(tuple, i);
if(PyFloat_Check(item))
dvals[i] = PyFloat_AS_DOUBLE(item);
else if(PyInt_Check(item))
dvals[i] = double(PyInt_AS_LONG(item));
else if(PyLong_Check(item))
dvals[i] = PyLong_AsDouble(item);
else
dvals[i] = 0.;
}
}
else
return NULL;
}
// Mark the materialProperties in the object as modified.
obj->data->SelectMaterialProperties();
Py_INCREF(Py_None);
return Py_None;
}
\ No newline at end of file
......@@ -130,16 +130,16 @@ public class VolumeAttributes extends AttributeSubject implements Plugin
smoothData = false;
samplesPerRay = 500;
rendererType = RENDERER_SPLATTING;
gradientType = GRADIENTTYPE_CENTEREDDIFFERENCES;
gradientType = GRADIENTTYPE_SOBELOPERATOR;
num3DSlices = 200;
scaling = SCALING_LINEAR;
skewFactor = 1;
limitsMode = LIMITSMODE_ORIGINALDATA;
sampling = SAMPLINGTYPE_RASTERIZATION;
rendererSamples = 2f;
rendererSamples = 3f;
transferFunction2DWidgets = new Vector();
transferFunctionDim = 1;
lowGradientLightingReduction = LOWGRADIENTLIGHTINGREDUCTION_OFF;
lowGradientLightingReduction = LOWGRADIENTLIGHTINGREDUCTION_LOWER;
lowGradientLightingClampFlag = false;
lowGradientLightingClampValue = 1;
materialProperties = new double[4];
......@@ -177,16 +177,16 @@ public class VolumeAttributes extends AttributeSubject implements Plugin
smoothData = false;
samplesPerRay = 500;
rendererType = RENDERER_SPLATTING;
gradientType = GRADIENTTYPE_CENTEREDDIFFERENCES;
gradientType = GRADIENTTYPE_SOBELOPERATOR;
num3DSlices = 200;
scaling = SCALING_LINEAR;
skewFactor = 1;
limitsMode = LIMITSMODE_ORIGINALDATA;
sampling = SAMPLINGTYPE_RASTERIZATION;
rendererSamples = 2f;
rendererSamples = 3f;
transferFunction2DWidgets = new Vector();
transferFunctionDim = 1;
lowGradientLightingReduction = LOWGRADIENTLIGHTINGREDUCTION_OFF;
lowGradientLightingReduction = LOWGRADIENTLIGHTINGREDUCTION_LOWER;
lowGradientLightingClampFlag = false;
lowGradientLightingClampValue = 1;
materialProperties = new double[4];
......
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