mContextMenu = &contextMenu;
mMenuExperimentalTools = menuExperimental;
mMainWidget = this;
+ mCurrentTime = -1;
//Init the contextMenu
this->setContextMenuPolicy(Qt::CustomContextMenu);
}
QApplication::restoreOverrideCursor();
+ // 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 {
+ // TODO
+ }
}
//------------------------------------------------------------------------------
}
}
}
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
void vvMainWindow::OpenField()
{
int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
if (!file.isEmpty())
AddField(file,index);
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvMainWindow::AddFieldEntry(QString filename,int index,bool from_disk)
{
//create an item in the tree with good settings
ImageInfoChanged();
QApplication::restoreOverrideCursor();
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvMainWindow::AddField(vvImage::Pointer vf,QString file,int index)
{
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
}
QApplication::restoreOverrideCursor();
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvMainWindow::AddField(QString file,int index)
{
if (QFile::exists(file))
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SetVFProperty(int subsampling, int scale, int log) {
int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SetOverlayProperty(int color) {
int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
}
}
}
+//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::NOHorizontalSliderMoved() {
+ // if (mCurrentTime == NOHorizontalSlider->value()) return;
HorizontalSliderMoved(NOHorizontalSlider->value(),COLUMN_UL_VIEW,0);
+ // mCurrentTime = NOHorizontalSlider->value();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::NEHorizontalSliderMoved() {
+ // if (mCurrentTime == NEHorizontalSlider->value()) return;
HorizontalSliderMoved(NEHorizontalSlider->value(),COLUMN_UR_VIEW,1);
+ // mCurrentTime = NEHorizontalSlider->value();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SOHorizontalSliderMoved() {
+ // if (mCurrentTime == SOHorizontalSlider->value()) return;
HorizontalSliderMoved(SOHorizontalSlider->value(),COLUMN_DL_VIEW,2);
+ // mCurrentTime = SOHorizontalSlider->value();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SEHorizontalSliderMoved() {
+ // if (mCurrentTime == SEHorizontalSlider->value()) return;
HorizontalSliderMoved(SEHorizontalSlider->value(),COLUMN_DR_VIEW,3);
+ // mCurrentTime = SEHorizontalSlider->value();
}
//------------------------------------------------------------------------------
if (DataTree->topLevelItem(i)->data(COLUMN_UL_VIEW,Qt::CheckStateRole).toInt() > 1)
{
mSlicerManagers[i]->GetSlicer(0)->SetSlice(value);
+ mSlicerManagers[i]->VerticalSliderHasChanged(0, value);
// mSlicerManagers[i]->UpdateSlice(0);
// <-- DS add this. Not too much update ? YES.
break;
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::NEVerticalSliderChanged() {
int value = NEVerticalSlider->value();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SOVerticalSliderChanged() {
int value = SOVerticalSlider->value();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SEVerticalSliderChanged() {
int value = SEVerticalSlider->value();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::UpdateSlice(int slicer, int slice) {
if (slicer == 0) {
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::UpdateTSlice(int slicer, int slice) {
switch (slicer)
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::UpdateSliceRange(int slicer, int min, int max, int tmin, int tmax) {
int position = int((min+max)/2);
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SaveNOScreenshot() {
vtkWindowToImageFilter *w2i = vtkWindowToImageFilter::New();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SaveNEScreenshot() {
vtkWindowToImageFilter *w2i = vtkWindowToImageFilter::New();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SaveSOScreenshot() {
vtkWindowToImageFilter *w2i = vtkWindowToImageFilter::New();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SaveSEScreenshot() {
vtkWindowToImageFilter *w2i = vtkWindowToImageFilter::New();
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::SaveScreenshot(vtkImageData* image) {
QString Extensions = "Images( *.png);;";
}
//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::GoToCursor() {
int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);