00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkTextOutput.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/03/22 18:25:14 $ 00007 Version: $Revision: 1.4 $ 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 #include "itkOutputWindow.h" 00018 #include "itkObjectFactory.h" 00019 00020 namespace itk 00021 { 00022 00023 // this class is used to send output to stdout and not the itk window 00024 class ITKCommon_EXPORT TextOutput : public OutputWindow 00025 { 00026 public: 00027 typedef TextOutput Self; 00028 typedef SmartPointer<Self> Pointer; 00029 typedef SmartPointer<const Self> ConstPointer; 00030 itkNewMacro(TextOutput); 00031 virtual void DisplayText(const char* s) 00032 { std::cout << s << std::endl; } 00033 00034 protected: 00035 TextOutput(); 00036 virtual ~TextOutput(); 00037 00038 private: 00039 TextOutput(const Self&); //purposely not implemented 00040 void operator=(const Self&); //purposely not implemented 00041 }; 00042 00043 00044 } 00045 00046