Ejemplo n.º 1
0
void ColorCalibrationInterface::__Click( Button& sender, bool checked )
{
   if ( sender == GUI->WhiteReferenceView_ToolButton )
   {
      ViewSelectionDialog d( instance.whiteReferenceViewId );
      if ( d.Execute() == StdDialogCode::Ok )
      {
         instance.whiteReferenceViewId = d.Id();
         GUI->WhiteReferenceView_Edit.SetText( WHITE_REFERENCE_ID );
      }
   }
   else if ( sender == GUI->BackgroundReferenceView_ToolButton )
   {
      ViewSelectionDialog d( instance.backgroundReferenceViewId );
      if ( d.Execute() == StdDialogCode::Ok )
      {
         instance.backgroundReferenceViewId = d.Id();
         GUI->BackgroundReferenceView_Edit.SetText( BACKGROUND_REFERENCE_ID );
      }
   }
   else if ( sender == GUI->OutputWhiteReferenceMask_CheckBox )
      instance.outputWhiteReferenceMask = checked;
   else if ( sender == GUI->OutputBackgroundReferenceMask_CheckBox )
      instance.outputBackgroundReferenceMask = checked;
   else if ( sender == GUI->WhiteROISelectPreview_Button )
   {
      PreviewSelectionDialog d;
      if ( d.Execute() )
         if ( !d.Id().IsEmpty() )
         {
            View view = View::ViewById( d.Id() );
            if ( !view.IsNull() )
            {
               instance.whiteROI = view.Window().PreviewRect( view.Id() );
               UpdateControls();
            }
         }
   }
   else if ( sender == GUI->BackgroundROISelectPreview_Button )
   {
      PreviewSelectionDialog d;
      if ( d.Execute() )
         if ( !d.Id().IsEmpty() )
         {
            View view = View::ViewById( d.Id() );
            if ( !view.IsNull() )
            {
               instance.backgroundROI = view.Window().PreviewRect( view.Id() );
               UpdateControls();
            }
         }
   }
}
Ejemplo n.º 2
0
void HDRCompositionInterface::__FittingRegion_Click( Button& sender, bool checked )
{
   if ( sender == GUI->SelectPreview_Button )
   {
      PreviewSelectionDialog d;
      if ( d.Execute() )
         if ( !d.Id().IsEmpty() )
         {
            View view = View::ViewById( d.Id() );
            if ( !view.IsNull() )
            {
               instance.fittingRect = view.Window().PreviewRect( view.Id() );
               UpdateFittingRegionControls();
            }
         }
   }
}
Ejemplo n.º 3
0
void B3EInterface::__Clicked( Button& sender, bool checked )
{
   if ( sender == GUI->InputImage1_ToolButton )
   {
      ViewSelectionDialog d( instance.p_inputView[0].id );
      d.SetWindowTitle( "Select First Input Image" );
      if ( d.Execute() )
         instance.p_inputView[0].id = d.Id();
      GUI->InputImage1_Edit.SetText( instance.p_inputView[0].id );
   }
   else if ( sender == GUI->InputImage2_ToolButton )
   {
      ViewSelectionDialog d( instance.p_inputView[1].id );
      d.SetWindowTitle( "Select Second Input Image" );
      if ( d.Execute() )
         instance.p_inputView[1].id = d.Id();
      GUI->InputImage2_Edit.SetText( instance.p_inputView[1].id );
   }
   else if ( sender == GUI->OutOfRangeMask_CheckBox )
   {
      instance.p_outOfRangeMask = checked;
   }
   else if ( sender == GUI->BackgroundReferenceView1_ToolButton )
   {
      ViewSelectionDialog d( instance.p_inputView[0].backgroundReferenceViewId );
      d.SetWindowTitle( "Select First Background Reference Image" );
      if ( d.Execute() == StdDialogCode::Ok )
      {
         instance.p_inputView[0].backgroundReferenceViewId = d.Id();
         GUI->BackgroundReferenceView1_Edit.SetText( BACKGROUND_REFERENCE_ID1 );
      }
   }
   else if ( sender == GUI->OutputBackgroundReferenceMask1_CheckBox )
      instance.p_inputView[0].outputBackgroundReferenceMask = checked;
   else if ( sender == GUI->BackgroundROISelectPreview1_Button )
   {
      PreviewSelectionDialog d;
      d.SetWindowTitle( "Select First Background ROI" );
      if ( d.Execute() )
         if ( !d.Id().IsEmpty() )
         {
            View view = View::ViewById( d.Id() );
            if ( !view.IsNull() )
               instance.p_inputView[0].backgroundROI = view.Window().PreviewRect( view.Id() );
         }
   }
   else if ( sender == GUI->BackgroundReferenceView2_ToolButton )
   {
      ViewSelectionDialog d( instance.p_inputView[1].backgroundReferenceViewId );
      d.SetWindowTitle( "Select Second Background Reference Image" );
      if ( d.Execute() == StdDialogCode::Ok )
      {
         instance.p_inputView[1].backgroundReferenceViewId = d.Id();
         GUI->BackgroundReferenceView2_Edit.SetText( BACKGROUND_REFERENCE_ID2 );
      }
   }
   else if ( sender == GUI->OutputBackgroundReferenceMask2_CheckBox )
      instance.p_inputView[1].outputBackgroundReferenceMask = checked;
   else if ( sender == GUI->BackgroundROISelectPreview2_Button )
   {
      PreviewSelectionDialog d;
      d.SetWindowTitle( "Select Second Background ROI" );
      if ( d.Execute() )
         if ( !d.Id().IsEmpty() )
         {
            View view = View::ViewById( d.Id() );
            if ( !view.IsNull() )
               instance.p_inputView[1].backgroundROI = view.Window().PreviewRect( view.Id() );
         }
   }
   UpdateControls();
}
Ejemplo n.º 4
0
void DrizzleIntegrationInterface::__Click( Button& sender, bool checked )
{
   if ( sender == GUI->AddFiles_PushButton )
   {
      FileFilter drzFiles;
      drzFiles.SetDescription( "Drizzle Data Files" );
      drzFiles.AddExtension( ".drz" );

      OpenFileDialog d;
      d.EnableMultipleSelections();
      d.Filters().Clear();
      d.Filters().Add( drzFiles );
      d.SetCaption( "DrizzleIntegration: Select Drizzle Data Files" );
      if ( d.Execute() )
      {
         size_type i0 = TreeInsertionIndex( GUI->InputData_TreeBox );
         for ( StringList::const_iterator i = d.FileNames().Begin(); i != d.FileNames().End(); ++i )
            m_instance.p_inputData.Insert( m_instance.p_inputData.At( i0++ ), DrizzleIntegrationInstance::DataItem( *i ) );
         UpdateInputDataList();
         UpdateDataSelectionButtons();
      }
   }
   else if ( sender == GUI->SelectAll_PushButton )
   {
      GUI->InputData_TreeBox.SelectAllNodes();
      UpdateDataSelectionButtons();
   }
   else if ( sender == GUI->InvertSelection_PushButton )
   {
      for ( int i = 0, n = GUI->InputData_TreeBox.NumberOfChildren(); i < n; ++i )
         GUI->InputData_TreeBox[i]->Select( !GUI->InputData_TreeBox[i]->IsSelected() );
      UpdateDataSelectionButtons();
   }
   else if ( sender == GUI->ToggleSelected_PushButton )
   {
      for ( int i = 0, n = GUI->InputData_TreeBox.NumberOfChildren(); i < n; ++i )
         if ( GUI->InputData_TreeBox[i]->IsSelected() )
            m_instance.p_inputData[i].enabled = !m_instance.p_inputData[i].enabled;
      UpdateInputDataList();
      UpdateDataSelectionButtons();
   }
   else if ( sender == GUI->RemoveSelected_PushButton )
   {
      DrizzleIntegrationInstance::input_data_list newImages;
      for ( int i = 0, n = GUI->InputData_TreeBox.NumberOfChildren(); i < n; ++i )
         if ( !GUI->InputData_TreeBox[i]->IsSelected() )
            newImages.Add( m_instance.p_inputData[i] );
      m_instance.p_inputData = newImages;
      UpdateInputDataList();
      UpdateDataSelectionButtons();
   }
   else if ( sender == GUI->Clear_PushButton )
   {
      m_instance.p_inputData.Clear();
      UpdateInputDataList();
      UpdateDataSelectionButtons();
   }
   else if ( sender == GUI->FullPaths_CheckBox )
   {
      UpdateInputDataList();
      UpdateDataSelectionButtons();
   }
   else if ( sender == GUI->InputDirectory_ToolButton )
   {
      GetDirectoryDialog d;
      d.SetCaption( "DrizzleIntegration: Select Input Directory" );
      if ( d.Execute() )
         GUI->InputDirectory_Edit.SetText( m_instance.p_inputDirectory = d.Directory() );
   }
   else if ( sender == GUI->EnableRejection_CheckBox )
   {
      m_instance.p_enableRejection = checked;
   }
   else if ( sender == GUI->EnableImageWeighting_CheckBox )
   {
      m_instance.p_enableImageWeighting = checked;
   }
   else if ( sender == GUI->EnableSurfaceSplines_CheckBox )
   {
      m_instance.p_enableSurfaceSplines = checked;
   }
   else if ( sender == GUI->ClosePreviousImages_CheckBox )
   {
      m_instance.p_closePreviousImages = checked;
   }
   else if ( sender == GUI->SelectPreview_Button )
   {
      PreviewSelectionDialog d;
      if ( d.Execute() )
         if ( !d.Id().IsEmpty() )
         {
            View view = View::ViewById( d.Id() );
            if ( !view.IsNull() )
            {
               m_instance.p_roi = view.Window().PreviewRect( view.Id() );
               UpdateROIControls();
            }
         }
   }
}