------------------------------------------------------------------------------
| 3322 | |
| 3323 | //------------------------------------------------------------------------------ |
| 3324 | void vtkUnstructuredGridVolumeZSweepMapper::SavePixelListFrame() |
| 3325 | { |
| 3326 | vtkPolyData* dataset = vtkPolyData::New(); |
| 3327 | |
| 3328 | vtkIdType height = this->ImageInUseSize[1]; |
| 3329 | vtkIdType width = this->ImageInUseSize[0]; |
| 3330 | vtkPixelListEntry* current; |
| 3331 | vtkIdType i; |
| 3332 | |
| 3333 | vtkPoints* pts = vtkPoints::New(); |
| 3334 | pts->SetDataTypeToDouble(); |
| 3335 | |
| 3336 | vtkDoubleArray* dataArray = vtkDoubleArray::New(); |
| 3337 | vtkCellArray* vertices = vtkCellArray::New(); |
| 3338 | vtkIdType pointId = 0; |
| 3339 | |
| 3340 | // height=151; |
| 3341 | // width=151; |
| 3342 | |
| 3343 | vtkIdType y = 0; // 150; |
| 3344 | while (y < height) |
| 3345 | { |
| 3346 | vtkIdType x = 0; // 150; |
| 3347 | while (x < width) |
| 3348 | { |
| 3349 | i = y * this->ImageInUseSize[0] + x; |
| 3350 | current = this->PixelListFrame->GetFirst(i); |
| 3351 | while (current != nullptr) |
| 3352 | { |
| 3353 | double* values = current->GetValues(); |
| 3354 | |
| 3355 | double point[3]; |
| 3356 | point[0] = x; |
| 3357 | point[1] = y; |
| 3358 | point[2] = values[2]; // zWorld |
| 3359 | |
| 3360 | pts->InsertNextPoint(point); |
| 3361 | dataArray->InsertNextValue(values[3]); |
| 3362 | vertices->InsertNextCell(1, &pointId); |
| 3363 | current = current->GetNext(); |
| 3364 | ++pointId; |
| 3365 | } |
| 3366 | ++x; |
| 3367 | } |
| 3368 | ++y; |
| 3369 | } |
| 3370 | dataset->SetPoints(pts); |
| 3371 | pts->Delete(); |
| 3372 | dataset->SetVerts(vertices); |
| 3373 | vertices->Delete(); |
| 3374 | dataset->GetPointData()->SetScalars(dataArray); |
| 3375 | dataArray->Delete(); |
| 3376 | |
| 3377 | /* |
| 3378 | vtkXMLPolyDataWriter *writer=vtkXMLPolyDataWriter::New(); |
| 3379 | writer->SetFileName("pixellistframe.vtp"); |
| 3380 | writer->SetInputData(dataset); |
| 3381 | writer->SetIdTypeToInt32(); |
nothing calls this directly
no test coverage detected