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

Method ComputeTextureSize

Rendering/Core/vtkImageMapper3D.cxx:964–986  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

962
963//------------------------------------------------------------------------------
964void vtkImageMapper3D::ComputeTextureSize(
965 const int extent[6], int& xdim, int& ydim, int imageSize[2], int textureSize[2])
966{
967 // find dimension indices that will correspond to the
968 // columns and rows of the 2D texture
969 xdim = 1;
970 ydim = 2;
971 if (extent[0] != extent[1])
972 {
973 xdim = 0;
974 if (extent[2] != extent[3])
975 {
976 ydim = 1;
977 }
978 }
979
980 // compute the image dimensions
981 imageSize[0] = (extent[xdim * 2 + 1] - extent[xdim * 2] + 1);
982 imageSize[1] = (extent[ydim * 2 + 1] - extent[ydim * 2] + 1);
983
984 textureSize[0] = imageSize[0];
985 textureSize[1] = imageSize[1];
986}
987
988//------------------------------------------------------------------------------
989void vtkImageMapper3D::GetSlicePlaneInDataCoords(vtkMatrix4x4* propMatrix, double normal[4])

Callers 2

MakeTextureDataMethod · 0.95
MakeTextureGeometryMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected