- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- for (int i = 0; i < this->SM->NumberOfSlicers(); i++) {
- if (this->SM->GetSlicer(i)->GetCursorVisibility()) {
+ for (int i = 0; i < this->SM->GetNumberOfSlicers(); i++) {
+ if (this->SM->GetSlicer(i)->GetCursorVisibility() && !this->SM->IsLinked()) {
- for(int i=0;i<SM->NumberOfSlicers();i++)
- {
- SM->RemoveActor("overlay",0);
- SM->SetColorMap(0);
- SM->Render();
- }
- return;
- }
- if (KeyPress == "u") {
+ for(int i=0; i<SM->GetNumberOfSlicers(); i++) {
+ SM->RemoveActor("overlay",0);
+ SM->SetColorMap(0);
+ SM->Render();
+ }
+ return;
+ }
+ if (KeyPress == "u") {
if (KeyPress == "r" || KeyPress=="R") {
this->SM->GetSlicer(VisibleInWindow)->ResetCamera();
this->SM->GetSlicer(VisibleInWindow)->Render();
if (KeyPress == "r" || KeyPress=="R") {
this->SM->GetSlicer(VisibleInWindow)->ResetCamera();
this->SM->GetSlicer(VisibleInWindow)->Render();
}
if (KeyPress == "Down") {
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()-1);
this->SM->UpdateSlice(VisibleInWindow);
}
if (KeyPress == "Down") {
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()-1);
this->SM->UpdateSlice(VisibleInWindow);
this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Sagital\n<slice>");
this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(0);
this->SM->UpdateSliceRange(VisibleInWindow);
this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Sagital\n<slice>");
this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(0);
this->SM->UpdateSliceRange(VisibleInWindow);
}
if (KeyPress == "F3") {
this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Coronal\n<slice>");
this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(1);
this->SM->UpdateSliceRange(VisibleInWindow);
}
if (KeyPress == "F3") {
this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Coronal\n<slice>");
this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(1);
this->SM->UpdateSliceRange(VisibleInWindow);
}
if (KeyPress == "F4") {
this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Axial\n<slice>");
this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(2);
this->SM->UpdateSliceRange(VisibleInWindow);
}
if (KeyPress == "F4") {
this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Axial\n<slice>");
this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(2);
this->SM->UpdateSliceRange(VisibleInWindow);
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()+1);
this->SM->UpdateSlice(VisibleInWindow);
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()+1);
this->SM->UpdateSlice(VisibleInWindow);
} else if (event == vtkCommand::MouseWheelForwardEvent && isi->GetInteractor()->GetControlKey()) {
double factor = 2;
this->Dolly(pow((double)1.1, factor),isi->GetInteractor());
} else if (event == vtkCommand::MouseWheelForwardEvent && isi->GetInteractor()->GetControlKey()) {
double factor = 2;
this->Dolly(pow((double)1.1, factor),isi->GetInteractor());
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()-1);
this->SM->UpdateSlice(VisibleInWindow);
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()-1);
this->SM->UpdateSlice(VisibleInWindow);
} else if (event == vtkCommand::MouseWheelBackwardEvent && isi->GetInteractor()->GetControlKey()) {
double factor = -2;
this->Dolly(pow((double)1.1, factor),isi->GetInteractor());
} else if (event == vtkCommand::MouseWheelBackwardEvent && isi->GetInteractor()->GetControlKey()) {
double factor = -2;
this->Dolly(pow((double)1.1, factor),isi->GetInteractor());
this->SM->UpdateViews(1,VisibleInWindow);
this->SM->UpdateLinked(VisibleInWindow);
this->SM->UpdateInfoOnCursorPosition(VisibleInWindow);
this->SM->UpdateViews(1,VisibleInWindow);
this->SM->UpdateLinked(VisibleInWindow);
this->SM->UpdateInfoOnCursorPosition(VisibleInWindow);
// Adjust the window level here
int *size = isi->GetInteractor()->GetRenderWindow()->GetSize();
double window = this->InitialWindow;
// Adjust the window level here
int *size = isi->GetInteractor()->GetRenderWindow()->GetSize();
double window = this->InitialWindow;