Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLAbstractVolumeResampler.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright(c) Kitware Inc.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16==============================================================================*/
17
18#ifndef __vtkMRMLAbstractVolumeResampler_h
19#define __vtkMRMLAbstractVolumeResampler_h
20
21// GeneralizedReformat MRML includes
22#include "vtkSlicerGeneralizedReformatModuleMRMLExport.h"
23
24// MRML includes
28
29// MRMLLogic includes
31
32// VTK includes
33#include <vtkObject.h>
34
38class VTK_SLICER_GENERALIZEDREFORMAT_MODULE_MRML_EXPORT vtkMRMLAbstractVolumeResampler : public vtkObject
39{
40public:
41 vtkTypeMacro(vtkMRMLAbstractVolumeResampler, vtkObject);
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
44 enum
45 {
51 InterpolationType_Last // must be last
52 };
53
54 typedef std::map<std::string, std::string> ResamplingParameters;
55
56 virtual bool Resample(vtkMRMLVolumeNode* inputVolume,
57 vtkMRMLVolumeNode* outputVolume,
58 vtkMRMLTransformNode* resamplingTransform,
59 vtkMRMLVolumeNode* referenceVolume,
60 int interpolationType,
61 const ResamplingParameters& resamplingParameter) = 0;
62
65 static std::string GetParameterValue(const ResamplingParameters& parameters, const std::string& name);
66 static double GetParameterValueAsDouble(const ResamplingParameters& parameters, const std::string& name);
67 static int GetParameterValueAsInt(const ResamplingParameters& parameters, const std::string& name);
69
72 static void SetParameterValue(ResamplingParameters& parameters, const std::string& name, const std::string& value);
73 static void SetParameterValueAsDouble(ResamplingParameters& parameters, const std::string& name, double value);
74 static void SetParameterValueAsInt(ResamplingParameters& parameters, const std::string& name, int value);
76
82
83protected:
85 ~vtkMRMLAbstractVolumeResampler() override = default;
88
90};
91
92#endif
vtkMRMLAbstractVolumeResampler(const vtkMRMLAbstractVolumeResampler &)=delete
static double GetParameterValueAsDouble(const ResamplingParameters &parameters, const std::string &name)
static std::string GetParameterValue(const ResamplingParameters &parameters, const std::string &name)
void operator=(const vtkMRMLAbstractVolumeResampler &)=delete
static void SetParameterValueAsDouble(ResamplingParameters &parameters, const std::string &name, double value)
static void SetParameterValueAsInt(ResamplingParameters &parameters, const std::string &name, int value)
static void SetParameterValue(ResamplingParameters &parameters, const std::string &name, const std::string &value)
}@
void SetMRMLApplicationLogic(vtkMRMLApplicationLogic *appLogic)
}@
~vtkMRMLAbstractVolumeResampler() override=default
std::map< std::string, std::string > ResamplingParameters
void PrintSelf(ostream &os, vtkIndent indent) override
vtkMRMLAbstractVolumeResampler()=default
}@
static int GetParameterValueAsInt(const ResamplingParameters &parameters, const std::string &name)
vtkMRMLApplicationLogic * GetMRMLApplicationLogic() const
virtual bool Resample(vtkMRMLVolumeNode *inputVolume, vtkMRMLVolumeNode *outputVolume, vtkMRMLTransformNode *resamplingTransform, vtkMRMLVolumeNode *referenceVolume, int interpolationType, const ResamplingParameters &resamplingParameter)=0
MRML node for representing a transformation between this node space and a parent node space.
MRML node for representing a vector volume (image stack).
MRML node for representing a volume (image stack).