58 vtkInformationVector** inputVector,
59 vtkInformationVector* outputVector)
68 std::size_t nStations =
_stations->size();
74 bool useStationValues(
false);
77 for (std::size_t i = 1; i < nStations; i++)
82 useStationValues =
true;
89 vtkSmartPointer<vtkInformation> outInfo =
90 outputVector->GetInformationObject(0);
91 vtkSmartPointer<vtkPolyData> output =
92 vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
94 vtkSmartPointer<vtkPoints> newStations = vtkSmartPointer<vtkPoints>::New();
95 vtkSmartPointer<vtkCellArray> newVerts =
96 vtkSmartPointer<vtkCellArray>::New();
97 newVerts->Allocate(nStations);
99 vtkSmartPointer<vtkCellArray> newLines;
103 newLines = vtkSmartPointer<vtkCellArray>::New();
106 if (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()) >
112 vtkSmartPointer<vtkIntArray> station_ids =
113 vtkSmartPointer<vtkIntArray>::New();
114 station_ids->SetNumberOfComponents(1);
115 station_ids->SetName(
"SiteIDs");
117 vtkSmartPointer<vtkDoubleArray> station_values =
118 vtkSmartPointer<vtkDoubleArray>::New();
119 station_values->SetNumberOfComponents(1);
120 station_values->SetName(
"StationValue");
122 vtkSmartPointer<vtkIntArray> strat_ids =
123 vtkSmartPointer<vtkIntArray>::New();
124 strat_ids->SetNumberOfComponents(1);
125 strat_ids->SetName(
"Stratigraphies");
127 std::size_t lastMaxIndex(0);
128 std::size_t site_count(0);
133 vtkIdType sid = newStations->InsertNextPoint(station->data());
134 station_ids->InsertNextValue(site_count);
135 if (useStationValues)
137 station_values->InsertNextValue(
143 newVerts->InsertNextCell(1, &sid);
147 std::vector<GeoLib::Point*> profile =
149 std::vector<std::string> soilNames =
151 const std::size_t nLayers = profile.size();
153 for (std::size_t i = 1; i < nLayers; i++)
155 newStations->InsertNextPoint(profile[i]->data());
156 station_ids->InsertNextValue(site_count);
157 newLines->InsertNextCell(2);
158 newLines->InsertCellPoint(
160 newLines->InsertCellPoint(
163 if (useStationValues)
165 station_values->InsertNextValue(
167 ->getStationValue());
175 output->SetPoints(newStations);
179 output->SetVerts(newVerts);
180 output->GetCellData()->AddArray(station_ids);
181 output->GetCellData()->SetActiveAttribute(
182 "SiteIDs", vtkDataSetAttributes::SCALARS);
186 output->SetLines(newLines);
188 output->GetCellData()->AddArray(strat_ids);
189 output->GetCellData()->SetActiveAttribute(
190 "Stratigraphies", vtkDataSetAttributes::SCALARS);
192 if (useStationValues)
194 output->GetPointData()->AddArray(station_values);