Skip to content

Libs/Image/VectorImage.h

Namespaces

Name
shapeworks

Classes

Name
class shapeworks::VectorImage
Gradient (vector) image.

Source code

#pragma once

#include <itkGradientImageFilter.h>
#include <itkVectorLinearInterpolateImageFunction.h>

#include "Image.h"

namespace shapeworks {

class VectorImage {
 public:
  using GradientImageFilter = itk::GradientImageFilter<Image::ImageType>;
  using ImageType = itk::Image<Covariant, 3>;
  using GradientInterpolatorType = itk::VectorLinearInterpolateImageFunction<ImageType, Image::PixelType>;
  using ImageIterator = itk::ImageRegionIterator<ImageType>;

  VectorImage(const Image& dt_img);
  VectorImage() = delete;
  ~VectorImage() = default;

  Vector evaluate(Point p);
  ImageIterator iterator();

 private:
  itk::SmartPointer<ImageType> itk_image_;
  itk::SmartPointer<GradientInterpolatorType> interpolator_;
};

}  // namespace shapeworks

Updated on 2022-07-23 at 16:40:07 -0600