iMSTK
Interactive Medical Simulation Toolkit
imstkImageReslice.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 #include "imstkMath.h"
11 
12 namespace imstk
13 {
14 class ImageData;
15 
22 {
23 public:
24  enum class InterpolateType
25  {
26  Linear,
27  Cubic,
28  NearestNeighbor
29  };
30 
31 public:
32  ImageReslice();
33  ~ImageReslice() override = default;
34 
35 public:
36  std::shared_ptr<ImageData> getOutputImage() const;
37 
38  void setInputImage(std::shared_ptr<ImageData> inputData);
39 
43  imstkSetMacro(Transform, const Mat4d&);
44  imstkGetMacro(Transform, const Mat4d&);
46 
50  imstkSetMacro(InterpolationType, InterpolateType);
51  imstkGetMacro(InterpolationType, InterpolateType);
53 
54 protected:
55  void requestUpdate() override;
56 
57 private:
58  Mat4d m_Transform;
59  InterpolateType m_InterpolationType = InterpolateType::Linear;
60 };
61 } // namespace imstk
void requestUpdate() override
Users can implement this for the logic to be run.
imstkSetMacro(Transform, const Mat4d &)
Get/Set the transformation matrix.
Compound Geometry.
Abstract base class for geometry algorithms. GeometryAlgorithms take N input geometries and produce N...
Resamples an image using a transform.