NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMIDASImageUpdateCopyRegionProcessor.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 itkMIDASImageUpdateCopyRegionProcessor_h
16 #define itkMIDASImageUpdateCopyRegionProcessor_h
17 
19 #include <itkPasteImageFilter.h>
20 
21 namespace itk
22 {
23 
28 template <class TPixel, unsigned int VImageDimension>
29 class ITK_EXPORT MIDASImageUpdateCopyRegionProcessor : public MIDASImageUpdateRegionProcessor<TPixel, VImageDimension> {
30 
31 public:
32 
36  typedef SmartPointer<Self> Pointer;
37  typedef SmartPointer<const Self> ConstPointer;
38 
40  itkNewMacro(Self);
41 
44 
46  typedef TPixel PixelType;
48  typedef typename ImageType::Pointer ImagePointer;
49  typedef typename ImageType::IndexType IndexType;
50  typedef typename ImageType::SizeType SizeType;
52  typedef PasteImageFilter<ImageType, ImageType> PasteImageFilterType;
53  typedef typename PasteImageFilterType::Pointer PasteImagePointerType;
54 
56  itkSetObjectMacro(SourceImage, ImageType);
57  itkGetObjectMacro(SourceImage, ImageType);
58 
60  itkSetMacro(SourceRegionOfInterest, RegionType);
61  itkGetMacro(SourceRegionOfInterest, RegionType);
62 
64  void SetSourceRegionOfInterest(std::vector<int> &region);
65 
66 protected:
68  void PrintSelf(std::ostream& os, Indent indent) const;
70 
71  // This class
72  virtual void ApplyUpdateToAfterImage();
73 
74 private:
75  MIDASImageUpdateCopyRegionProcessor(const Self&); //purposely not implemented
76  void operator=(const Self&); //purposely not implemented
77 
78  ImagePointer m_SourceImage;
79  RegionType m_SourceRegionOfInterest;
80 };
81 
82 }
83 
84 #ifndef ITK_MANUAL_INSTANTIATION
85 #include "itkMIDASImageUpdateCopyRegionProcessor.txx"
86 #endif
87 
88 #endif
ImageType::IndexType IndexType
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:49
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
virtual ~MIDASImageUpdateCopyRegionProcessor()
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:69
Definition: niftkITKAffineResampleImage.cxx:74
Class to support undo/redo of a copy operation, within a given region.
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:29
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
SmartPointer< const Self > ConstPointer
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:37
MIDASImageUpdateRegionProcessor< TPixel, VImageDimension > Superclass
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:35
ImageType::RegionType RegionType
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:51
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
MIDASImageUpdateCopyRegionProcessor Self
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:34
TPixel PixelType
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:43
ImageType::SizeType SizeType
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:50
SmartPointer< Self > Pointer
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:36
Provides methods to do Undo/Redo within a specific Region.
Definition: itkMIDASImageUpdateRegionProcessor.h:30
ImageType::Pointer ImagePointer
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:48
Image< TPixel, VImageDimension > ImageType
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:47
PasteImageFilterType::Pointer PasteImagePointerType
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:53
PasteImageFilter< ImageType, ImageType > PasteImageFilterType
Definition: itkMIDASImageUpdateCopyRegionProcessor.h:52