1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
/*=========================================================================
Program: Advanced Normalization Tools
Copyright (c) ConsortiumOfANTS. All rights reserved.
See accompanying COPYING.txt or
https://github.com/stnava/ANTs/blob/master/ANTSCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __iMathFunctions1_h
#define __iMathFunctions1_h
#include "antsUtilities.h"
#include "itkFlatStructuringElement.h"
namespace ants
{
// Templated functions that perform the work for
// iMath.cxx and iMath.cpp (in ANTSR)
// after each function, suggested default parameters are defined
#define iMathGetLargestComponentMinSize 50;
template <unsigned int ImageDimension>
typename itk::FlatStructuringElement<ImageDimension>
iMathGetFlatStructuringElement(unsigned int shape,
unsigned long radius,
bool radiusIsParametric,
unsigned int lines,
unsigned int thickness,
bool includeCenter);
#define iMathGetFlatStructuringElementShape 1;
#define iMathGetFlatStructuringElementRadius 1;
#define iMathGetFlatStructuringElementLines 3;
#define iMathGetFlatStructuringElementThickness 1;
#define iMathGetFlatStructuringElementIncludeCenter false;
#define iMathGetFlatStructuringElementRadiusIsParametric false;
// Morphological Closing
template <typename ImageType>
typename ImageType::Pointer
iMathMC(typename ImageType::Pointer image,
unsigned long radius, /*1*/
typename ImageType::PixelType closeValue,
unsigned int shape,
bool radiusIsParametric,
unsigned lines,
unsigned int thickness,
bool includeCenter);
#define iMathMCRadius 1;
#define iMathMCValue 1;
// Morphological dilation
template <typename ImageType>
typename ImageType::Pointer
iMathMD(typename ImageType::Pointer image,
unsigned long radius, /*1*/
typename ImageType::PixelType dilateValue,
unsigned int shape,
bool radiusIsParametric,
unsigned lines,
unsigned int thickness,
bool includeCenter);
#define iMathMDRadius 1;
#define iMathMDValue 1;
// Morphological erosion
template <typename ImageType>
typename ImageType::Pointer
iMathME(typename ImageType::Pointer image,
unsigned long radius, /*1*/
typename ImageType::PixelType erodeValue,
unsigned int shape,
bool radiusIsParametric,
unsigned lines,
unsigned int thickness,
bool includeCenter);
#define iMathMERadius 1;
#define iMathMEValue 1;
// Morphological opening
template <typename ImageType>
typename ImageType::Pointer
iMathMO(typename ImageType::Pointer image,
unsigned long radius, /*1*/
typename ImageType::PixelType openValue,
unsigned int shape,
bool radiusIsParametric,
unsigned lines,
unsigned int thickness,
bool includeCenter);
#define iMathMORadius 1;
#define iMathMOValue 1;
// Maurer distance - returns Euclidean distance to binary object
template <typename ImageType>
typename ImageType::Pointer
iMathMaurerDistance(typename ImageType::Pointer image, /*1*/
typename ImageType::PixelType foreground);
#define iMathMaurerDistanceForeground 1;
template <typename ImageType>
typename ImageType::Pointer
iMathLaplacian(typename ImageType::Pointer image, double sigma, bool normalize); /*1*/
#define iMathLaplacianSigma 0.5;
#define iMathLaplacianNormalize false;
// Normalize intensity values to lie in [0,1]
template <typename ImageType>
typename ImageType::Pointer
iMathNormalize(typename ImageType::Pointer image); /*1*/
template <typename ImageType>
typename ImageType::Pointer
iMathPad(typename ImageType::Pointer image, int padding); /*1*/
template <typename ImageType>
typename ImageType::Pointer
iMathPeronaMalik(typename ImageType::Pointer image,
unsigned long nIterations, /*1*/
double conductance);
#define iMathPeronaMalikConductance 0.25;
#define iMathPeronaMalikNIterations 1;
template <typename ImageType>
typename ImageType::Pointer
iMathPropagateLabelsThroughMask(typename ImageType::Pointer mask, /*1*/
typename ImageType::Pointer lables,
double stoppingValue,
unsigned int propagationMethod);
#define iMathPropagateLabelsThroughMaskStoppingValue 100.0;
#define iMathPropagateLabelsThroughMaskMethod 0;
template <typename ImageType>
typename ImageType::Pointer
iMathSharpen(typename ImageType::Pointer image); /*1*/
template <typename ImageType>
typename ImageType::Pointer
iMathTruncateIntensity(typename ImageType::Pointer image,
double lowerQ, /*1*/
double upperQ,
int nBins,
typename itk::Image<int, ImageType::ImageDimension>::Pointer maskImage);
#define iMathTruncateIntensityNBins 64;
} // namespace ants
#include "iMathFunctions1.hxx"
#endif
|