ITK/Examples/Utilities/TextOutputWindow: Difference between revisions

From KitwarePublic
< ITK‎ | Examples
Jump to navigationJump to search
(Created page with "On Windows systems, itk warnings are sent to a read only EDIT control. If the program is run from a shell, the warnings pop up and disappear. This example redirects the output to...")
 
(Deprecated content that is moved to sphinx)
 
Line 1: Line 1:
On Windows systems, itk warnings are sent to a read only EDIT control. If the program is run from a shell, the warnings pop up and disappear. This example redirects the output to the shell.
{{warning|1=The media wiki content on this page is no longer maintained. The examples presented on the https://itk.org/Wiki/*  pages likely require ITK version 4.13 or earlier releasesIn many cases, the examples on this page no longer conform to the best practices for modern ITK versions.}}
==TextOutputWindow.cxx==
<source lang="cpp">
#include <itkTextOutput.h>
 
int main(int, char*[])
{
  // Force output to stdout
   // On Windows systems, the output of warnings is normally sent to a
  // window and not the shell
  itk::OutputWindow::SetInstance(itk::TextOutput::New());
 
  itkGenericOutputMacro(<< "This should appear in the console window, not in a pop up window");
 
  return EXIT_SUCCESS;
}
</source>
{{ITKCMakeLists|{{SUBPAGENAME}}}}

Latest revision as of 20:58, 6 June 2019

Warning: The media wiki content on this page is no longer maintained. The examples presented on the https://itk.org/Wiki/* pages likely require ITK version 4.13 or earlier releases. In many cases, the examples on this page no longer conform to the best practices for modern ITK versions.