<commit_before>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    liImageRegistrationConsole.cxx
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/


#include <liImageRegistrationConsole.h>
#include <FL/fl_file_chooser.H>
#include <itkFileIOMetaImage.h>
 

// This macro helps to connect observers for events
#define AddObserverMacro( filter, event, widget ) \
  filter->AddObserver( itk::event(), widget->GetRedrawCommand().GetPointer() );



/************************************
 *
 *  Constructor
 *
 ***********************************/
liImageRegistrationConsole
::liImageRegistrationConsole()
{
 
  FileIOMetaImageFactory * factory = new FileIOMetaImageFactory;
  ObjectFactoryBase * factoryBase = static_cast<ObjectFactoryBase *>( factory );
  ObjectFactoryBase::RegisterFactory( factoryBase );  

  m_MovingImageViewer.SetLabel( "Moving Image" );
  m_FixedImageViewer.SetLabel( "Fixed Image" );
  m_InputMovingImageViewer.SetLabel( "Input Moving Image" );
  m_MappedMovingImageViewer.SetLabel( "Mapped Moving Image" );

  AddObserverMacro( m_FixedImageReader, StartEvent,     fixedImageButton );
  AddObserverMacro( m_FixedImageReader, EndEvent,       fixedImageButton );
  AddObserverMacro( m_FixedImageReader, ModifiedEvent,  fixedImageButton );
  
  AddObserverMacro( m_MovingImageReader, StartEvent,    inputMovingImageButton );
  AddObserverMacro( m_MovingImageReader, EndEvent,      inputMovingImageButton );
  AddObserverMacro( m_MovingImageReader, ModifiedEvent, inputMovingImageButton );
  
  AddObserverMacro( m_FixedImageReader, StartEvent,     loadFixedImageButton );
  AddObserverMacro( m_FixedImageReader, EndEvent,       loadFixedImageButton );
  AddObserverMacro( m_FixedImageReader, ModifiedEvent,  loadFixedImageButton );
  
  AddObserverMacro( m_MovingImageReader, StartEvent,     loadMovingImageButton );
  AddObserverMacro( m_MovingImageReader, EndEvent,       loadMovingImageButton );
  AddObserverMacro( m_MovingImageReader, ModifiedEvent,  loadMovingImageButton );
  
  this->ShowStatus("Let's start by loading an image...");

}<commit_msg>FIX: Reference to old FileIOMetaImageFactory removed.<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    liImageRegistrationConsole.cxx
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/


#include <liImageRegistrationConsole.h>
#include <FL/fl_file_chooser.H>
 

// This macro helps to connect observers for events
#define AddObserverMacro( filter, event, widget ) \
  filter->AddObserver( itk::event(), widget->GetRedrawCommand().GetPointer() );



/************************************
 *
 *  Constructor
 *
 ***********************************/
liImageRegistrationConsole
::liImageRegistrationConsole()
{
 
  m_MovingImageViewer.SetLabel( "Moving Image" );
  m_FixedImageViewer.SetLabel( "Fixed Image" );
  m_InputMovingImageViewer.SetLabel( "Input Moving Image" );
  m_MappedMovingImageViewer.SetLabel( "Mapped Moving Image" );

  AddObserverMacro( m_FixedImageReader, StartEvent,     fixedImageButton );
  AddObserverMacro( m_FixedImageReader, EndEvent,       fixedImageButton );
  AddObserverMacro( m_FixedImageReader, ModifiedEvent,  fixedImageButton );
  
  AddObserverMacro( m_MovingImageReader, StartEvent,    inputMovingImageButton );
  AddObserverMacro( m_MovingImageReader, EndEvent,      inputMovingImageButton );
  AddObserverMacro( m_MovingImageReader, ModifiedEvent, inputMovingImageButton );
  
  AddObserverMacro( m_FixedImageReader, StartEvent,     loadFixedImageButton );
  AddObserverMacro( m_FixedImageReader, EndEvent,       loadFixedImageButton );
  AddObserverMacro( m_FixedImageReader, ModifiedEvent,  loadFixedImageButton );
  
  AddObserverMacro( m_MovingImageReader, StartEvent,     loadMovingImageButton );
  AddObserverMacro( m_MovingImageReader, EndEvent,       loadMovingImageButton );
  AddObserverMacro( m_MovingImageReader, ModifiedEvent,  loadMovingImageButton );
  
  this->ShowStatus("Let's start by loading an image...");

}
{'fraction_non_alphanumeric': 0.16116195781933942, 'fraction_numerical': 0.0015917230401910067, 'mean_word_length': 5.56266318537859, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2228445', 'n_tokens_mistral': 1419, 'n_tokens_neox': 1296, 'n_words': 311}