Commit b14d0c7d authored by cyrush's avatar cyrush

added xml (mapnode) results to the Connected Components Summary Query

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23788 18c085ea-50e0-402c-830e-de6fd14e8384
parent 03924acd
......@@ -269,6 +269,9 @@ avtConnComponentsSummaryQuery::PreExecute(void)
// Cyrus Harrison, Mon Jun 6 17:05:47 PDT 2011
// Support 1D case (line length).
//
// Cyrus Harrison, Wed Jul 16 15:36:45 PDT 2014
// Added XML (MapNode) results.
//
// ****************************************************************************
void
......@@ -409,6 +412,11 @@ avtConnComponentsSummaryQuery::PostExecute(void)
// set output values
SetResultValues(results);
// set Xml result
MapNode result_node;
PrepareMapNodeResult(result_node);
SetXmlResult(result_node.ToXML());
}
}
......@@ -959,7 +967,7 @@ avtConnComponentsSummaryQuery::SaveComponentResults(std::string fname)
}
// ****************************************************************************
// Method: avtConnComponentsSummaryQuery::PackResults
// Method: avtConnComponentsSummaryQuery::PrepareComponentResults
//
// Purpose: Packs component summary results for return with Set
//
......@@ -1044,3 +1052,48 @@ avtConnComponentsSummaryQuery::PrepareComponentResults(vector<double> &results)
results[idx++] = zMaxPerComp[i];
}
}
// ****************************************************************************
// Method: avtConnComponentsSummaryQuery::PrepareMapNodeResult
//
// Purpose: Packs component summary results into a MapNode
//
// Programmer: Cyrus Harrison
// Creation: July 16, 2014
//
// Modifications:
//
// ****************************************************************************
void
avtConnComponentsSummaryQuery::PrepareMapNodeResult(MapNode &result_node)
{
result_node["connected_component_count"] = nComps;
result_node["comp_x"] = xCentroidPerComp;
result_node["comp_y"] = yCentroidPerComp;
result_node["comp_z"] = zCentroidPerComp;
result_node["comp_num_cells"] = nCellsPerComp;
result_node["comp_num_procs"] = nProcsPerComp;
if(findLength)
result_node["comp_length"] = lengthPerComp;
if(findArea)
result_node["comp_area"] = areaPerComp;;
if(findVolume)
result_node["comp_volume"] = volPerComp;
result_node["comp_sum"] = sumPerComp;
result_node["comp_weighted_sum"] = wsumPerComp;
result_node["comp_bb_x_min"] = xMinPerComp;
result_node["comp_bb_x_max"] = xMaxPerComp;
result_node["comp_bb_y_min"] = yMinPerComp;
result_node["comp_bb_y_max"] = yMaxPerComp;
result_node["comp_bb_z_min"] = zMinPerComp;
result_node["comp_bb_z_max"] = zMaxPerComp;
}
......@@ -68,8 +68,9 @@ class vtkDataSet;
//
// Component Fields:
// x,y,z Component centroid location
// comp_area Component area (if 2D data)
// comp_volume Component volume (if 3D or revolved volume data)
// comp_length Component length (if 1D topo data)
// comp_area Component area (if 2D topo data)
// comp_volume Component volume (if 3D topo or revolved volume data)
// comp_sum Component variable sum
// comp_weighted_sum Component weighted variable sum
// comp_bb_{x,y,z}_{min,max} Component bounding box values.
......@@ -94,6 +95,9 @@ class vtkDataSet;
// Kathleen Biagas, Fri Jul 15 16:05:35 PDT 2011
// Added GetDefaultInputParams.
//
// Cyrus Harrison, Wed Jul 16 13:54:00 PDT 2014
// Added PrepareMapNodeResult.
//
// ****************************************************************************
class QUERY_API avtConnComponentsSummaryQuery
......@@ -156,8 +160,9 @@ class QUERY_API avtConnComponentsSummaryQuery
virtual avtDataObject_p ApplyFilters(avtDataObject_p);
virtual void VerifyInput(void);
virtual void SaveComponentResults(std::string fname);
virtual void PrepareComponentResults(std::vector<double> &);
void SaveComponentResults(std::string fname);
void PrepareComponentResults(std::vector<double> &);
void PrepareMapNodeResult(MapNode &result_node);
};
......
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