![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/ImageDownsampler.h>
Manager for image downsampling/upsampling. More...
Manager for image downsampling/upsampling.
This class should be used when some computations should be executed on an image with a lower resolution. The intended workflow is : OriginalImage -(ImageDownsampler::downsample)-> DownsampledImage -(SomeAlgorithm)-> DownsampledOutput -(ImageDownsampler::upsample)-> Output
If the input image has a mask, the mask will be converted to an ExplicitMask and resampled as well.
Public Types | |
enum | ResamplingMode { MAXDIMENSION , MAXDIMENSION_EQUAL , MAXSIZE , MAXSIZE_EQUAL , MAXSPACING , MINSPACING , SPACING_EQUAL } |
enum | ResamplingMethod { NEAREST , LINEAR , HYBRID } |
Public Member Functions | |
ImageDownsampler (const vec3 &originalSpacing, ResamplingMode mode, double resamplingParameter, ResamplingMethod method) | |
void | downsample (const SharedImage *inIm, SharedImage *&outIm, bool labelMode=false, bool zeroMask=false) |
void | downsample (const SharedImageSet *inIm, SharedImageSet *&outIm, bool labelMode=false, bool zeroMask=false) |
void | upsample (const SharedImage *inIm, SharedImage *&outIm, bool labelMode=false, bool zeroMask=false) |
void | upsample (const SharedImageSet *inIm, SharedImageSet *&outIm, bool labelMode=false, bool zeroMask=false) |
bool | different (const Image *desc) const |
Returns true if the resulting image dimensions are different and hence processing is necessary. | |
Protected Attributes | |
vec3 | m_originalSpacing |
ResamplingMode | m_mode |
ResamplingMethod | m_method |
double | m_resamplingParam |
int | m_newWidth |
int | m_newHeight |
int | m_newSlices |
double | m_newSpacing [3] |
enum ResamplingMode |
enum ResamplingMethod |