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

Method SortBlocksBackToFront

Rendering/VolumeOpenGL2/vtkVolumeTexture.cxx:869–889  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

867
868//------------------------------------------------------------------------------
869void vtkVolumeTexture::SortBlocksBackToFront(vtkRenderer* ren, vtkMatrix4x4* volumeMat)
870{
871 if (this->ImageDataBlocks.size() > 1)
872 {
873 vtkBlockSortHelper::BackToFront<vtkImageData> sortBlocks(ren, volumeMat);
874 vtkBlockSortHelper::Sort(
875 this->ImageDataBlocks.begin(), this->ImageDataBlocks.end(), sortBlocks);
876
877 size_t const numBlocks = this->ImageDataBlocks.size();
878 this->SortedVolumeBlocks.clear();
879 this->SortedVolumeBlocks.reserve(numBlocks);
880 for (size_t i = 0; i < numBlocks; i++)
881 {
882 this->SortedVolumeBlocks.push_back(this->ImageDataBlockMap[this->ImageDataBlocks[i]]);
883 }
884
885 // Load the first block
886 auto firstBlock = this->SortedVolumeBlocks.at(0);
887 this->LoadTexture(this->InterpolationType, firstBlock);
888 }
889}
890
891//------------------------------------------------------------------------------
892void vtkVolumeTexture::SetPartitions(int x, int y, int z)

Callers 1

RenderSingleInputMethod · 0.80

Calls 9

LoadTextureMethod · 0.95
SortFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected