Orfeo Toolbox  3.16
itkRegionFromReferenceLabelMapFilter.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkRegionFromReferenceLabelMapFilter.txx,v $
5  Language: C++
6  Date: $Date: 2009-07-23 22:27:53 $
7  Version: $Revision: 1.1 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  Portions of this code are covered under the VTK copyright.
13  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
14 
15  This software is distributed WITHOUT ANY WARRANTY; without even
16  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17  PURPOSE. See the above copyright notices for more information.
18 
19 =========================================================================*/
20 #ifndef __itkRegionFromReferenceLabelMapFilter_txx
21 #define __itkRegionFromReferenceLabelMapFilter_txx
23 
24 namespace itk
25 {
26 
27 template <class TInputImage>
28 void
31 {
32  Superclass::GenerateOutputInformation();
33 
34  this->SetRegion( this->GetReferenceImage()->GetLargestPossibleRegion() );
35  this->GetOutput()->SetLargestPossibleRegion( this->GetRegion() );
36 }
37 
38 
39 template <class TInputImage>
40 void
43 {
44  itkDebugMacro("setting input ReferenceImage to " << image);
45  if( image != static_cast<const ReferenceImageType *>(this->GetInput( 1 )) )
46  {
47  this->ProcessObject::SetNthInput(1, const_cast< ReferenceImageType *>( image ) );
48  this->Modified();
49  }
50 }
51 
52 template <class TInputImage>
56 {
57  Self * surrogate = const_cast< Self * >( this );
58 
59  const DataObject * input = surrogate->ProcessObject::GetInput(1);
60 
61  const ReferenceImageType * referenceImage = static_cast<const ReferenceImageType *>( input );
62 
63  return referenceImage;
64 }
65 
66 template <class TInputImage>
67 void
69 ::PrintSelf(std::ostream& os, Indent indent) const
70 {
71  this->Superclass::PrintSelf(os, indent);
72 }
73 
74 } // end namespace itk
75 
76 #endif

Generated at Sun Feb 3 2013 00:03:12 for Orfeo Toolbox with doxygen 1.8.1.1