connect(levelSpinBox,SIGNAL(editingFinished()),this,SLOT(WindowLevelEdited()));
connect(colorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateColorMap()));
connect(presetComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateWindowLevel()));
+ connect(slicingPresetComboBox, SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateSlicingPreset()));
connect(inverseButton,SIGNAL(clicked()),this,SLOT(SwitchWindowLevel()));
connect(applyWindowLevelToAllButton,SIGNAL(clicked()),this,SLOT(ApplyWindowLevelToAllImages()));
-
connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(ShowContextMenu(QPoint)));
connect(linkPanel,SIGNAL(addLink(QString,QString)),this,SLOT(AddLink(QString,QString)));
this,SLOT(UpdateSlice(int,int)));
connect(mSlicerManagers.back(), SIGNAL(UpdateTSlice(int, int)),
this,SLOT(UpdateTSlice(int, int)));
+ connect(mSlicerManagers.back(), SIGNAL(UpdateTSlice(int, int)),
+ this,SLOT(ImageInfoChanged()));
connect(mSlicerManagers.back(), SIGNAL(UpdateSliceRange(int,int,int,int,int)),
this,SLOT(UpdateSliceRange(int,int,int,int,int)));
connect(mSlicerManagers.back(), SIGNAL(UpdateLinkManager(std::string,int,double,double,double,int)),
infoPanel->setOrigin(GetVectorDoubleAsString(origin));
infoPanel->setSpacing(GetVectorDoubleAsString(inputSpacing));
infoPanel->setNPixel(QString::number(NPixel)+" ("+inputSizeInBytes+")");
- transformation = imageSelected->GetTransform()->GetMatrix();
+ transformation = imageSelected->GetTransform()[mSlicerManagers[index]->GetTSlice()]->GetMatrix();
infoPanel->setTransformation(Get4x4MatrixDoubleAsString(transformation));
landmarksPanel->SetCurrentLandmarks(mSlicerManagers[index]->GetLandmarks(),
}
}
WindowLevelChanged();
+ slicingPresetComboBox->setCurrentIndex(mSlicerManagers[index]->GetSlicingPreset());
if (mSlicerManagers[index]->GetSlicer(0)->GetVF()) {
overlayPanel->getVFName(mSlicerManagers[index]->GetVFName().c_str());
}
//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+void vvMainWindow::UpdateSlicingPreset()
+{
+ if (DataTree->selectedItems().size()) {
+ int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
+ mSlicerManagers[index]->SetSlicingPreset(vvSlicerManager::SlicingPresetType(slicingPresetComboBox->currentIndex()));
+ }
+}
+//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::UpdateColorMap()
{
bool bId = true;
for(int i=0; i<4; i++)
for(int j=0; j<4; j++) {
- double elt = mSlicerManagers[index]->GetImage()->GetTransform()->GetMatrix()->GetElement(i,j);
+ // TODO SR and BP: check on the list of transforms and not the first only
+ double elt = mSlicerManagers[index]->GetImage()->GetTransform()[0]->GetMatrix()->GetElement(i,j);
if(i==j && elt!=1.)
bId = false;
if(i!=j && elt!=0.)
this,SLOT(UpdateSlice(int,int)));
connect(mSlicerManagers.back(), SIGNAL(UpdateTSlice(int, int)),
this,SLOT(UpdateTSlice(int, int)));
+ connect(mSlicerManagers.back(), SIGNAL(UpdateTSlice(int, int)),
+ this,SLOT(ImageInfoChanged()));
connect(mSlicerManagers.back(), SIGNAL(UpdateSliceRange(int,int,int,int,int)),
this,SLOT(UpdateSliceRange(int,int,int,int,int)));
connect(mSlicerManagers.back(), SIGNAL(UpdateLinkManager(std::string,int,double,double,double,int)),