------------------------------------------------------------------------------
| 342 | |
| 343 | //------------------------------------------------------------------------------ |
| 344 | vtkSmartPointer<vtkConstantArray<unsigned char>> vtkStructuredData::GetCellTypes( |
| 345 | int extent[6], bool usePixelVoxelOrientation) |
| 346 | { |
| 347 | const int dataDescription = vtkStructuredData::GetDataDescriptionFromExtent(extent); |
| 348 | const int dimension = vtkStructuredData::GetDataDimension(dataDescription); |
| 349 | // NOLINTNEXTLINE(readability-avoid-nested-conditional-operator) |
| 350 | const int cellType = dimension == 3 ? (usePixelVoxelOrientation ? VTK_VOXEL : VTK_HEXAHEDRON) |
| 351 | // NOLINTNEXTLINE(readability-avoid-nested-conditional-operator) |
| 352 | : dimension == 2 ? (usePixelVoxelOrientation ? VTK_PIXEL : VTK_QUAD) |
| 353 | // NOLINTNEXTLINE(readability-avoid-nested-conditional-operator) |
| 354 | : dimension == 1 ? VTK_LINE |
| 355 | // NOLINTNEXTLINE(readability-avoid-nested-conditional-operator) |
| 356 | : dimension == 0 && dataDescription == VTK_STRUCTURED_SINGLE_POINT ? VTK_VERTEX |
| 357 | : VTK_EMPTY_CELL; |
| 358 | auto cellTypesArray = vtkSmartPointer<vtkConstantArray<unsigned char>>::New(); |
| 359 | cellTypesArray->ConstructBackend(cellType); |
| 360 | cellTypesArray->SetNumberOfComponents(1); |
| 361 | cellTypesArray->SetNumberOfTuples(vtkStructuredData::GetNumberOfCells(extent)); |
| 362 | return cellTypesArray; |
| 363 | } |
| 364 | |
| 365 | //------------------------------------------------------------------------------ |
| 366 | vtkSmartPointer<vtkConstantArray<int>> vtkStructuredData::GetCellTypesArray( |
nothing calls this directly
no test coverage detected