// Try to guess default WindowLevel
double range[2];
mSlicerManagers.back()->GetImage()->GetFirstVTKImageData()->GetScalarRange(range);
- // DD(range[0]);
- // DD(range[1]);
if ((range[0] == 0) && (range[1] == 1)) {
presetComboBox->setCurrentIndex(5);// binary
} else {
//------------------------------------------------------------------------------
void vvMainWindow::CurrentImageChanged(std::string id)
{
- // DD("CurrentImageChanged");
-// DD(id);
-// DD(mCurrentSelectedImageId);
if (id == mCurrentSelectedImageId) return; // Do nothing
int selected = 0;
for (int i = 0; i < DataTree->topLevelItemCount(); i++) {
}
DataTree->topLevelItem(selected)->setSelected(1);
- // DD(mSlicerManagers[selected]->GetFileName());
mCurrentSelectedImageId = id;
emit SelectedImageHasChanged(mSlicerManagers[selected]);
}
}
windowSpinBox->setValue(mSlicerManagers[index]->GetColorWindow());
levelSpinBox->setValue(mSlicerManagers[index]->GetColorLevel());
- // DD(mSlicerManagers[index]->GetColorMap());
- // DD(mSlicerManagers[index]->GetPreset());
presetComboBox->setCurrentIndex(mSlicerManagers[index]->GetPreset());
colorMapComboBox->setCurrentIndex(mSlicerManagers[index]->GetColorMap());
mSlicerManagers[index]->SetColorLevel(levelSpinBox->value());
mSlicerManagers[index]->SetPreset(presetComboBox->currentIndex());
mSlicerManagers[index]->Render();
+ windowSpinBox->setValue(mSlicerManagers[index]->GetColorWindow());
+ levelSpinBox->setValue(mSlicerManagers[index]->GetColorLevel());
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void vvMainWindow::AddROI(int index, QString file)
{
- DD("AddImageAndROI");
/*
// Get slice manager
//------------------------------------------------------------------------------
void vvMainWindow::RemoveLink(QString image1,QString image2)
{
- // DD("vvMainWindow:RemoveLink");
for (unsigned int i = 0; i < mSlicerManagers.size(); i++) {
if (image1.toStdString() == mSlicerManagers[i]->GetId()) {
mSlicerManagers[i]->RemoveLink(image2.toStdString());
void vvMainWindow::SOVerticalSliderChanged()
{
static int value=-1;
- // DD(value);
-// DD(SOVerticalSlider->value());
if (value == SOVerticalSlider->value()) return;
else value = SOVerticalSlider->value();
//int value = SOVerticalSlider->value();