MCPcopy Create free account
hub / github.com/Kitware/VTK / PokeMatrices

Method PokeMatrices

Rendering/Image/vtkImageStack.cxx:263–295  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Assembly-like behavior

Source from the content-addressed store, hash-verified

261//------------------------------------------------------------------------------
262// Assembly-like behavior
263void 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//------------------------------------------------------------------------------
298int vtkImageStack::RenderOpaqueGeometry(vtkViewport* viewport)

Callers 4

GetBoundsMethod · 0.95
RenderOpaqueGeometryMethod · 0.95
RenderOverlayMethod · 0.95

Calls 9

GetNextImageMethod · 0.80
Multiply4x4Method · 0.80
PokeMatrixMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
InitTraversalMethod · 0.45
GetMatrixMethod · 0.45
AddItemMethod · 0.45
RemoveAllItemsMethod · 0.45

Tested by

no test coverage detected