69 vtkInformationVector** inputVector,
70 vtkInformationVector* outputVector)
79 std::size_t nStations =
_stations->size();
85 bool useStationValues(
false);
88 for (std::size_t i = 1; i < nStations; i++)
93 useStationValues =
true;
100 vtkSmartPointer<vtkInformation> outInfo =
101 outputVector->GetInformationObject(0);
102 vtkSmartPointer<vtkPolyData> output =
103 vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
105 vtkSmartPointer<vtkPoints> newStations = vtkSmartPointer<vtkPoints>::New();
106 vtkSmartPointer<vtkCellArray> newVerts =
107 vtkSmartPointer<vtkCellArray>::New();
108 newVerts->Allocate(nStations);
110 vtkSmartPointer<vtkCellArray> newLines;
114 newLines = vtkSmartPointer<vtkCellArray>::New();
117 if (outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()) >
123 vtkSmartPointer<vtkIntArray> station_ids =
124 vtkSmartPointer<vtkIntArray>::New();
125 station_ids->SetNumberOfComponents(1);
126 station_ids->SetName(
"SiteIDs");
128 vtkSmartPointer<vtkDoubleArray> station_values =
129 vtkSmartPointer<vtkDoubleArray>::New();
130 station_values->SetNumberOfComponents(1);
131 station_values->SetName(
"StationValue");
133 vtkSmartPointer<vtkIntArray> strat_ids =
134 vtkSmartPointer<vtkIntArray>::New();
135 strat_ids->SetNumberOfComponents(1);
136 strat_ids->SetName(
"Stratigraphies");
138 std::size_t lastMaxIndex(0);
139 std::size_t site_count(0);
144 vtkIdType sid = newStations->InsertNextPoint(station->data());
145 station_ids->InsertNextValue(site_count);
146 if (useStationValues)
148 station_values->InsertNextValue(
154 newVerts->InsertNextCell(1, &sid);
158 std::vector<GeoLib::Point*> profile =
160 std::vector<std::string> soilNames =
162 const std::size_t nLayers = profile.size();
164 for (std::size_t i = 1; i < nLayers; i++)
166 newStations->InsertNextPoint(profile[i]->data());
167 station_ids->InsertNextValue(site_count);
168 newLines->InsertNextCell(2);
169 newLines->InsertCellPoint(
171 newLines->InsertCellPoint(
174 if (useStationValues)
176 station_values->InsertNextValue(
186 output->SetPoints(newStations);
190 output->SetVerts(newVerts);
191 output->GetCellData()->AddArray(station_ids);
192 output->GetCellData()->SetActiveAttribute(
193 "SiteIDs", vtkDataSetAttributes::SCALARS);
197 output->SetLines(newLines);
199 output->GetCellData()->AddArray(strat_ids);
200 output->GetCellData()->SetActiveAttribute(
201 "Stratigraphies", vtkDataSetAttributes::SCALARS);
203 if (useStationValues)
205 output->GetPointData()->AddArray(station_values);