Orfeo Toolbox  3.16
itkVTKImageExportBase.cxx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkVTKImageExportBase.cxx,v $
5  Language: C++
6  Date: $Date: 2008-10-09 15:31:37 $
7  Version: $Revision: 1.12 $
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  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #include "itkVTKImageExportBase.h"
18 #include "itkCommand.h"
19 
20 namespace itk
21 {
22 
28 {
30 }
31 
32 void VTKImageExportBase::PrintSelf(std::ostream& os, Indent indent) const
33 {
34  Superclass::PrintSelf(os,indent);
35 
36  os << indent << "Last Pipeline MTime: "
37  << m_LastPipelineMTime<< std::endl;
38 }
39 
40 //----------------------------------------------------------------------------
42 {
43  return this;
44 }
45 
48 {
50 }
51 
54 {
56 }
57 
60 {
62 }
63 
66 {
69 }
70 
73 {
76 }
77 
80 {
82 }
83 
86 {
88 }
89 
92 {
94 }
95 
98 {
100 }
101 
104 {
106 }
107 
110 {
112 }
113 
114 
115 //----------------------------------------------------------------------------
116 
123 {
124  this->UpdateOutputInformation();
125 }
126 
127 
134 {
135  DataObjectPointer input = this->GetInput(0);
136  if( !input )
137  {
138  itkExceptionMacro(<< "Need to set an input");
139  return -1;
140  }
141 
142  unsigned long pipelineMTime = input->GetPipelineMTime();
143 
144  if( this->GetMTime() > pipelineMTime)
145  {
146  pipelineMTime = this->GetMTime();
147  }
148 
149  if(pipelineMTime > m_LastPipelineMTime)
150  {
151  m_LastPipelineMTime = pipelineMTime;
152  return 1;
153  }
154  else
155  {
156  return 0;
157  }
158 }
159 
160 
166 {
167  // Get the input.
168  DataObjectPointer input = this->GetInput(0);
169  if( !input )
170  {
171  itkExceptionMacro(<< "Need to set an input");
172  return;
173  }
174 
175  // Notify start event observers
176  this->InvokeEvent( StartEvent() );
177 
178  // Make sure input is up to date.
179  input->Update();
180 
181  // Notify end event observers
182  this->InvokeEvent( EndEvent() );
183 }
184 
185 //----------------------------------------------------------------------------
187 {
188  static_cast<VTKImageExportBase*>
189  (userData)->UpdateInformationCallback();
190 }
191 
193 {
194  return static_cast<VTKImageExportBase*>
195  (userData)->PipelineModifiedCallback();
196 }
197 
199 {
200  return static_cast<VTKImageExportBase*>
201  (userData)->WholeExtentCallback();
202 }
203 
205 {
206  return static_cast<VTKImageExportBase*>
207  (userData)->OriginCallback();
208 }
209 
211 {
212  return static_cast<VTKImageExportBase*>
213  (userData)->FloatOriginCallback();
214 }
215 
217 {
218  return static_cast<VTKImageExportBase*>
219  (userData)->SpacingCallback();
220 }
221 
223 {
224  return static_cast<VTKImageExportBase*>
225  (userData)->FloatSpacingCallback();
226 }
227 
229 {
230  return static_cast<VTKImageExportBase*>
231  (userData)->ScalarTypeCallback();
232 }
233 
235 {
236  return static_cast<VTKImageExportBase*>
237  (userData)->NumberOfComponentsCallback();
238 }
239 
241  int* extent)
242 {
243  static_cast<VTKImageExportBase*>
244  (userData)->PropagateUpdateExtentCallback(extent);
245 }
246 
248 {
249  return static_cast<VTKImageExportBase*>
250  (userData)->DataExtentCallback();
251 }
252 
254 {
255  return static_cast<VTKImageExportBase*>
256  (userData)->BufferPointerCallback();
257 }
258 
260 {
261  static_cast<VTKImageExportBase*>(userData)->UpdateDataCallback();
262 }
263 
264 
265 } // end namespace itk

Generated at Sun Jun 16 2013 00:15:04 for Orfeo Toolbox with doxygen 1.8.3.1