NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMIDASImageUpdateProcessor.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkMIDASImageUpdateProcessor_h
16 #define itkMIDASImageUpdateProcessor_h
17 
18 #include <itkObject.h>
19 #include <itkObjectFactory.h>
20 #include <itkImage.h>
21 
22 namespace itk
23 {
24 
35 template <class TPixel, unsigned int VImageDimension>
36 class ITK_EXPORT MIDASImageUpdateProcessor : public Object {
37 
38 public:
39 
42  typedef Object Superclass;
43  typedef SmartPointer<Self> Pointer;
44  typedef SmartPointer<const Self> ConstPointer;
45 
47  itkTypeMacro(MIDASImageUpdateProcessor, Object)
48 
49 
53  itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);
54 
56  typedef TPixel PixelType;
57  typedef Image<TPixel, VImageDimension> ImageType;
58  typedef typename ImageType::Pointer ImagePointer;
59  typedef typename ImageType::IndexType IndexType;
60  typedef typename ImageType::SizeType SizeType;
61  typedef typename ImageType::RegionType RegionType;
62 
64  itkSetObjectMacro(DestinationImage, ImageType)
65  itkGetObjectMacro(DestinationImage, ImageType)
66 
68  virtual void Undo() = 0;
69 
71  virtual void Redo() = 0;
72 
73 protected:
75  void PrintSelf(std::ostream& os, Indent indent) const override;
76  virtual ~MIDASImageUpdateProcessor() {}
77 
78  virtual void ValidateInputs();
79 
80 private:
81  MIDASImageUpdateProcessor(const Self&); //purposely not implemented
82  void operator=(const Self&); //purposely not implemented
83 
84  ImagePointer m_DestinationImage;
85 
86 };
87 
88 }
89 
90 #ifndef ITK_MANUAL_INSTANTIATION
91 #include "itkMIDASImageUpdateProcessor.txx"
92 #endif
93 
94 #endif
Class that takes a pointer to a destination image, and applies changes directly to it and enablng und...
Definition: itkMIDASImageUpdateProcessor.h:36
Definition: niftkMeshSmoother.cxx:19
Definition: niftkITKAffineResampleImage.cxx:74
SmartPointer< const Self > ConstPointer
Definition: itkMIDASImageUpdateProcessor.h:44
ImageType::SizeType SizeType
Definition: itkMIDASImageUpdateProcessor.h:60
ImageType::RegionType RegionType
Definition: itkMIDASImageUpdateProcessor.h:61
ImageType::Pointer ImagePointer
Definition: itkMIDASImageUpdateProcessor.h:58
MIDASImageUpdateProcessor Self
Definition: itkMIDASImageUpdateProcessor.h:41
Simultaneous itk::Image and itk::Array (and hence vnl_vector) class.
Object Superclass
Definition: itkMIDASImageUpdateProcessor.h:42
ImageType::IndexType IndexType
Definition: itkMIDASImageUpdateProcessor.h:59
TPixel PixelType
Definition: itkMIDASImageUpdateProcessor.h:56
SmartPointer< Self > Pointer
Definition: itkMIDASImageUpdateProcessor.h:43