Ejemplo n.º 1
0
// update gui elements and generate fiber bundle after tracking is finished
void QmitkGibbsTrackingView::AfterThread()
{
  m_ThreadIsRunning = false;
  m_TrackingTimer->stop();

  UpdateGUI();
  UpdateTrackingStatus();
  GenerateFiberBundle();
  QString paramMessage;
  if(m_Controls->m_ParticleWeightSlider->value()==0)
  {
    m_Controls->m_ParticleWeightLabel->setText(QString::number(m_GlobalTracker->GetParticleWeight()));
    m_Controls->m_ParticleWeightSlider->setValue(m_GlobalTracker->GetParticleWeight()*10000);
    paramMessage += "Particle weight was set to " + QString::number(m_GlobalTracker->GetParticleWeight()) + "\n";
  }
  if(m_Controls->m_ParticleWidthSlider->value()==0)
  {
    m_Controls->m_ParticleWidthLabel->setText(QString::number(m_GlobalTracker->GetParticleWidth()));
    m_Controls->m_ParticleWidthSlider->setValue(m_GlobalTracker->GetParticleWidth()*10);
    paramMessage += "Particle width was set to " + QString::number(m_GlobalTracker->GetParticleWidth()) + " mm\n";
  }
  if(m_Controls->m_ParticleLengthSlider->value()==0)
  {
    m_Controls->m_ParticleLengthLabel->setText(QString::number(m_GlobalTracker->GetParticleLength()));
    m_Controls->m_ParticleLengthSlider->setValue(m_GlobalTracker->GetParticleLength()*10);
    paramMessage += "Particle length was set to " + QString::number(m_GlobalTracker->GetParticleLength()) + " mm\n";
  }

  m_FiberBundleNode = NULL;

  if (paramMessage.length()>0)
    QMessageBox::information(NULL, "Automatically selected parameters", paramMessage);
}
Ejemplo n.º 2
0
// update tracking status and generate fiber bundle
void QmitkGibbsTrackingView::TimerUpdate()
{
  mitk::ProgressBar::GetInstance()->Progress(m_GlobalTracker->GetCurrentStep()-m_LastStep);
  m_LastStep = m_GlobalTracker->GetCurrentStep();
  UpdateTrackingStatus();
  GenerateFiberBundle();
}
Ejemplo n.º 3
0
// update gui elements and generate fiber bundle after tracking is finished
void QmitkGibbsTrackingView::AfterThread()
{
    m_ThreadIsRunning = false;
    m_TrackingTimer->stop();

    mitk::ProgressBar::GetInstance()->Progress(m_GlobalTracker->GetSteps()-m_LastStep+1);
    UpdateGUI();

    if( !m_GlobalTracker->GetIsInValidState() )
    {
      QMessageBox::critical( NULL, "Gibbs Tracking", "An internal error occured. Tracking aborted.\n Please check the log for details." );
      m_FiberBundleNode = NULL;
      return;
    }
    UpdateTrackingStatus();

    if(m_Controls->m_ParticleWeightSlider->value()==0)
    {
        m_Controls->m_ParticleWeightLabel->setText(QString::number(m_GlobalTracker->GetParticleWeight()));
        m_Controls->m_ParticleWeightSlider->setValue(m_GlobalTracker->GetParticleWeight()*10000);
    }
    if(m_Controls->m_ParticleWidthSlider->value()==0)
    {
        m_Controls->m_ParticleWidthLabel->setText(QString::number(m_GlobalTracker->GetParticleWidth()));
        m_Controls->m_ParticleWidthSlider->setValue(m_GlobalTracker->GetParticleWidth()*10);
    }
    if(m_Controls->m_ParticleLengthSlider->value()==0)
    {
        m_Controls->m_ParticleLengthLabel->setText(QString::number(m_GlobalTracker->GetParticleLength()));
        m_Controls->m_ParticleLengthSlider->setValue(m_GlobalTracker->GetParticleLength()*10);
    }

    GenerateFiberBundle();
    m_FiberBundleNode = NULL;
}
Ejemplo n.º 4
0
// update gui elements and generate fiber bundle after tracking is finished
void QmitkGibbsTrackingView::AfterThread()
{
    m_ThreadIsRunning = false;
    m_TrackingTimer->stop();

    mitk::ProgressBar::GetInstance()->Progress(m_GlobalTracker->GetSteps()-m_LastStep+1);
    UpdateGUI();

    if( !m_GlobalTracker->GetIsInValidState() )
    {
        QMessageBox::critical( NULL, "Gibbs Tracking", "An internal error occured. Tracking aborted.\n Please check the log for details." );
        m_FiberBundleNode = NULL;
        return;
    }
    UpdateTrackingStatus();

    if(m_Controls->m_ParticleWeightSlider->value()==0)
    {
        m_Controls->m_ParticleWeightLabel->setText(QString::number(m_GlobalTracker->GetParticleWeight()));
        m_Controls->m_ParticleWeightSlider->setValue(m_GlobalTracker->GetParticleWeight()*10000);
    }
    if(m_Controls->m_ParticleWidthSlider->value()==0)
    {
        m_Controls->m_ParticleWidthLabel->setText(QString::number(m_GlobalTracker->GetParticleWidth()));
        m_Controls->m_ParticleWidthSlider->setValue(m_GlobalTracker->GetParticleWidth()*10);
    }
    if(m_Controls->m_ParticleLengthSlider->value()==0)
    {
        m_Controls->m_ParticleLengthLabel->setText(QString::number(m_GlobalTracker->GetParticleLength()));
        m_Controls->m_ParticleLengthSlider->setValue(m_GlobalTracker->GetParticleLength()*10);
    }

    GenerateFiberBundle();
    m_FiberBundleNode = 0;
    m_GlobalTracker = 0;

    // images not needed anymore ( relevant only for computation )
    // we need to release them to remove the memory access block created through CastToItk<> calls
    this->m_ItkQBallImage = 0;
    this->m_ItkTensorImage = 0;
}
// update tracking status and generate fiber bundle
void QmitkGibbsTrackingView::TimerUpdate()
{
    UpdateTrackingStatus();
    GenerateFiberBundle();
}