diff --git a/Modules/ClippingTools/mitkClippingPlaneTranslationTool.cpp b/Modules/ClippingTools/mitkClippingPlaneTranslationTool.cpp index 89e83f4866..07a69486c3 100644 --- a/Modules/ClippingTools/mitkClippingPlaneTranslationTool.cpp +++ b/Modules/ClippingTools/mitkClippingPlaneTranslationTool.cpp @@ -1,83 +1,79 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkClippingPlaneTranslationTool.h" #include "mitkClippingPlaneTranslationTool.xpm" #include "mitkBaseRenderer.h" #include "mitkGlobalInteraction.h" +#include "mitkModule.h" +#include "mitkModuleContext.h" +#include "mitkGetModuleContext.h" +#include "mitkModuleRegistry.h" #include "mitkRenderingManager.h" #include "mitkToolManager.h" namespace mitk { MITK_TOOL_MACRO(ClippingTools_EXPORT, ClippingPlaneTranslationTool, "Clipping Tool Translation"); } mitk::ClippingPlaneTranslationTool::ClippingPlaneTranslationTool() : Tool( "global" ) { + m_AffineDataInteractor = mitk::AffineDataInteractor3D::New(); } mitk::ClippingPlaneTranslationTool::~ClippingPlaneTranslationTool() { } const char** mitk::ClippingPlaneTranslationTool::GetXPM() const { return mitkClippingPlaneTranslationTool_xpm; } const char* mitk::ClippingPlaneTranslationTool::GetName() const { return "Translation"; } const char* mitk::ClippingPlaneTranslationTool::GetGroup() const { return "ClippingTool"; } void mitk::ClippingPlaneTranslationTool::Activated() { - Superclass::Activated(); + Superclass::Activated(); - //check if the Clipping plane is changed. - if(m_ClippingPlaneNode != m_ToolManager->GetWorkingData(0)) - { - mitk::GlobalInteraction::GetInstance()->RemoveInteractor(m_AffineInteractor); - this->ClippingPlaneChanged(); - } + //check if the Clipping plane is changed. + if(m_ClippingPlaneNode != m_ToolManager->GetWorkingData(0)) + { - m_AffineInteractor->SetInteractionModeToTranslation(); - mitk::GlobalInteraction::GetInstance()->AddInteractor(m_AffineInteractor); + m_ClippingPlaneNode = m_ToolManager->GetWorkingData(0); + m_ClippingPlaneNode->SetDataInteractor(NULL); + } + + m_AffineDataInteractor->SetDataNode(m_ClippingPlaneNode); + m_AffineDataInteractor->LoadStateMachine("AffineInteraction3D.xml", ModuleRegistry::GetModule("MitkExt")); + m_AffineDataInteractor->SetEventConfig("AffineTranslationConfig.xml", ModuleRegistry::GetModule("MitkExt")); } void mitk::ClippingPlaneTranslationTool::Deactivated() { Superclass::Deactivated(); - - mitk::GlobalInteraction::GetInstance()->RemoveInteractor(m_AffineInteractor); -} - -//Checks the working data node, if it has an interactor. Otherwise initial a new one. -void mitk::ClippingPlaneTranslationTool::ClippingPlaneChanged() -{ - m_ClippingPlaneNode = m_ToolManager->GetWorkingData(0); - m_AffineInteractor = dynamic_cast(m_ClippingPlaneNode->GetInteractor()); - - if (m_AffineInteractor.IsNull()) - m_AffineInteractor = mitk::AffineInteractor3D::New("AffineInteractor3D", m_ClippingPlaneNode); + m_AffineDataInteractor->SetDataNode(NULL); } diff --git a/Modules/ClippingTools/mitkClippingPlaneTranslationTool.h b/Modules/ClippingTools/mitkClippingPlaneTranslationTool.h index 228dd88a29..cf9b5b71da 100644 --- a/Modules/ClippingTools/mitkClippingPlaneTranslationTool.h +++ b/Modules/ClippingTools/mitkClippingPlaneTranslationTool.h @@ -1,66 +1,63 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef mitkClippingPlaneTranslationTool_h_Included #define mitkClippingPlaneTranslationTool_h_Included #include "ClippingToolsExports.h" -#include "mitkAffineInteractor3D.h" +#include "mitkAffineDataInteractor3D.h" #include "mitkCommon.h" #include "mitkDataNode.h" #include "mitkTool.h" #include "mitkVector.h" namespace mitk { /** \brief A tool which allows you to move planes. */ class ClippingTools_EXPORT ClippingPlaneTranslationTool : public Tool { public: mitkClassMacro(ClippingPlaneTranslationTool, Tool); itkNewMacro(ClippingPlaneTranslationTool); virtual const char** GetXPM() const; virtual const char* GetName() const; virtual const char* GetGroup() const; protected: ClippingPlaneTranslationTool(); // purposely hidden virtual ~ClippingPlaneTranslationTool(); virtual void Activated(); virtual void Deactivated(); mitk::DataNode::Pointer m_ClippingPlaneNode; - mitk::AffineInteractor3D::Pointer m_AffineInteractor; + mitk::AffineDataInteractor3D::Pointer m_AffineDataInteractor; - private: - - void ClippingPlaneChanged(); }; } //end namespace mitk #endif diff --git a/Modules/MitkExt/Interactions/mitkAffineDataInteractor3D.cpp b/Modules/MitkExt/Interactions/mitkAffineDataInteractor3D.cpp new file mode 100644 index 0000000000..a613058052 --- /dev/null +++ b/Modules/MitkExt/Interactions/mitkAffineDataInteractor3D.cpp @@ -0,0 +1,397 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "mitkAffineDataInteractor3D.h" + + +#include "mitkDispatcher.h" +#include "mitkInteractionConst.h" // TODO: refactor file +#include "mitkInteractionPositionEvent.h" +#include "mitkInternalEvent.h" +#include "mitkMouseMoveEvent.h" +#include "mitkRenderingManager.h" +#include "mitkRotationOperation.h" +#include "mitkSurface.h" + +#include + +#include +#include +#include +#include +#include +#include + +mitk::AffineDataInteractor3D::AffineDataInteractor3D() +{ + m_OriginalGeometry = Geometry3D::New(); + + // Initialize vector arithmetic + m_ObjectNormal[0] = 0.0; + m_ObjectNormal[1] = 0.0; + m_ObjectNormal[2] = 1.0; +} + +mitk::AffineDataInteractor3D::~AffineDataInteractor3D() +{ +} + +void mitk::AffineDataInteractor3D::ConnectActionsAndFunctions() +{ + CONNECT_FUNCTION("checkOverObject",CheckOverObject); + CONNECT_FUNCTION("selectObject",SelectObject); + CONNECT_FUNCTION("deselectObject",DeselectObject); + CONNECT_FUNCTION("initTranslate",InitTranslate); + CONNECT_FUNCTION("initRotate",InitRotate); + CONNECT_FUNCTION("translateObject",TranslateObject); + CONNECT_FUNCTION("rotateObject",RotateObject); + //CONNECT_FUNCTION("endTranslate",EndTranslate); + //CONNECT_FUNCTION("endRotate",EndRotate); +} + +/* +* Check whether the DataNode contains a pointset, if not create one and add it. +*/ +void mitk::AffineDataInteractor3D::DataNodeChanged() +{ + //if (GetDataNode().IsNotNull()) + //{ + // // find proper place for this command! + // // maybe when DN is created ? + // GetDataNode()->SetBoolProperty("show contour", true); + // PointSet* points = dynamic_cast(GetDataNode()->GetData()); + // if (points == NULL) + // { + // m_PointSet = PointSet::New(); + // GetDataNode()->SetData(m_PointSet); + // } + // else + // { + // m_PointSet = points; + // } + // // load config file parameter: maximal number of points + // mitk::PropertyList::Pointer properties = GetAttributes(); + // std::string strNumber; + // if (properties->GetStringProperty("MaxPoints", strNumber)) + // { + // m_MaxNumberOfPoints = atoi(strNumber.c_str()); + // } + //} +} + +bool mitk::AffineDataInteractor3D::CheckOverObject(StateMachineAction*, InteractionEvent* interactionEvent) +{ + ////Is only a copy of the old AffineInteractor3D. Not sure if is still needed. + ////Re-enable VTK interactor (may have been disabled previously) + //if ( renderWindowInteractor != NULL ) + // renderWindowInteractor->Enable(); + InteractionPositionEvent* positionEvent = dynamic_cast(interactionEvent); + if(positionEvent == NULL) + return false; + + m_CurrentPickedPoint = positionEvent->GetPositionInWorld(); + m_CurrentPickedDisplayPoint = positionEvent->GetPointerPositionOnScreen(); + + InternalEvent::Pointer event; + if(interactionEvent->GetSender()->PickObject( m_CurrentPickedDisplayPoint, m_CurrentPickedPoint ) == this->GetDataNode().GetPointer()) + { + //Object will be selected + event = InternalEvent::New(NULL, this, "OverObject"); + } + else + { + //Object will be de-selected + event = InternalEvent::New(NULL, this, "NotOverObject"); + } + positionEvent->GetSender()->GetDispatcher()->QueueEvent(event.GetPointer()); + return true; +} + +bool mitk::AffineDataInteractor3D::SelectObject(StateMachineAction*, InteractionEvent* interactionEvent) +{ + DataNode::Pointer node = this->GetDataNode(); + + if (node.IsNull()) + return false; + + node->SetColor( 1.0, 0.0, 0.0 ); + //TODO: Only 3D reinit + RenderingManager::GetInstance()->RequestUpdateAll(); + + // Colorize surface / wireframe dependend on distance from picked point + //TODO Check the return value + this->ColorizeSurface( interactionEvent->GetSender(), 0.0 ); + + return true; +} + +bool mitk::AffineDataInteractor3D::DeselectObject(StateMachineAction*, InteractionEvent* interactionEvent) +{ + DataNode::Pointer node = this->GetDataNode(); + + if (node.IsNull()) + return false; + + node->SetColor( 1.0, 1.0, 1.0 ); + //TODO: Only 3D reinit + RenderingManager::GetInstance()->RequestUpdateAll(); + + // Colorize surface / wireframe as inactive + //TODO Check the return value + this->ColorizeSurface( interactionEvent->GetSender(), -1.0 ); + + return true; +} + +bool mitk::AffineDataInteractor3D::InitTranslate(StateMachineAction*, InteractionEvent* interactionEvent) +{ + ////Is only a copy of the old AffineInteractor3D. Not sure if is still needed. + //// Disable VTK interactor until MITK interaction has been completed + // if ( renderWindowInteractor != NULL ) + // renderWindowInteractor->Disable(); + + InteractionPositionEvent* positionEvent = dynamic_cast(interactionEvent); + if(positionEvent == NULL) + return false; + + m_CurrentPickedPoint = positionEvent->GetPositionInWorld(); + m_CurrentPickedDisplayPoint = positionEvent->GetPointerPositionOnScreen(); + + m_InitialPickedPoint = m_CurrentPickedPoint; + m_InitialPickedDisplayPoint = m_CurrentPickedDisplayPoint; + + // Get the timestep to also support 3D+t + int timeStep = 0; + if ((interactionEvent->GetSender()) != NULL) + timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData()); + + // Make deep copy of current Geometry3D of the plane + this->GetDataNode()->GetData()->UpdateOutputInformation(); // make sure that the Geometry is up-to-date + m_OriginalGeometry = static_cast< Geometry3D * >(this->GetDataNode()->GetData()->GetGeometry( timeStep )->Clone().GetPointer() ); + + return true; +} + +bool mitk::AffineDataInteractor3D::InitRotate(StateMachineAction*, InteractionEvent* interactionEvent) +{ + ////Is only a copy of the old AffineInteractor3D. Not sure if is still needed. + //// Disable VTK interactor until MITK interaction has been completed + // if ( renderWindowInteractor != NULL ) + // renderWindowInteractor->Disable(); + + InteractionPositionEvent* positionEvent = dynamic_cast(interactionEvent); + if(positionEvent == NULL) + return false; + + m_CurrentPickedPoint = positionEvent->GetPositionInWorld(); + m_CurrentPickedDisplayPoint = positionEvent->GetPointerPositionOnScreen(); + + m_InitialPickedPoint = m_CurrentPickedPoint; + m_InitialPickedDisplayPoint = m_CurrentPickedDisplayPoint; + + // Get the timestep to also support 3D+t + int timeStep = 0; + if ((interactionEvent->GetSender()) != NULL) + timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData()); + + // Make deep copy of current Geometry3D of the plane + this->GetDataNode()->GetData()->UpdateOutputInformation(); // make sure that the Geometry is up-to-date + m_OriginalGeometry = static_cast< Geometry3D * >(this->GetDataNode()->GetData()->GetGeometry( timeStep )->Clone().GetPointer() ); + + return true; +} + +bool mitk::AffineDataInteractor3D::TranslateObject (StateMachineAction*, InteractionEvent* interactionEvent) +{ + InteractionPositionEvent* positionEvent = dynamic_cast(interactionEvent); + if(positionEvent == NULL) + return false; + + m_CurrentPickedPoint = positionEvent->GetPositionInWorld(); + m_CurrentPickedDisplayPoint = positionEvent->GetPointerPositionOnScreen(); + + Vector3D interactionMove; + interactionMove[0] = m_CurrentPickedPoint[0] - m_InitialPickedPoint[0]; + interactionMove[1] = m_CurrentPickedPoint[1] - m_InitialPickedPoint[1]; + interactionMove[2] = m_CurrentPickedPoint[2] - m_InitialPickedPoint[2]; + + Point3D origin = m_OriginalGeometry->GetOrigin(); + + // Get the timestep to also support 3D+t + int timeStep = 0; + if ((interactionEvent->GetSender()) != NULL) + timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData()); + + // If data is an mitk::Surface, extract it + Surface::Pointer surface = dynamic_cast< Surface* >(this->GetDataNode()->GetData()); + vtkPolyData* polyData = NULL; + if (surface.IsNotNull()) + { + polyData = surface->GetVtkPolyData( timeStep ); + + // Extract surface normal from surface (if existent, otherwise use default) + vtkPointData* pointData = polyData->GetPointData(); + if (pointData != NULL) + { + vtkDataArray* normal = polyData->GetPointData()->GetVectors( "planeNormal" ); + if (normal != NULL) + { + m_ObjectNormal[0] = normal->GetComponent( 0, 0 ); + m_ObjectNormal[1] = normal->GetComponent( 0, 1 ); + m_ObjectNormal[2] = normal->GetComponent( 0, 2 ); + } + } + } + + Vector3D transformedObjectNormal; + this->GetDataNode()->GetData()->GetGeometry( timeStep )->IndexToWorld( + m_ObjectNormal, transformedObjectNormal ); + + this->GetDataNode()->GetData()->GetGeometry( timeStep )->SetOrigin( + origin + transformedObjectNormal * (interactionMove * transformedObjectNormal) ); + + return true; +} + +bool mitk::AffineDataInteractor3D::RotateObject (StateMachineAction*, InteractionEvent* interactionEvent) +{ + InteractionPositionEvent* positionEvent = dynamic_cast(interactionEvent); + if(positionEvent == NULL) + return false; + + vtkCamera* camera = NULL; + vtkRenderer *currentVtkRenderer = NULL; + + if ((interactionEvent->GetSender()) != NULL) + { + vtkRenderWindow* renderWindow = interactionEvent->GetSender()->GetRenderWindow(); + if ( renderWindow != NULL ) + { + vtkRenderWindowInteractor* renderWindowInteractor = renderWindow->GetInteractor(); + if ( renderWindowInteractor != NULL ) + { + currentVtkRenderer = renderWindowInteractor->GetInteractorStyle()->GetCurrentRenderer(); + if ( currentVtkRenderer != NULL ) + camera = currentVtkRenderer->GetActiveCamera(); + } + } + } + if ( camera ) + { + vtkFloatingPointType vpn[3]; + camera->GetViewPlaneNormal( vpn ); + + Vector3D viewPlaneNormal; + viewPlaneNormal[0] = vpn[0]; + viewPlaneNormal[1] = vpn[1]; + viewPlaneNormal[2] = vpn[2]; + + Vector3D interactionMove; + interactionMove[0] = m_CurrentPickedPoint[0] - m_InitialPickedPoint[0]; + interactionMove[1] = m_CurrentPickedPoint[1] - m_InitialPickedPoint[1]; + interactionMove[2] = m_CurrentPickedPoint[2] - m_InitialPickedPoint[2]; + + + Vector3D rotationAxis = itk::CrossProduct( viewPlaneNormal, interactionMove ); + rotationAxis.Normalize(); + + m_CurrentPickedDisplayPoint = positionEvent->GetPointerPositionOnScreen(); + + int *size = currentVtkRenderer->GetSize(); + double l2 = + (m_CurrentPickedDisplayPoint[0] - m_InitialPickedDisplayPoint[0]) * + (m_CurrentPickedDisplayPoint[0] - m_InitialPickedDisplayPoint[0]) + + (m_CurrentPickedDisplayPoint[1] - m_InitialPickedDisplayPoint[1]) * + (m_CurrentPickedDisplayPoint[1] - m_InitialPickedDisplayPoint[1]); + + double rotationAngle = 360.0 * sqrt(l2/(size[0]*size[0]+size[1]*size[1])); + + // Use center of data bounding box as center of rotation + Point3D rotationCenter = m_OriginalGeometry->GetCenter(); + + int timeStep = 0; + if ((interactionEvent->GetSender()) != NULL) + timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData()); + + // Reset current Geometry3D to original state (pre-interaction) and + // apply rotation + RotationOperation op( OpROTATE, rotationCenter, rotationAxis, rotationAngle ); + Geometry3D::Pointer newGeometry = static_cast< Geometry3D * >( + m_OriginalGeometry->Clone().GetPointer() ); + newGeometry->ExecuteOperation( &op ); + mitk::TimeSlicedGeometry::Pointer timeSlicedGeometry = this->GetDataNode()->GetData()->GetTimeSlicedGeometry(); + if (timeSlicedGeometry.IsNotNull()) + { + timeSlicedGeometry->SetGeometry3D( newGeometry, timeStep ); + } + return true; + } + else + return false; +} + + +bool mitk::AffineDataInteractor3D::ColorizeSurface(BaseRenderer::Pointer renderer, double scalar) +{ + BaseData::Pointer data = this->GetDataNode()->GetData(); + if(data.IsNull()) + { + MITK_ERROR << "AffineInteractor3D: No data object present!"; + return false; + } + + // Get the timestep to also support 3D+t + int timeStep = 0; + if (renderer.IsNotNull()) + timeStep = renderer->GetTimeStep(data); + + + // If data is an mitk::Surface, extract it + Surface::Pointer surface = dynamic_cast< Surface* >(data.GetPointer()); + vtkPolyData* polyData = NULL; + if (surface.IsNotNull()) + polyData = surface->GetVtkPolyData(timeStep); + + if (polyData == NULL) + { + MITK_ERROR << "AffineInteractor3D: No poly data present!"; + return false; + } + + vtkPointData *pointData = polyData->GetPointData(); + if (pointData == NULL) + { + MITK_ERROR << "AffineInteractor3D: No point data present!"; + return false; + } + + vtkDataArray *scalars = pointData->GetScalars(); + if (scalars == NULL) + { + MITK_ERROR << "AffineInteractor3D: No scalars for point data present!"; + return false; + } + + for (unsigned int i = 0; i < pointData->GetNumberOfTuples(); ++i) + { + scalars->SetComponent(i, 0, scalar); + } + + polyData->Modified(); + pointData->Update(); + + return true; +} diff --git a/Modules/MitkExt/Interactions/mitkAffineDataInteractor3D.h b/Modules/MitkExt/Interactions/mitkAffineDataInteractor3D.h new file mode 100644 index 0000000000..b7bda6ff5e --- /dev/null +++ b/Modules/MitkExt/Interactions/mitkAffineDataInteractor3D.h @@ -0,0 +1,92 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef mitkAffineDataInteractor3D_h_ +#define mitkAffineDataInteractor3D_h_ + +//#include "itkObject.h" +//#include "itkSmartPointer.h" +//#include "itkObjectFactory.h" +#include "mitkBaseRenderer.h" +#include "mitkCommon.h" +#include "mitkDataInteractor.h" +#include "MitkExtExports.h" +#include "mitkGeometry3D.h" + +namespace mitk +{ + /** + * \brief Affine interaction with objects in 3D windows. + * + * \ingroup Interaction + */ + + // Inherit from DataInteratcor, this provides functionality of a state machine and configurable inputs. + class MitkExt_EXPORT AffineDataInteractor3D: public DataInteractor + { + + public: + mitkClassMacro(AffineDataInteractor3D, DataInteractor); + itkNewMacro(Self); + + protected: + AffineDataInteractor3D(); + virtual ~AffineDataInteractor3D(); + /** + * Here actions strings from the loaded state machine pattern are mapped to functions of + * the DataInteractor. These functions are called when an action from the state machine pattern is executed. + */ + virtual void ConnectActionsAndFunctions(); + /** + * This function is called when a DataNode has been set/changed. + */ + virtual void DataNodeChanged(); + + /** + * Initializes the movement, stores starting position. + */ + virtual bool CheckOverObject (StateMachineAction*, InteractionEvent*); + virtual bool SelectObject (StateMachineAction*, InteractionEvent*); + virtual bool DeselectObject (StateMachineAction*, InteractionEvent*); + virtual bool InitTranslate (StateMachineAction*, InteractionEvent*); + virtual bool InitRotate (StateMachineAction*, InteractionEvent*); + virtual bool TranslateObject (StateMachineAction*, InteractionEvent*); + virtual bool RotateObject (StateMachineAction*, InteractionEvent*); + // virtual bool EndTranslate (StateMachineAction*, InteractionEvent*); + // virtual bool EndRotate (StateMachineAction*, InteractionEvent*);*/ + + bool ColorizeSurface(BaseRenderer::Pointer renderer, double scalar = 0.0); + + private: + + Point3D m_InitialPickedPoint; + Point2D m_InitialPickedDisplayPoint; + vtkFloatingPointType m_InitialPickedPointWorld[4]; + + Point3D m_CurrentPickedPoint; + Point2D m_CurrentPickedDisplayPoint; + vtkFloatingPointType m_CurrentPickedPointWorld[4]; + + Geometry3D::Pointer m_Geometry; + + Geometry3D::Pointer m_OriginalGeometry; + + Vector3D m_ObjectNormal; + + }; + +} +#endif diff --git a/Modules/MitkExt/Resources/Interactions/AffineInteraction3D.xml b/Modules/MitkExt/Resources/Interactions/AffineInteraction3D.xml new file mode 100644 index 0000000000..557cf5c310 --- /dev/null +++ b/Modules/MitkExt/Resources/Interactions/AffineInteraction3D.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Modules/MitkExt/Resources/Interactions/AffineRotationConfig.xml b/Modules/MitkExt/Resources/Interactions/AffineRotationConfig.xml new file mode 100644 index 0000000000..2354b04553 --- /dev/null +++ b/Modules/MitkExt/Resources/Interactions/AffineRotationConfig.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Modules/MitkExt/Resources/Interactions/AffineTranslationConfig.xml b/Modules/MitkExt/Resources/Interactions/AffineTranslationConfig.xml new file mode 100644 index 0000000000..86b195faf3 --- /dev/null +++ b/Modules/MitkExt/Resources/Interactions/AffineTranslationConfig.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Modules/MitkExt/files.cmake b/Modules/MitkExt/files.cmake index d72a6de823..b45349d170 100644 --- a/Modules/MitkExt/files.cmake +++ b/Modules/MitkExt/files.cmake @@ -1,142 +1,147 @@ set(CPP_FILES Algorithms/mitkMaskAndCutRoiImageFilter.cpp Algorithms/mitkBoundingObjectToSegmentationFilter.cpp Algorithms/vtkPointSetSlicer.cxx Algorithms/mitkCoreExtObjectFactory.cpp Algorithms/mitkAngleCorrectByPointFilter.cpp Algorithms/mitkBoundingObjectCutter.cpp Algorithms/mitkCylindricToCartesianFilter.cpp Algorithms/mitkDopplerToStrainRateFilter.cpp Algorithms/mitkGeometryClipImageFilter.cpp Algorithms/mitkGeometryDataSource.cpp Algorithms/mitkHeightFieldSurfaceClipImageFilter.cpp Algorithms/mitkImageToLookupTableFilter.cpp Algorithms/mitkInterpolateLinesFilter.cpp Algorithms/mitkLabeledImageToSurfaceFilter.cpp Algorithms/mitkLabeledImageVolumeCalculator.cpp Algorithms/mitkLookupTableSource.cpp Algorithms/mitkMaskImageFilter.cpp Algorithms/mitkMeshSource.cpp Algorithms/mitkNonBlockingAlgorithm.cpp Algorithms/mitkPadImageFilter.cpp Algorithms/mitkPlaneCutFilter.cpp Algorithms/mitkPlaneFit.cpp Algorithms/mitkPlanesPerpendicularToLinesFilter.cpp Algorithms/mitkPointLocator.cpp Algorithms/mitkPointSetToCurvedGeometryFilter.cpp Algorithms/mitkPointSetToGeometryDataFilter.cpp Algorithms/mitkPointSetIndexToWorldTransformFilter.cpp Algorithms/mitkSurfaceIndexToWorldTransformFilter.cpp Algorithms/mitkPolygonToRingFilter.cpp Algorithms/mitkProbeFilter.cpp Algorithms/mitkSimpleHistogram.cpp Algorithms/mitkSimpleUnstructuredGridHistogram.cpp Algorithms/mitkUnstructuredGridHistogram.cpp Algorithms/mitkUnstructuredGridSource.cpp Algorithms/mitkVolumeVisualizationImagePreprocessor.cpp Controllers/mitkIPythonService.cpp Controllers/mitkMovieGenerator.cpp Controllers/mitkMultiStepper.cpp DataManagement/mitkAffineTransformationOperation.cpp DataManagement/mitkApplyDiffImageOperation.cpp DataManagement/mitkBoundingObject.cpp DataManagement/mitkBoundingObjectGroup.cpp DataManagement/mitkCellOperation.cpp DataManagement/mitkColorConversions.cpp DataManagement/mitkColorSequence.cpp DataManagement/mitkColorSequenceCycleH.cpp DataManagement/mitkColorSequenceHalfTones.cpp DataManagement/mitkColorSequenceRainbow.cpp DataManagement/mitkCompressedImageContainer.cpp DataManagement/mitkCone.cpp DataManagement/mitkCuboid.cpp DataManagement/mitkCylinder.cpp DataManagement/mitkDataStorageSelection.cpp DataManagement/mitkDelegateManager.cpp DataManagement/mitkDrawOperation.cpp DataManagement/mitkEllipsoid.cpp DataManagement/mitkExternAbstractTransformGeometry.cpp DataManagement/mitkFrameOfReferenceUIDManager.cpp DataManagement/mitkGridRepresentationProperty.cpp DataManagement/mitkGridVolumeMapperProperty.cpp DataManagement/mitkItkBaseDataAdapter.cpp DataManagement/mitkLabeledImageLookupTable.cpp DataManagement/mitkLineOperation.cpp DataManagement/mitkMesh.cpp DataManagement/mitkObjectSet.cpp DataManagement/mitkOrganTypeProperty.cpp DataManagement/mitkPlaneLandmarkProjector.cpp DataManagement/mitkPlane.cpp DataManagement/mitkPropertyManager.cpp DataManagement/mitkPropertyObserver.cpp DataManagement/mitkSeedsImage.cpp DataManagement/mitkSeedsImageLookupTableSource.cpp DataManagement/mitkSphereLandmarkProjector.cpp # DataManagement/mitkUSLookupTableSource.cpp DataManagement/mitkUnstructuredGrid.cpp DataManagement/mitkVideoSource.cpp DataManagement/vtkObjectSet.cpp IO/mitkObjFileIOFactory.cpp IO/mitkObjFileReader.cpp IO/mitkPACSPlugin.cpp IO/mitkParRecFileIOFactory.cpp IO/mitkParRecFileReader.cpp IO/mitkPropertyListExportToXmlFile.cpp IO/mitkPropertyListImportFromXmlFile.cpp IO/mitkStlVolumeTimeSeriesIOFactory.cpp IO/mitkStlVolumeTimeSeriesReader.cpp IO/mitkUnstructuredGridVtkWriter.cpp IO/mitkUnstructuredGridVtkWriterFactory.cpp IO/mitkVtkUnstructuredGridIOFactory.cpp IO/mitkVtkUnstructuredGridReader.cpp IO/mitkVtkVolumeTimeSeriesIOFactory.cpp IO/mitkVtkVolumeTimeSeriesReader.cpp Interactions/mitkConferenceEventMapper.cpp Interactions/mitkConnectPointsInteractor.cpp #Interactions/mitkCoordinateSupplier.cpp #Interactions/mitkDisplayCoordinateOperation.cpp #Interactions/mitkDisplayInteractor.cpp Interactions/mitkAffineInteractor3D.cpp + Interactions/mitkAffineDataInteractor3D.cpp Interactions/mitkDisplayPointSetInteractor.cpp #Interactions/mitkDisplayVectorInteractor.cpp Interactions/mitkInteractionDebug.cpp Interactions/mitkInteractionDebugger.cpp Interactions/mitkPointInteractor.cpp Interactions/mitkPointSelectorInteractor.cpp #Interactions/mitkPositionTracker.cpp Interactions/mitkSeedsInteractor.cpp Interactions/mitkSocketClient.cpp Interactions/mitkSurfaceDeformationInteractor3D.cpp Interactions/mitkSurfaceInteractor.cpp # Interactions/mitkCreateSurfaceTool.cpp Rendering/mitkEnhancedPointSetVtkMapper3D.cpp Rendering/mitkImageBackground2D.cpp Rendering/mitkLineMapper2D.cpp # Rendering/mitkLineVtkMapper3D.cpp Rendering/mitkMeshMapper2D.cpp Rendering/mitkMeshVtkMapper3D.cpp Rendering/mitkNativeRenderWindowInteractor.cpp Rendering/mitkSplineMapper2D.cpp Rendering/mitkSplineVtkMapper3D.cpp Rendering/mitkUnstructuredGridMapper2D.cpp Rendering/mitkUnstructuredGridVtkMapper3D.cpp Rendering/mitkVectorImageMapper2D.cpp Rendering/vtkUnstructuredGridMapper.cpp Rendering/vtkMaskedGlyph2D.cpp Rendering/vtkMaskedGlyph3D.cpp Rendering/vtkMitkVolumeTextureMapper3D.cpp Rendering/vtkMitkOpenGLVolumeTextureMapper3D.cpp Rendering/mitkGPUVolumeMapper3D.cpp Rendering/vtkMitkGPUVolumeRayCastMapper.cpp ) if(WIN32 AND NOT MINGW) set(CPP_FILES Controllers/mitkMovieGeneratorWin32.cpp ${CPP_FILES} ) endif(WIN32 AND NOT MINGW) - +set(RESOURCE_FILES +Interactions/AffineInteraction3D.xml +Interactions/AffineTranslationConfig.xml +Interactions/AffineRotationConfig.xml +)