------------------------------------------------------------------------------
| 206 | |
| 207 | //------------------------------------------------------------------------------ |
| 208 | void vtkMultiBlockVolumeMapper::LoadDataSet(vtkRenderer* ren, vtkVolume* vol) |
| 209 | { |
| 210 | this->ClearMappers(); |
| 211 | |
| 212 | auto input = this->GetDataObjectInput(); |
| 213 | if (auto inputTree = vtkDataObjectTree::SafeDownCast(input)) |
| 214 | { |
| 215 | this->CreateMappers(inputTree, ren, vol); |
| 216 | } |
| 217 | else if (auto inputImage = vtkImageData::SafeDownCast(input)) |
| 218 | { |
| 219 | vtkSmartVolumeMapper* mapper = this->CreateMapper(); |
| 220 | mapper->SetInputData(inputImage); |
| 221 | this->Mappers.push_back(mapper); |
| 222 | } |
| 223 | else if (auto inputRectGrid = vtkRectilinearGrid::SafeDownCast(input)) |
| 224 | { |
| 225 | vtkSmartVolumeMapper* mapper = this->CreateMapper(); |
| 226 | mapper->SetInputData(inputRectGrid); |
| 227 | this->Mappers.push_back(mapper); |
| 228 | } |
| 229 | else |
| 230 | { |
| 231 | vtkErrorMacro( |
| 232 | "Cannot handle input of type '" << (input ? input->GetClassName() : "(nullptr)") << "'."); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | //------------------------------------------------------------------------------ |
| 237 | void vtkMultiBlockVolumeMapper::CreateMappers( |
no test coverage detected