Commit b4b65e22 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

fix for cell fields

parent 4f07e767
......@@ -81,9 +81,6 @@ public:
vtkSmartPointer<vtkPolyDataMapper> mapper;
vtkSmartPointer<vtkActor> actor;
public:
vtkSmartPointer<vtkCellCenters> cell_centers;
public:
QCheckBox *show_actor_cb = nullptr;
QCheckBox *show_source_actor_cb = nullptr;
......@@ -143,8 +140,6 @@ dtkVisualizationDecoratorVectorStreamTracer::dtkVisualizationDecoratorVectorStre
d->actor = vtkSmartPointer<vtkActor>::New();
d->actor->SetMapper(d->mapper);
d->cell_centers = vtkSmartPointer<vtkCellCenters>::New();
d->source_line_observer = vtkSmartPointer<dtkVisualizationDecoratorStreamTracerObserver>::New();
d->source_line_observer->source_line_data = d->source_line_data;
d->source_line_observer->source_line = d->source_line;
......@@ -291,8 +286,6 @@ void dtkVisualizationDecoratorVectorStreamTracer::setData(const QVariant& data)
d_func()->dataset = dataset;
this->restoreSettings();
d->cell_centers->SetInputData(dataset);
double bounds[6];
dataset->GetBounds(bounds);
double pos1[3]; pos1[0] = bounds[0]; pos1[1] = bounds[1]; pos1[2] = bounds[2];
......@@ -392,7 +385,7 @@ bool dtkVisualizationDecoratorVectorStreamTracer::setCurrentFieldName(const QStr
d->streamtracer->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, qPrintable(field_name));
} else if(support == Support::Cell) {
d->streamtracer->SetInputConnection(d->cell_centers->GetOutputPort());
d->streamtracer->SetInputData(d_func()->dataset);
d->streamtracer->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, qPrintable(field_name));
}
d->streamtracer->Modified();
......
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