Ejemplo n.º 1
0
void DialogWriteMovieFrames::OnOpen( wxCommandEvent& event )
{
  wxDirDialog dlg( this, 
                   _("Choose a directory"), 
                   GetOutputLocation() );
  if ( dlg.ShowModal() == wxID_OK )
  {
    m_textOutputLocation->SetValue( dlg.GetPath() );
  }
}
Ejemplo n.º 2
0
void mitk::PlyFileWriterService::Write()
{
  vtkSmartPointer<vtkPLYWriter> writer = vtkSmartPointer<vtkPLYWriter>::New();
  writer->SetFileTypeToBinary();
  writer->SetFileName(GetOutputLocation().c_str());

  const mitk::Surface* surface = static_cast<const mitk::Surface*> (this->GetInput());
  writer->SetInputDataObject(surface->GetVtkPolyData());

  writer->Write();
}
Ejemplo n.º 3
0
void DialogWriteMovieFrames::OnWrite( wxCommandEvent& event )
{
  if ( GetOutputLocation().IsEmpty() )
  {
    wxMessageDialog dlg( this, 
                         _("Output location can not be empty."), 
                         _("Error"), wxOK | wxICON_ERROR );
    dlg.ShowModal();
    return;
  }
  if ( MainWindow::GetMainWindowPointer()->GetMainViewId() == 3 && GetAngleStep() == 0 )
  {
    wxMessageDialog dlg( this, 
                         _("Angle step can not be 0."), 
                         _("Error"), wxOK | wxICON_ERROR );
    dlg.ShowModal();
    return;
  }
  
  MainWindow::GetMainWindowPointer()->StartWriteMovieFrames();
  UpdateUI();
}