00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkTextOutput.h,v $ 00005 Language: C++ 00006 Date: $Date: 2007-10-27 19:51:42 $ 00007 Version: $Revision: 1.6 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkTextOutput_h 00018 #define __itkTextOutput_h 00019 00020 #include "itkOutputWindow.h" 00021 #include "itkObjectFactory.h" 00022 00023 namespace itk 00024 { 00025 00026 // this class is used to send output to stdout and not the itk window 00027 class ITKCommon_EXPORT TextOutput : public OutputWindow 00028 { 00029 public: 00030 typedef TextOutput Self; 00031 typedef SmartPointer<Self> Pointer; 00032 typedef SmartPointer<const Self> ConstPointer; 00033 00035 itkTypeMacro( TextOutput, OutputWindow ); 00036 00038 itkNewMacro(TextOutput); 00039 00040 virtual void DisplayText(const char* s) 00041 { std::cout << s << std::endl; } 00042 00043 protected: 00044 TextOutput(); 00045 virtual ~TextOutput(); 00046 00047 private: 00048 TextOutput(const Self&); //purposely not implemented 00049 void operator=(const Self&); //purposely not implemented 00050 }; 00051 00052 00053 } 00054 00055 00056 #endif 00057