3 #include <itkVectorImage.h> 9 template <
class T1,
class T2,
unsigned int Dimension>
10 unsigned int computePatchMeanAndCovariance(
const itk::VectorImage <T1, Dimension> *inputImage,
const itk::ImageRegion<Dimension> &patchRegion,
11 itk::VariableLengthVector <T2> &patchMean, vnl_matrix <T2> &patchCov);
14 template <
class T1,
class T2,
unsigned int Dimension>
16 itk::Image<unsigned char, Dimension> *maskImage,
const itk::ImageRegion<Dimension> &averagingRegion,
17 int localNeighborhood);
20 template <
class T>
double VectorCovarianceTest(vnl_matrix <T> &logRefPatchCov, vnl_matrix <T> &movingPatchCov);
23 template <
class T>
double VectorMeansTest(itk::VariableLengthVector <T> &refPatchMean, itk::VariableLengthVector <T> &movingPatchMean,
24 const unsigned int &refPatchNumElts,
const unsigned int &movingPatchNumElts,
25 vnl_matrix <T> &refPatchCov, vnl_matrix <T> &movingPatchCov);
unsigned int computePatchMeanAndCovariance(const itk::VectorImage< T1, Dimension > *inputImage, const itk::ImageRegion< Dimension > &patchRegion, itk::VariableLengthVector< T2 > &patchMean, vnl_matrix< T2 > &patchCov)
Computes the average and covariance matrix from a patch of a vector image.
double VectorCovarianceTest(vnl_matrix< T > &logRefPatchCov, vnl_matrix< T > &movingPatchCov)
Test if covariance matrices are different (returns distance)
double VectorMeansTest(itk::VariableLengthVector< T > &refPatchMean, itk::VariableLengthVector< T > &movingPatchMean, const unsigned int &refPatchNumElts, const unsigned int &movingPatchNumElts, vnl_matrix< T > &refPatchCov, vnl_matrix< T > &movingPatchCov)
Test if vector means are different (returns distance)
void computeAverageLocalCovariance(vnl_matrix< T2 > &resVariance, itk::VectorImage< T1, Dimension > *inputImage, itk::Image< unsigned char, Dimension > *maskImage, const itk::ImageRegion< Dimension > &averagingRegion, int localNeighborhood)
Noise estimation for a patch of a vector image.