Skip to content

Commit

Permalink
Fixed vtk pipeline in LandmarkRegistrationObject and removed scaling (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nist-anka authored and drouin-simon committed Aug 2, 2018
1 parent 6b24dd6 commit bbac3ab
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 37 deletions.
Expand Up @@ -14,6 +14,7 @@ See Copyright.txt or http://ibisneuronav.org/Copyright.html for details.
#include "landmarktransform.h"
#include "scenemanager.h"
#include "ibisconfig.h"
#include "imageobject.h"
#include "application.h"
#include "view.h"
#include "vtkPoints.h"
Expand Down Expand Up @@ -558,29 +559,16 @@ void LandmarkRegistrationObject::RegisterObject( bool on )
if( on )
{
m_registrationTransform->UpdateRegistrationTransform();
vtkSmartPointer<vtkTransform> tmpTrans = vtkSmartPointer<vtkTransform>::New();
tmpTrans->SetMatrix( m_registrationTransform->GetRegistrationTransform()->GetMatrix() );
tmpTrans->Update();
this->SetLocalTransform(tmpTrans);
this->GetLocalTransform()->SetInput( m_registrationTransform->GetRegistrationTransform() );
m_isRegistered = true;
}
else
{
this->SetLocalTransform(m_backUpTransform);
this->GetLocalTransform()->SetInput( m_backUpTransform );
m_isRegistered = false;
}
}

void LandmarkRegistrationObject::SetAllowScaling( bool on )
{
m_registrationTransform->SetScalingAllowed( on );
}

bool LandmarkRegistrationObject::IsScalingAllowed()
{
return m_registrationTransform->IsScalingAllowed();
}

void LandmarkRegistrationObject::SetTargetObjectID( int id )
{
Q_ASSERT( GetManager() );
Expand Down
Expand Up @@ -49,8 +49,6 @@ class LandmarkRegistrationObject : public SceneObject
void UpdateLandmarkTransform();
void RegisterObject( bool on );
bool IsRegistered() { return m_isRegistered; }
void SetAllowScaling( bool on );
bool IsScalingAllowed();
int GetTargetObjectID() { return m_targetObjectID; }
void SetTargetObjectID( int id );
int GetPointEnabledStatus( int index );
Expand Down
Expand Up @@ -108,13 +108,6 @@ void LandmarkRegistrationObjectSettingsWidget::on_capturePushButton_clicked()
}
}

void LandmarkRegistrationObjectSettingsWidget::on_allowScalingCheckBox_toggled( bool on )
{
Q_ASSERT( m_registrationObject );
m_registrationObject->SetAllowScaling( on );
this->UpdateUI();
}

void LandmarkRegistrationObjectSettingsWidget::on_importPushButton_clicked()
{
if (this->ReadTagFile())
Expand Down Expand Up @@ -240,10 +233,6 @@ void LandmarkRegistrationObjectSettingsWidget::UpdateUI()
{
Q_ASSERT(m_registrationObject);

ui->allowScalingCheckBox->blockSignals( true );
ui->allowScalingCheckBox->setChecked( m_registrationObject->IsScalingAllowed() );
ui->allowScalingCheckBox->blockSignals( false );

ui->targetComboBox->blockSignals(true);
ui->targetComboBox->clear();
QList<SceneObject*> allObjects;
Expand Down
Expand Up @@ -45,7 +45,6 @@ private slots:

void on_registerPushButton_toggled(bool checked);
virtual void on_capturePushButton_clicked();
virtual void on_allowScalingCheckBox_toggled( bool on );
virtual void on_importPushButton_clicked();
virtual void on_detailsPushButton_clicked();
virtual void on_pointsTreeView_clicked( QModelIndex idx );
Expand Down
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>337</width>
<height>298</height>
<height>308</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -55,13 +55,6 @@ ON</string>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="allowScalingCheckBox">
<property name="text">
<string>Allow Scaling</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
Expand Down

0 comments on commit bbac3ab

Please sign in to comment.