NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMIDASImageUpdatePasteRegionProcessor.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 itkMIDASImageUpdatePasteRegionProcessor_h
16 #define itkMIDASImageUpdatePasteRegionProcessor_h
17 
19 
20 namespace itk
21 {
22 
28 template <class TPixel, unsigned int VImageDimension>
29 class ITK_EXPORT MIDASImageUpdatePasteRegionProcessor : 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 
54  itkSetObjectMacro(SourceImage, ImageType);
55  itkGetObjectMacro(SourceImage, ImageType);
56 
58  itkSetMacro(SourceRegionOfInterest, RegionType);
59  itkGetMacro(SourceRegionOfInterest, RegionType);
60 
62  void SetSourceRegionOfInterest(std::vector<int> &region);
63 
65  itkSetMacro(CopyBackground, bool);
66  itkGetMacro(CopyBackground, bool);
67 
68 protected:
70  void PrintSelf(std::ostream& os, Indent indent) const;
72 
73  // This method that applies the change.
74  virtual void ApplyUpdateToAfterImage();
75 
76 private:
77  MIDASImageUpdatePasteRegionProcessor(const Self&); //purposely not implemented
78  void operator=(const Self&); //purposely not implemented
79 
80  ImagePointer m_SourceImage;
81  RegionType m_SourceRegionOfInterest;
82 
83  bool m_CopyBackground;
84 };
85 
86 }
87 
88 #ifndef ITK_MANUAL_INSTANTIATION
89 #include "itkMIDASImageUpdatePasteRegionProcessor.txx"
90 #endif
91 
92 #endif
Image< TPixel, VImageDimension > ImageType
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:47
ImageType::SizeType SizeType
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:50
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
MIDASImageUpdatePasteRegionProcessor Self
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:34
ImageType::IndexType IndexType
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:49
SmartPointer< const Self > ConstPointer
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:37
Definition: niftkITKAffineResampleImage.cxx:74
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
Class to support undo/redo of a paste operation, within a given region, where we take non-zero pixels...
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:29
virtual ~MIDASImageUpdatePasteRegionProcessor()
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:71
SmartPointer< Self > Pointer
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:36
ImageType::Pointer ImagePointer
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:48
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
MIDASImageUpdateRegionProcessor< TPixel, VImageDimension > Superclass
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:35
TPixel PixelType
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:43
ImageType::RegionType RegionType
Definition: itkMIDASImageUpdatePasteRegionProcessor.h:51
Provides methods to do Undo/Redo within a specific Region.
Definition: itkMIDASImageUpdateRegionProcessor.h:30