Commit 9661b881 authored by allens's avatar allens

rewrote the Line Sampler to vtkPolydata so to allow for Queries

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21501 18c085ea-50e0-402c-830e-de6fd14e8384
parent 5664a9b4
......@@ -114,6 +114,7 @@ Queries/avtLineScanQuery.C
Queries/avtLineScanTransformQuery.C
Queries/avtL2NormQuery.C
Queries/avtL2NormBetweenCurvesQuery.C
Queries/avtLineSamplerInfoQuery.C
Queries/avtLocalizedCompactnessFactorQuery.C
Queries/avtLocateAndPickNodeQuery.C
Queries/avtLocateAndPickZoneQuery.C
......@@ -132,6 +133,7 @@ Queries/avtSampleStatisticsQuery.C
Queries/avtShapeletDecompositionQuery.C
Queries/avtSkewnessQuery.C
Queries/avtSphericalCompactnessFactorQuery.C
Queries/avtStreamlineInfoQuery.C
Queries/avtSummationQuery.C
Queries/avtTimeQuery.C
Queries/avtTotalLengthQuery.C
......@@ -149,7 +151,6 @@ Queries/avtWeightedVariableSummationQuery.C
Queries/avtXRayImageQuery.C
Queries/avtZoneCenterQuery.C
Queries/MinMaxInfo.C
Queries/avtStreamlineInfoQuery.C
)
IF(VISIT_PYTHON_FILTERS)
......
......@@ -103,6 +103,7 @@
#include <avtXRayImageQuery.h>
#include <avtZoneCenterQuery.h>
#include <avtStreamlineInfoQuery.h>
#include <avtLineSamplerInfoQuery.h>
#include <visit-python-config.h>
#ifdef VISIT_PYTHON_FILTERS
......@@ -657,6 +658,11 @@ avtQueryFactory::CreateQuery(const QueryAttributes *qa)
query = new avtStreamlineInfoQuery();
}
else if (CaseInsenstiveEqual(qname,"Line Sampler Info"))
{
query = new avtLineSamplerInfoQuery();
}
if (query == NULL && !foundAQuery)
{
EXCEPTION1(VisItException, "No query to execute was found. "
......@@ -759,6 +765,11 @@ avtQueryFactory::GetDefaultInputParams(const string &qname)
avtStreamlineInfoQuery::GetDefaultInputParams(params);
retval = params.ToXML();
}
else if (CaseInsenstiveEqual(qname,"Line Sampler Info"))
{
avtLineSamplerInfoQuery::GetDefaultInputParams(params);
retval = params.ToXML();
}
else if (CaseInsenstiveEqual(qname,"Min") ||
CaseInsenstiveEqual(qname,"Max") ||
CaseInsenstiveEqual(qname,"MinMax"))
......
......@@ -86,7 +86,7 @@ static const char *WindowType_strings[] = {
"DomainZone", "DomainZoneVars", "ActualData",
"ActualDataVars", "LineDistribution", "HohlraumFlux",
"ConnCompSummary", "ShapeletsDecomp", "XRayImage",
"StreamlineInfo", "Pick", "Lineout"
"LineSamplerInfo", "StreamlineInfo", "Pick", "Lineout"
};
std::string
......
......@@ -82,6 +82,7 @@ public:
ConnCompSummary,
ShapeletsDecomp,
XRayImage,
LineSamplerInfo,
StreamlineInfo,
Pick,
Lineout
......
......@@ -390,6 +390,18 @@ QvisQueryWindow::CreateStandardQueryWidget()
dumpSteps->hide();
sLayout->addWidget(dumpSteps, 13, 0, 1, 2);
dumpCoordinates = new QCheckBox(tr("Dump Coordinates"), argPanel);
connect(dumpCoordinates, SIGNAL(toggled(bool)), this,
SLOT(dumpCoordinatesToggled(bool)));
dumpCoordinates->hide();
sLayout->addWidget(dumpCoordinates, 13, 0, 1, 2);
dumpValues = new QCheckBox(tr("Dump Values"), argPanel);
connect(dumpValues, SIGNAL(toggled(bool)), this,
SLOT(dumpValuesToggled(bool)));
dumpValues->hide();
sLayout->addWidget(dumpValues, 14, 0, 1, 2);
// only one of these will be shown at a time, so they can be added
// to the same location in the layout
......@@ -956,6 +968,8 @@ QvisQueryWindow::UpdateArgumentPanel(const QString &qname)
dataOpts->button(0)->setChecked(true);
useGlobal->setChecked(0);
dumpSteps->setChecked(0);
dumpCoordinates->setChecked(0);
dumpValues->setChecked(0);
labels[0]->setEnabled(true);
textFields[0]->setEnabled(true);
......@@ -975,6 +989,8 @@ QvisQueryWindow::UpdateArgumentPanel(const QString &qname)
bool showDataOptions = false;
bool showGlobal = false;
bool showDumpSteps = false;
bool showDumpCoordinates = false;
bool showDumpValues = false;
QueryList::WindowType winT = (QueryList::WindowType)winType[index];
bool showTime = queryMode[index] != QueryList::QueryOnly;
bool timeOnly = queryMode[index] == QueryList::TimeOnly;
......@@ -1105,6 +1121,11 @@ QvisQueryWindow::UpdateArgumentPanel(const QString &qname)
{
showDumpSteps = true;
}
else if (winT == QueryList::LineSamplerInfo)
{
showDumpCoordinates = true;
showDumpValues = true;
}
// hide and show the right text widgets.
for(int i = 0; i < 6; ++i)
......@@ -1143,6 +1164,16 @@ QvisQueryWindow::UpdateArgumentPanel(const QString &qname)
else
dumpSteps->hide();
if (showDumpCoordinates)
dumpCoordinates->show();
else
dumpCoordinates->hide();
if (showDumpValues)
dumpValues->show();
else
dumpValues->hide();
if (showDataOptions)
{
dataOpts->button(0)->show();
......@@ -1535,6 +1566,14 @@ QvisQueryWindow::ExecuteStandardQuery()
queryParams["dump_steps"] = (int)dumpSteps->isChecked();
}
}
else if (winT == QueryList::LineSamplerInfo)
{
if(noErrors)
{
queryParams["dump_coordinates"] = (int)dumpCoordinates->isChecked();
queryParams["dump_values"] = (int)dumpValues->isChecked();
}
}
else if(winT == QueryList::Pick)
{
if (!pickQueryWidget->GetQueryParameters(queryParams))
......@@ -1909,6 +1948,36 @@ QvisQueryWindow::dumpStepsToggled(bool val)
}
// ****************************************************************************
// Method: QvisQueryWindow::dumpCoordinatesToggled
//
// Programmer: Dave Pugmire
// Creation: November 9, 2010
//
// ****************************************************************************
void
QvisQueryWindow::dumpCoordinatesToggled(bool val)
{
dumpCoordinates->setChecked(val);
}
// ****************************************************************************
// Method: QvisQueryWindow::dumpValuesToggled
//
// Programmer: Dave Pugmire
// Creation: November 9, 2010
//
// ****************************************************************************
void
QvisQueryWindow::dumpValuesToggled(bool val)
{
dumpValues->setChecked(val);
}
// ****************************************************************************
// Method: QvisQueryWindow::saveResultText
//
......
......@@ -182,6 +182,8 @@ private slots:
void displayModeChanged(int);
void useGlobalToggled(bool);
void dumpStepsToggled(bool);
void dumpCoordinatesToggled(bool);
void dumpValuesToggled(bool);
void saveResultText();
void addVariable(const QString &);
void addPyVariable(const QString &);
......@@ -212,7 +214,7 @@ private:
QGroupBox *argPanel;
QLabel *labels[6];
QLineEdit *textFields[6];
QCheckBox *useGlobal, *dumpSteps;
QCheckBox *useGlobal, *dumpSteps, *dumpCoordinates, *dumpValues;
QvisVariableButton *varsButton;
QLineEdit *varsLineEdit;
......
......@@ -80,12 +80,11 @@ LineSamplerViewerPluginInfo::GetClientAtts(AttributeSubject *atts,
ViewerBase vb;
QString msg("You are attemping to change the 'View dimension' "
"or the 'View geometry' "
"while the 'Apply to all windows' and/or the "
"'Apply operators to all plots' and the "
"or the 'View geometry' while the 'Apply to all windows' "
"and/or the 'Apply operators to all plots' and the "
"'Do not apply to all' are all checked. This setting "
"is a conflict. The 'View dimension' will not be "
"changed.");
"is a conflict. The 'View dimension' and 'View geometry' "
"will not be changed.");
vb.Warning(msg);
}
......
......@@ -218,12 +218,11 @@ LineSamplerViewerPluginInfo::GetClientAtts(AttributeSubject *atts,
ViewerBase vb;
QString msg("You are attemping to change the 'View dimension' "
"or the 'View geometry' "
"while the 'Apply to all windows' and/or the "
"'Apply operators to all plots' and the "
"or the 'View geometry' while the 'Apply to all windows' "
"and/or the 'Apply operators to all plots' and the "
"'Do not apply to all' are all checked. This setting "
"is a conflict. The 'View dimension' will not be "
"changed.");
"is a conflict. The 'View dimension' and 'View geometry' "
"will not be changed.");
vb.Warning(msg);
}
......
......@@ -672,9 +672,9 @@ QvisLineSamplerWindow::CreateWindowContents()
channelGeometryButtonGroup->addButton(channelGeometryLine,1);
channelGeometryLayout->addWidget(channelGeometryLine);
QRadioButton *channelGeometryCylinder = new QRadioButton(tr("Cylinder"), channelGeometry);
channelGeometryButtonGroup->addButton(channelGeometryCylinder,2);
channelGeometryLayout->addWidget(channelGeometryCylinder);
// QRadioButton *channelGeometryCylinder = new QRadioButton(tr("Cylinder"), channelGeometry);
// channelGeometryButtonGroup->addButton(channelGeometryCylinder,2);
// channelGeometryLayout->addWidget(channelGeometryCylinder);
// QRadioButton *channelGeometryCone = new QRadioButton(tr("Cone"), channelGeometry);
// channelGeometryButtonGroup->addButton(channelGeometryCone,3);
......@@ -1240,6 +1240,17 @@ QvisLineSamplerWindow::UpdateWindow(bool doAll)
viewDimensionButtonGroup->blockSignals(false);
oneDPlotGroup->setEnabled( (int)atts->GetViewDimension() == 0 );
if( atts->GetViewDimension() == 0 )
{
displayTimeLabel->
setEnabled( (int)atts->GetTimeSampling() == 1 &&
(int)atts->GetToroidalIntegration() != 1);
displayTime->setEnabled( (int)atts->GetTimeSampling() == 1 &&
(int)atts->GetToroidalIntegration() != 1 );
}
break;
case LineSamplerAttributes::ID_donotApplyToAll:
donotApplyToAll->blockSignals(true);
......@@ -1315,11 +1326,11 @@ QvisLineSamplerWindow::UpdateWindow(bool doAll)
(int)atts->GetToroidalIntegration() == 2 );
displayTimeLabel->
setEnabled( (int)atts->GetTimeSampling()==1 &&
(int)atts->GetToroidalIntegration()!=1);
setEnabled( (int)atts->GetTimeSampling() == 1 &&
(int)atts->GetToroidalIntegration() != 1);
displayTime->setEnabled( (int)atts->GetTimeSampling()==1 &&
(int)atts->GetToroidalIntegration()!=1);
displayTime->setEnabled( (int)atts->GetTimeSampling() == 1 &&
(int)atts->GetToroidalIntegration() != 1);
break;
case LineSamplerAttributes::ID_toroidalAngleSampling:
toroidalAngleSamplingButtonGroup->blockSignals(true);
......@@ -1342,11 +1353,12 @@ QvisLineSamplerWindow::UpdateWindow(bool doAll)
timeSamplingButtonGroup->button((int)atts->GetTimeSampling())->setChecked(true);
timeSamplingButtonGroup->blockSignals(false);
displayTimeLabel->setEnabled( (int)atts->GetTimeSampling()==1 &&
(int)atts->GetToroidalIntegration()==0);
displayTimeLabel->
setEnabled( (int)atts->GetTimeSampling() == 1 &&
(int)atts->GetToroidalIntegration() != 1);
displayTime->setEnabled( (int)atts->GetTimeSampling()==1 &&
(int)atts->GetToroidalIntegration()==0);
displayTime->setEnabled( (int)atts->GetTimeSampling() == 1 &&
(int)atts->GetToroidalIntegration() != 1);
timeStepLabel->setEnabled((int)atts->GetTimeSampling()==1);
timeStepStartLabel->setEnabled((int)atts->GetTimeSampling()==1);
......
......@@ -49,6 +49,7 @@
#include <avtTimeLoopFilter.h>
#include <avtDatasetToDatasetFilter.h>
#include <avtVector.h>
#include <avtExtents.h>
#include <LineSamplerAttributes.h>
......@@ -100,11 +101,11 @@ class avtLineSamplerFilter : virtual public avtPluginFilter,
virtual vtkDataSet *ExecuteChannelData(vtkDataSet *, int, std::string);
// virtual vtkDataSet *ExecuteChannelList(vtkDataSet *, int, std::string);
virtual vtkDataSet* createPoint( avtVector startPoint,
virtual vtkPolyData* createPoint( avtVector startPoint,
avtVector stopPoint,
bool allocateScalars );
virtual vtkDataSet *createLine( avtVector startPoint,
virtual vtkPolyData* createLine( avtVector startPoint,
avtVector stopPoint,
bool allocateScalars );
......@@ -127,6 +128,8 @@ class avtLineSamplerFilter : virtual public avtPluginFilter,
unsigned int checkWall( avtVector &startPoint, avtVector &stopPoint );
std::vector< std::vector< std::pair< avtVector, float > > > lineSamples;
vtkDataSet *composite_ds;
int nTimeSteps;
......
......@@ -4052,6 +4052,7 @@ ViewerQueryManager::InitializeQueryList()
QueryList::WindowType shp_wt = QueryList::ShapeletsDecomp;
QueryList::WindowType xri = QueryList::XRayImage;
QueryList::WindowType sli = QueryList::StreamlineInfo;
QueryList::WindowType lsi = QueryList::LineSamplerInfo;
QueryList::WindowType pick = QueryList::Pick;
QueryList::WindowType line = QueryList::Lineout;
......@@ -4143,6 +4144,7 @@ ViewerQueryManager::InitializeQueryList()
queryTypes->AddQuery("Population Statistics", dq, vr, basic, 1, 0, qo);
queryTypes->AddQuery("Streamline Info", dq, misc_r, sli, 1, 0, qo);
queryTypes->AddQuery("Line Sampler Info", dq, misc_r, lsi, 1, 0, qo);
queryTypes->SelectAll();
}
......
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