Developer documentation
Version 3.0.3-105-gd3941f44
MR::Filter Namespace Reference

Classes

class  Base
 
class  ConnectedComponents
 
class  Connector
 
class  CopyKernel4D
 
class  Dilate
 a filter to dilate a mask More...
 
class  DWIBrainMask
 a filter to compute a whole brain mask from a DWI image. More...
 
class  Erode
 a filter to erode a mask More...
 
class  FFT
 a filter to perform an FFT on an image More...
 
class  Gradient
 
class  ImageCorrelationCostFunction
 
class  MaskClean
 a filter to clean up masks typically output by DWIBrainMask filter More...
 
class  Median
 
class  Normalise
 
class  OptimalThreshold
 a filter to compute the optimal threshold to mask a DataSet. More...
 
class  Resize
 
class  Smooth
 
class  ZClean
 

Functions

template<class ImageType >
void fft (ImageType &&vox, const size_t axis, const bool inverse=false)
 
template<class ImageType , class MaskType >
ImageType::value_type estimate_optimal_threshold (ImageType &input, MaskType &mask)
 
template<class ImageType >
ImageType::value_type estimate_optimal_threshold (ImageType &input)
 
template<template< class ImageType > class Interpolator, class ImageTypeDestination , class ImageTypeSource >
void reslice (ImageTypeSource &source, ImageTypeDestination &destination, const transform_type &transform=Adapter::NoTransform, const vector< uint32_t > &oversampling=Adapter::AutoOverSample, const typename ImageTypeDestination::value_type value_when_out_of_bounds=Interp::Base< ImageTypeDestination >::default_out_of_bounds_value())
 convenience function to regrid one Image onto another More...
 
template<template< class VoxelType > class Interpolator, class ImageTypeDestination , class ImageTypeSource , class WarpType >
void warp (ImageTypeSource &source, ImageTypeDestination &destination, WarpType &warp, const typename ImageTypeDestination::value_type value_when_out_of_bounds=Interpolator< ImageTypeSource >::default_out_of_bounds_value(), const vector< uint32_t > oversample=Adapter::AutoOverSample, const bool jacobian_modulate=false)
 convenience function to warp one image onto another More...
 

Function Documentation

◆ estimate_optimal_threshold() [1/2]

template<class ImageType >
ImageType::value_type MR::Filter::estimate_optimal_threshold ( ImageType &  input)
inline

Definition at line 210 of file optimal_threshold.h.

◆ estimate_optimal_threshold() [2/2]

template<class ImageType , class MaskType >
ImageType::value_type MR::Filter::estimate_optimal_threshold ( ImageType &  input,
MaskType &  mask 
)

Definition at line 186 of file optimal_threshold.h.

◆ reslice()

template<template< class ImageType > class Interpolator, class ImageTypeDestination , class ImageTypeSource >
void MR::Filter::reslice ( ImageTypeSource &  source,
ImageTypeDestination &  destination,
const transform_type transform = Adapter::NoTransform,
const vector< uint32_t > &  oversampling = Adapter::AutoOverSample,
const typename ImageTypeDestination::value_type  value_when_out_of_bounds = Interp::Base<ImageTypeDestination>::default_out_of_bounds_value() 
)

convenience function to regrid one Image onto another

This function resamples (regrids) the Image source onto the Image& destination, using the templated interpolator class.

A linear transformation can be optionally applied (that maps from the destination to the source)

For example:

// source and destination data:
auto source = Image<float>::create (argument[0]);
auto template_header = Image::header (argument[1]);
auto destination = Image<float>::create (argument[2], template_header);
// regrid source onto destination using linear interpolation:
Image::Filter::reslice<Interp::Linear> (source, destination);
static Image create(const std::string &image_name, const Header &template_header, bool add_to_command_history=true)
Definition: image.h:192
vector< ParsedArgument > argument
the list of arguments parsed from the command-line

Definition at line 48 of file reslice.h.

◆ warp()

template<template< class VoxelType > class Interpolator, class ImageTypeDestination , class ImageTypeSource , class WarpType >
void MR::Filter::warp ( ImageTypeSource &  source,
ImageTypeDestination &  destination,
WarpType &  warp,
const typename ImageTypeDestination::value_type  value_when_out_of_bounds = Interpolator<ImageTypeSource>::default_out_of_bounds_value(),
const vector< uint32_t >  oversample = Adapter::AutoOverSample,
const bool  jacobian_modulate = false 
)

convenience function to warp one image onto another

This function resamples (regrids) the Image source onto the Image& destination, using the templated interpolator class and a supplied deformation field.

For example:

// source and destination data:
auto source = Image<float>::open(argument[0]);
auto template = Header::open(argument[2]);
auto destination = Image<float>::create (argument[3], template)
// regrid source onto destination using linear interpolation:
Filter::warp<Image::Interp::Linear> (source, destination, warp);
functions and classes related to image data input/output
Definition: image.h:41
static Image open(const std::string &image_name, bool read_write_if_existing=false)
Definition: image.h:189
void warp(ImageTypeSource &source, ImageTypeDestination &destination, WarpType &warp, const typename ImageTypeDestination::value_type value_when_out_of_bounds=Interpolator< ImageTypeSource >::default_out_of_bounds_value(), const vector< uint32_t > oversample=Adapter::AutoOverSample, const bool jacobian_modulate=false)
convenience function to warp one image onto another
Definition: warp.h:65
LinearInterp< ImageType, LinearInterpProcessingType::Value > Linear
Definition: linear.h:586

Definition at line 65 of file warp.h.