ITK  4.10.0
Insight Segmentation and Registration Toolkit
tubeCropImage.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17 *=========================================================================*/
18 #ifndef __tubeCropImage_h
19 #define __tubeCropImage_h
20 
21 #include "itktubeCropImageFilter.h"
22 #include "itkObject.h"
23 
24 
25 namespace tube
26 {
32 template< typename TInputImage, typename TOutputImage >
33 class CropImage:
34  public itk::Object
35 {
36 public:
38  typedef CropImage Self;
41 
43  itkNewMacro(Self);
44 
46  itkTypeMacro(CropImage, Object);
47 
48  typedef TInputImage ImageType;
49 
50  void SetMin( typename ImageType::IndexType roiMin );
51 
52  void SetMax( typename ImageType::IndexType roiMax );
53 
54  void SetSize( typename ImageType::SizeType roiSize );
55 
56  void SetCenter( typename ImageType::IndexType roiCenter );
57 
58  void SetBoundary( typename ImageType::IndexType roiBoundary );
59 
60  void SetMatchVolume( typename ImageType::ConstPointer matchVolume );
61 
62  void SetMatchMask( typename ImageType::Pointer maskImage );
63 
64  void SetSplitInput( typename ImageType::IndexType splitIndex,
65  typename ImageType::IndexType roiIndex );
66 
67  void SetInput( const TInputImage *inputImage );
68  void Update();
69  typename TOutputImage::Pointer GetOutput();
70 
71 protected:
72  CropImage( void );
74  void PrintSelf(std::ostream & os, itk::Indent indent) const;
75 
76 private:
78  CropImage(const Self &);
79  void operator=(const Self &);
81 
82  typedef itk::tube::CropImageFilter< ImageType, ImageType > CropFilterType;
83  typename CropFilterType::Pointer m_CropFilter;
84 
85 };
86 } // End namespace tube
87 
88 
89 #ifndef ITK_MANUAL_INSTANTIATION
90 #include "tubeCropImage.hxx"
91 #endif
92 
93 #endif // End !defined( __tubeCropImage_h )
TOutputImage::Pointer GetOutput()
void SetBoundary(typename ImageType::IndexType roiBoundary)
void SetSize(typename ImageType::SizeType roiSize)
TInputImage ImageType
Definition: tubeCropImage.h:46
CropImage Self
Definition: tubeCropImage.h:38
itk::SmartPointer< const Self > ConstPointer
Definition: tubeCropImage.h:40
itk::SmartPointer< Self > Pointer
Definition: tubeCropImage.h:39
void SetMatchMask(typename ImageType::Pointer maskImage)
void PrintSelf(std::ostream &os, itk::Indent indent) const
itk::tube::CropImageFilter< ImageType, ImageType > CropFilterType
Definition: tubeCropImage.h:82
void SetSplitInput(typename ImageType::IndexType splitIndex, typename ImageType::IndexType roiIndex)
void SetMin(typename ImageType::IndexType roiMin)
void SetCenter(typename ImageType::IndexType roiCenter)
void SetMatchVolume(typename ImageType::ConstPointer matchVolume)
CropFilterType::Pointer m_CropFilter
Definition: tubeCropImage.h:83
void operator=(const Self &)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void SetMax(typename ImageType::IndexType roiMax)
Base class for most ITK classes.
Definition: itkObject.h:57
void SetInput(const TInputImage *inputImage)