ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkNormalVectorFunctionBase_h 00019 #define __itkNormalVectorFunctionBase_h 00020 00021 #include "itkFiniteDifferenceSparseImageFunction.h" 00022 00023 namespace itk 00024 { 00051 template< class TSparseImageType > 00052 class ITK_EXPORT NormalVectorFunctionBase: 00053 public FiniteDifferenceSparseImageFunction< TSparseImageType > 00054 { 00055 public: 00057 typedef NormalVectorFunctionBase Self; 00058 typedef FiniteDifferenceSparseImageFunction< TSparseImageType > Superclass; 00059 typedef SmartPointer< Self > Pointer; 00060 typedef SmartPointer< const Self > ConstPointer; 00061 00063 itkTypeMacro(NormalVectorFunctionBase, FiniteDifferenceSparseImageFunction); 00064 00066 itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); 00067 00069 typedef typename Superclass::TimeStepType TimeStepType; 00070 typedef typename Superclass::RadiusType RadiusType; 00071 typedef typename Superclass::NeighborhoodType NeighborhoodType; 00072 typedef typename Superclass::FloatOffsetType FloatOffsetType; 00073 typedef typename Superclass::IndexType IndexType; 00074 typedef typename Superclass::SparseImageType SparseImageType; 00075 00077 typedef typename SparseImageType::NodeType NodeType; 00078 00080 typedef typename NodeType::NodeValueType NodeValueType; 00081 00083 typedef typename NodeType::NodeDataType NormalVectorType; 00084 00086 virtual void * GetGlobalDataPointer() const { return 0; } 00087 virtual void ReleaseGlobalDataPointer(void *) const {} 00089 00091 virtual TimeStepType ComputeGlobalTimeStep(void *) const 00092 { return m_TimeStep; } 00093 00095 void SetTimeStep(const TimeStepType & ts) 00096 { m_TimeStep = ts; } 00097 00099 TimeStepType GetTimeStep() const 00100 { return m_TimeStep; } 00101 protected: 00102 NormalVectorFunctionBase(); 00103 ~NormalVectorFunctionBase() {} 00104 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00106 00107 private: 00109 TimeStepType m_TimeStep; 00110 00111 NormalVectorFunctionBase(const Self &); //purposely not implemented 00112 void operator=(const Self &); //purposely not implemented 00113 }; 00114 } // end namespace itk 00115 00116 #ifndef ITK_MANUAL_INSTANTIATION 00117 #include "itkNormalVectorFunctionBase.hxx" 00118 #endif 00119 00120 #endif 00121