------------------------------------------------------------------------------
| 962 | |
| 963 | //------------------------------------------------------------------------------ |
| 964 | void 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 | //------------------------------------------------------------------------------ |
| 989 | void vtkImageMapper3D::GetSlicePlaneInDataCoords(vtkMatrix4x4* propMatrix, double normal[4]) |
no outgoing calls
no test coverage detected