<file>icons/adjustsize.png</file>
<file>icons/standardbutton-apply-16.png</file>
<file>icons/standardbutton-cancel-16.png</file>
+ <file>icons/identity.png</file>
</qresource>
</RCC>
connect(actionAdd_fusion_image,SIGNAL(triggered()),this,SLOT(SelectFusionImage()));
contextActions.push_back(actionAdd_fusion_image);
+ contextMenu.addSeparator();
+ QAction* actionResetMatrix = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/identity.png")),
+ tr("Reset transformation to identity"));
+ connect(actionResetMatrix, SIGNAL(triggered()), this,SLOT(ResetTransformationToIdentity()));
+
// TRIAL DS
/*
QMenu * m = new QMenu(menubar);
}
//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+void vvMainWindow::ResetTransformationToIdentity()
+{
+ std::string actorType = DataTree->selectedItems()[0]->data(1,Qt::UserRole).toString().toStdString();
+ int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
+ mSlicerManagers[index]->ResetTransformationToIdentity(actorType);
+ ImageInfoChanged();
+}
+//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::AddFusionImage(int index, QString file)
{
void OpenField();
void SelectOverlayImage();
void SelectFusionImage();
+ void ResetTransformationToIdentity();
void SetVFProperty(int subsampling,int scale,int lut, int width, double r, double g, double b);
void SetOverlayProperty(int color);
}
//----------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+void vvSlicerManager::ResetTransformationToIdentity(const std::string actorType)
+{
+ if(actorType == "image")
+ this->GetImage()->GetTransform()->Identity();
+ else if(actorType == "overlay")
+ this->GetSlicer(0)->GetOverlay()->GetTransform()->Identity();
+ else if(actorType == "fusion")
+ this->GetSlicer(0)->GetFusion()->GetTransform()->Identity();
+ else if(actorType == "vf")
+ this->GetVF()->GetTransform()->Identity();
+ else
+ return;
+
+ for(int i=0; i< this->GetNumberOfSlicers(); i++){
+ this->GetSlicer(i)->ForceUpdateDisplayExtent();
+ this->GetSlicer(i)->ResetCamera();
+ this->GetSlicer(i)->Render();
+ }
+}
+//------------------------------------------------------------------------------
//----------------------------------------------------------------------------
void vvSlicerManager::Render()
void UpdateViews(int current, int slicer);
void UpdateLinked(int slicer);
void UpdateLinkedNavigation(vvSlicer *slicer, bool bPropagate=false);
+ void ResetTransformationToIdentity(const std::string actorType);
void Render();
void AddLink(std::string newId) {