Returns that stack index (one-based) corresponding to the specified position.
(int channel, int slice, int frame)
| 2024 | |
| 2025 | /** Returns that stack index (one-based) corresponding to the specified position. */ |
| 2026 | public int getStackIndex(int channel, int slice, int frame) { |
| 2027 | if (channel<1) channel = 1; |
| 2028 | if (channel>nChannels) channel = nChannels; |
| 2029 | if (slice<1) slice = 1; |
| 2030 | if (slice>nSlices) slice = nSlices; |
| 2031 | if (frame<1) frame = 1; |
| 2032 | if (frame>nFrames) frame = nFrames; |
| 2033 | return (frame-1)*nChannels*nSlices + (slice-1)*nChannels + channel; |
| 2034 | } |
| 2035 | |
| 2036 | /* Hack needed to make the HyperStackReducer work. */ |
| 2037 | public void resetStack() { |
no outgoing calls
no test coverage detected