iMSTK
Interactive Medical Simulation Toolkit
imstkImageGradient.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkGeometryAlgorithm.h"
10 
11 namespace imstk
12 {
13 class ImageData;
14 
21 {
22 public:
23  ImageGradient();
24  ~ImageGradient() override = default;
25 
26 public:
30  void setInputImage(std::shared_ptr<ImageData> inputImage);
31 
36  imstkSetMacro(ComputeMagnitude, bool);
37  imstkGetMacro(ComputeMagnitude, bool);
39 
40 protected:
41  void requestUpdate() override;
42 
43 private:
44  bool m_ComputeMagnitude;
45 };
46 } // namespace imstk
void requestUpdate() override
Users can implement this for the logic to be run.
Compound Geometry.
This filter computes the gradient or magnitude using sobels kernel over an image. ...
Abstract base class for geometry algorithms. GeometryAlgorithms take N input geometries and produce N...
imstkSetMacro(ComputeMagnitude, bool)
Get/Set whether to compute the magnitude If on, a single channel magnitude image is output...
void setInputImage(std::shared_ptr< ImageData > inputImage)
Required input, port 0.