------------------------------------------------------------------------------ Assembly-like behavior
| 261 | //------------------------------------------------------------------------------ |
| 262 | // Assembly-like behavior |
| 263 | void vtkImageStack::PokeMatrices(vtkMatrix4x4* matrix) |
| 264 | { |
| 265 | if (this->ImageMatrices == nullptr) |
| 266 | { |
| 267 | this->ImageMatrices = vtkCollection::New(); |
| 268 | } |
| 269 | |
| 270 | if (matrix) |
| 271 | { |
| 272 | vtkCollectionSimpleIterator pit; |
| 273 | this->Images->InitTraversal(pit); |
| 274 | vtkImageSlice* image = nullptr; |
| 275 | while ((image = this->Images->GetNextImage(pit)) != nullptr) |
| 276 | { |
| 277 | vtkMatrix4x4* propMatrix = vtkMatrix4x4::New(); |
| 278 | propMatrix->Multiply4x4(image->GetMatrix(), matrix, propMatrix); |
| 279 | image->PokeMatrix(propMatrix); |
| 280 | this->ImageMatrices->AddItem(propMatrix); |
| 281 | propMatrix->Delete(); |
| 282 | } |
| 283 | } |
| 284 | else |
| 285 | { |
| 286 | vtkCollectionSimpleIterator pit; |
| 287 | this->Images->InitTraversal(pit); |
| 288 | vtkImageSlice* image = nullptr; |
| 289 | while ((image = this->Images->GetNextImage(pit)) != nullptr) |
| 290 | { |
| 291 | image->PokeMatrix(nullptr); |
| 292 | } |
| 293 | this->ImageMatrices->RemoveAllItems(); |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | //------------------------------------------------------------------------------ |
| 298 | int vtkImageStack::RenderOpaqueGeometry(vtkViewport* viewport) |
no test coverage detected