NPL
Neurological Programs and Libraries
slicer.h File Reference
#include <vector>
#include <cstdint>
#include <cstddef>
#include <cassert>

Go to the source code of this file.

Classes

class  npl::Slicer
 This class is used to step through an ND array in order of dimensions. Order may be any size from 0 to the number of dimensions. The first member of order will be the fastest moving, and the last will be the slowest. Any not dimensions not included in the order vector will be slower than the last member of order. More...
 
class  npl::ChunkSlicer
 This class is used to step through an ND array in order of dimensions, but unlike Slicer it breaks the NDArray into chunks. Iteration stops at the end of each chunk until nextChunk is called. By default only one chunk is used, equal to the entire image. Use setBreaks() to set the frequency of chunks. The input to setBreaks() is an array of integers, where the next chunk occurs when distbreak == 0, with the special property that break=0 indicates no breaks for the dimension. So for a 3D image, setBreaks({1,0,0}) will stop every time a new x-values is reached. Note that the affects the order of iteration, so x cannot be the fastest iterator. setChunkSize() is an alias for setBreaks. Note that in cases where breaksize != 0, for example image size = 5 and break = 3, chunk sizes will differ during the course of iteration! More...
 
class  npl::KSlicer
 This class is used to slice an image in along a dimension, and to step an arbitrary direction in an image. Order may be any size from 0 to the number of dimensions. The first member of order will be the fastest moving, and the last will be the slowest. Any not dimensions not included in the order vector will be slower than the last member of order. More...
 

Namespaces

 npl