ITK
4.0.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 /*========================================================================= 00019 * 00020 * Portions of this file are subject to the VTK Toolkit Version 3 copyright. 00021 * 00022 * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00023 * 00024 * For complete copyright, license and disclaimer of warranty information 00025 * please refer to the NOTICE file at the top of the ITK source tree. 00026 * 00027 *=========================================================================*/ 00028 #ifndef __itkVersion_h 00029 #define __itkVersion_h 00030 00031 #include "itkObject.h" 00032 #include "itkObjectFactory.h" 00033 00034 #define ITK_VERSION_TO_STRING(x) ITK_VERSION_TO_STRING0(x) 00035 #define ITK_VERSION_TO_STRING0(x) #x 00036 #define ITK_VERSION \ 00037 ITK_VERSION_TO_STRING(ITK_VERSION_MAJOR) "." \ 00038 ITK_VERSION_TO_STRING(ITK_VERSION_MINOR) "." \ 00039 ITK_VERSION_TO_STRING(ITK_VERSION_PATCH) 00040 #if ITK_VERSION_MINOR & 1 00041 #include "itksys/DateStamp.h" // For date stamp 00042 #define ITK_SOURCE_VERSION "itk version " ITK_VERSION ", Date: " itksys_DATE_STAMP_STRING 00043 #else 00044 #define ITK_SOURCE_VERSION "itk version " ITK_VERSION 00045 #endif 00046 00047 namespace itk 00048 { 00062 class ITKCommon_EXPORT Version:public Object 00063 { 00064 public: 00066 typedef Version Self; 00067 typedef Object Superclass; 00068 typedef SmartPointer< Self > Pointer; 00069 typedef SmartPointer< const Self > ConstPointer; 00070 00072 itkNewMacro(Self); 00073 00075 itkTypeMacro(Version, Object); 00076 00080 static const char * GetITKVersion(); 00081 00082 static int GetITKMajorVersion(); 00083 00084 static int GetITKMinorVersion(); 00085 00086 static int GetITKBuildVersion(); 00087 00088 static const char * GetITKSourceVersion(); 00089 00090 protected: 00091 Version(); 00092 ~Version(); 00093 private: 00094 Version(const Self &); //purposely not implemented 00095 void operator=(const Self &); //purposely not implemented 00096 }; 00097 } // end namespace itk 00098 00099 #endif 00100