Skip to content
This repository was archived by the owner on May 15, 2018. It is now read-only.

Commit

Permalink
Removing all references to "PerkTutorCommon". Functionality has been …
Browse files Browse the repository at this point in the history
…moved into the Transform Recorder logic and the vtkTransformRecord class.
  • Loading branch information
matthewsholden committed Sep 23, 2015
1 parent a0facb2 commit e969e10
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 32 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ set(MODULE_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_BINARY_DIR}/MRML
${CMAKE_CURRENT_SOURCE_DIR}/Widgets
${CMAKE_CURRENT_BINARY_DIR}/Widgets
${PerkTutorCommon_SOURCE_DIR}
${PerkTutorCommon_BINARY_DIR}
${qSlicerTransformRecorderModuleWidgets_SOURCE_DIR}
${qSlicerTransformRecorderModuleWidgets_BINARY_DIR}
${vtkSlicerTransformRecorderModuleLogic_SOURCE_DIR}
Expand Down Expand Up @@ -69,7 +67,6 @@ set(MODULE_TARGET_LIBRARIES
vtkSlicer${MODULE_NAME}ModuleLogic
vtkSlicer${MODULE_NAME}ModuleMRML
qSlicer${MODULE_NAME}ModuleWidgets
PerkTutorCommon
vtkSlicerTransformRecorderModuleMRML
vtkSlicerTransformRecorderModuleLogic
qSlicerTransformRecorderModuleWidgets
Expand Down
13 changes: 8 additions & 5 deletions Logic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ set(KIT ${PROJECT_NAME})
set(${KIT}_EXPORT_DIRECTIVE "VTK_SLICER_${MODULE_NAME_UPPER}_MODULE_LOGIC_EXPORT")

set(${KIT}_INCLUDE_DIRECTORIES
${PerkTutorCommon_SOURCE_DIR}
${PerkTutorCommon_BINARY_DIR}
${vtkSlicerTransformRecorderModuleLogic_SOURCE_DIR}
${vtkSlicerTransformRecorderModuleLogic_BINARY_DIR}
${vtkSlicerTransformRecorderModuleMRML_SOURCE_DIR}
${vtkSlicerTransformRecorderModuleMRML_BINARY_DIR}
)

set(${KIT}_SRCS
Expand All @@ -18,9 +20,10 @@ set(${KIT}_TARGET_LIBRARIES
${ITK_LIBRARIES}
${MRML_LIBRARIES}
SlicerBaseLogic
PerkTutorCommon
vtkSlicerWorkflowSegmentationModuleMRML
vtkSlicerTransformRecorderModuleLogic
qSlicerBaseQTCore
vtkSlicerTransformRecorderModuleMRML
vtkSlicerTransformRecorderModuleLogic
vtkSlicerWorkflowSegmentationModuleMRML
)

#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Logic/vtkSlicerWorkflowSegmentationLogic.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ ::ProcessMRMLNodesEvents( vtkObject* caller, unsigned long event, void* callData

if ( toolNode->GetCurrentTask() != NULL && toolNode->GetCurrentTask() != originalTask )
{
vtkSlicerTransformRecorderLogic* trLogic = vtkSlicerTransformRecorderLogic::SafeDownCast( PerkTutorCommon::GetSlicerModuleLogic( "TransformRecorder" ) );
vtkSlicerTransformRecorderLogic* trLogic = vtkSlicerTransformRecorderLogic::SafeDownCast( vtkSlicerTransformRecorderLogic::GetSlicerModuleLogic( "TransformRecorder" ) ); // TODO: Can we just create an instance of the logic?
trLogic->AddMessage( wsNode->GetTransformBufferNode(), toolNode->GetCurrentTask()->GetName(), record->GetTime() );
}

Expand Down
9 changes: 7 additions & 2 deletions Logic/vtkSlicerWorkflowSegmentationLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,24 @@
#include <vector>
#include <cmath>

// Slicer includes
#include "vtkSlicerModuleLogic.h"

// VTK includes
#include "vtkObject.h"
#include "vtkObjectBase.h"
#include "vtkObjectFactory.h"
#include "vtkXMLDataElement.h"

#include "vtkMRMLTransformBufferNode.h"
#include "vtkMRMLWorkflowSegmentationNode.h"

// Workflow Segmentation includes
#include "vtkSlicerWorkflowSegmentationModuleLogicExport.h"
#include "vtkMRMLWorkflowSegmentationNode.h"

// Transform Recorder includes
#include "vtkSlicerTransformRecorderLogic.h"
#include "vtkMRMLTransformBufferNode.h"




Expand Down
9 changes: 5 additions & 4 deletions MRML/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ set(KIT ${PROJECT_NAME})
set(${KIT}_EXPORT_DIRECTIVE "VTK_SLICER_${MODULE_NAME_UPPER}_MODULE_MRML_EXPORT")

set(${KIT}_INCLUDE_DIRECTORIES
${PerkTutorCommon_SOURCE_DIR}
${PerkTutorCommon_BINARY_DIR}
)
${vtkSlicerTransformRecorderModuleLogic_SOURCE_DIR}
${vtkSlicerTransformRecorderModuleLogic_BINARY_DIR}
${vtkSlicerTransformRecorderModuleMRML_SOURCE_DIR}
${vtkSlicerTransformRecorderModuleMRML_BINARY_DIR}
)

# --------------------------------------------------------------------------
# Sources
Expand Down Expand Up @@ -61,7 +63,6 @@ set(${KIT}_TARGET_LIBRARIES
${ITK_LIBRARIES}
${MRML_LIBRARIES}
SlicerBaseLogic
PerkTutorCommon
vtkSlicerTransformRecorderModuleMRML
)

Expand Down
6 changes: 3 additions & 3 deletions MRML/vtkLabelRecord.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ ::ToTransformRecord( vtkTransformRecord* transformRecord, TrackingRecordType typ

transformRecord->SetTime( this->GetTime() );
transformRecord->SetDeviceName( this->GetVector()->GetLabel() );
transformRecord->SetTransformString( matrixString.str() );
transformRecord->SetTransformMatrix( matrixString.str() );
}


void vtkLabelRecord
::FromTransformRecord( vtkTransformRecord* transformRecord, TrackingRecordType type )
{
std::stringstream matrixString( transformRecord->GetTransformString() );
std::stringstream matrixString( transformRecord->GetTransformMatrix() );
std::stringstream trackingString;
if ( type == QUATERNION_RECORD ) // If it is in quaternion format
{
Expand All @@ -101,7 +101,7 @@ ::FromTransformRecord( vtkTransformRecord* transformRecord, TrackingRecordType t
}
else if ( type == MATRIX_RECORD ) // If it is in matrix format
{
trackingString << transformRecord->GetTransformString();
trackingString << transformRecord->GetTransformMatrix();
}
else
{
Expand Down
10 changes: 7 additions & 3 deletions Widgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ set(KIT ${PROJECT_NAME})
set(${KIT}_EXPORT_DIRECTIVE "Q_SLICER_MODULE_${MODULE_NAME_UPPER}_WIDGETS_EXPORT")

set(${KIT}_INCLUDE_DIRECTORIES
${PerkTutorCommon_SOURCE_DIR}
${PerkTutorCommon_BINARY_DIR}
${qSlicerTransformRecorderModuleWidgets_SOURCE_DIR}
${qSlicerTransformRecorderModuleWidgets_BINARY_DIR}
${vtkSlicerTransformRecorderModuleLogic_SOURCE_DIR}
${vtkSlicerTransformRecorderModuleLogic_BINARY_DIR}
${vtkSlicerTransformRecorderModuleMRML_SOURCE_DIR}
${vtkSlicerTransformRecorderModuleMRML_BINARY_DIR}
)

set(${KIT}_SRCS
Expand Down Expand Up @@ -41,7 +45,7 @@ set(${KIT}_RESOURCES

set(${KIT}_TARGET_LIBRARIES
vtkSlicer${MODULE_NAME}ModuleLogic
PerkTutorCommon
vtkSlicerTransformRecorderModuleLogic
qSlicerTransformRecorderModuleWidgets
)

Expand Down
2 changes: 1 addition & 1 deletion Widgets/qSlicerWorkflowGuideDisplayWidget.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ ::updateWidgetFromMRML()
d->ToolName->setText( QString::fromStdString( columnText.str() ) );

// Grab the tasks in order
vtkSlicerWorkflowSegmentationLogic* wsLogic = vtkSlicerWorkflowSegmentationLogic::SafeDownCast( PerkTutorCommon::GetSlicerModuleLogic( "WorkflowSegmentation" ) );
vtkSlicerWorkflowSegmentationLogic* wsLogic = vtkSlicerWorkflowSegmentationLogic::SafeDownCast( vtkSlicerTransformRecorderLogic::GetSlicerModuleLogic( "WorkflowSegmentation" ) );
std::vector< std::string > orderedTaskStrings = wsLogic->GetOrderedWorkflowTaskStrings( this->WorkflowToolNode );

QStringList WorkflowDisplayTableHeaders;
Expand Down
2 changes: 0 additions & 2 deletions Widgets/qSlicerWorkflowGuideDisplayWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include "qSlicerWorkflowSegmentationModuleWidgetsExport.h"
#include "ui_qSlicerWorkflowGuideDisplayWidget.h"

#include "PerkTutorCommon.h"

class qSlicerWorkflowGuideDisplayWidgetPrivate;

/// \ingroup Slicer_QtModules_CreateModels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
// FooBar Widgets includes
#include "qSlicerWorkflowSegmentationRecorderControlsWidget.h"

#include "qSlicerTransformBufferWidget.h" // TODO: Remove when GetSlicerModuleLogic made into helper function

#include <QtGui>


Expand Down Expand Up @@ -68,7 +66,7 @@ qSlicerWorkflowSegmentationRecorderControlsWidget
::qSlicerWorkflowSegmentationRecorderControlsWidget(QWidget* parentWidget) : qSlicerRecorderControlsWidget( parentWidget ) , d_ptr( new qSlicerWorkflowSegmentationRecorderControlsWidgetPrivate(*this) )
{
this->WorkflowSegmentationNode = NULL;
this->WorkflowSegmentationLogic = vtkSlicerWorkflowSegmentationLogic::SafeDownCast( PerkTutorCommon::GetSlicerModuleLogic( "WorkflowSegmentation" ) );
this->WorkflowSegmentationLogic = vtkSlicerWorkflowSegmentationLogic::SafeDownCast( vtkSlicerTransformRecorderLogic::GetSlicerModuleLogic( "WorkflowSegmentation" ) );
}


Expand Down
2 changes: 1 addition & 1 deletion Widgets/qSlicerWorkflowToolSummaryWidget.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ qSlicerWorkflowToolSummaryWidget
::qSlicerWorkflowToolSummaryWidget(QWidget* parentWidget) : Superclass( parentWidget ) , d_ptr( new qSlicerWorkflowToolSummaryWidgetPrivate(*this) )
{
this->WorkflowSegmentationNode = NULL;
this->WorkflowSegmentationLogic = vtkSlicerWorkflowSegmentationLogic::SafeDownCast( PerkTutorCommon::GetSlicerModuleLogic( "WorkflowSegmentation" ) );
this->WorkflowSegmentationLogic = vtkSlicerWorkflowSegmentationLogic::SafeDownCast( vtkSlicerTransformRecorderLogic::GetSlicerModuleLogic( "WorkflowSegmentation" ) );
this->setup();
}

Expand Down
2 changes: 0 additions & 2 deletions Widgets/qSlicerWorkflowToolSummaryWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "qSlicerWorkflowSegmentationModuleWidgetsExport.h"
#include "ui_qSlicerWorkflowToolSummaryWidget.h"

#include "PerkTutorCommon.h"

class qSlicerWorkflowToolSummaryWidgetPrivate;

/// \ingroup Slicer_QtModules_CreateModels
Expand Down
2 changes: 0 additions & 2 deletions Widgets/qSlicerWorkflowToolWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@

#include "vtkSlicerModuleLogic.h"
#include "vtkMRMLWorkflowToolNode.h"
#include "vtkSlicerPerkEvaluatorLogic.h"

// FooBar Widgets includes
#include "qSlicerWorkflowSegmentationModuleWidgetsExport.h"
#include "ui_qSlicerWorkflowToolWidget.h"

#include "PerkTutorCommon.h"

class qSlicerWorkflowToolWidgetPrivate;

Expand Down

0 comments on commit e969e10

Please sign in to comment.