------------------------------------------------------------------------------
| 122 | |
| 123 | //------------------------------------------------------------------------------ |
| 124 | void vtkResliceImageViewer::SetThickMode(int t) |
| 125 | { |
| 126 | vtkSmartPointer<vtkResliceCursor> rc = this->GetResliceCursor(); |
| 127 | |
| 128 | if (t == this->GetThickMode()) |
| 129 | { |
| 130 | return; |
| 131 | } |
| 132 | |
| 133 | vtkSmartPointer<vtkResliceCursorLineRepresentation> resliceCursorRepOld = |
| 134 | vtkResliceCursorLineRepresentation::SafeDownCast( |
| 135 | this->ResliceCursorWidget->GetRepresentation()); |
| 136 | vtkSmartPointer<vtkResliceCursorLineRepresentation> resliceCursorRepNew; |
| 137 | |
| 138 | this->GetResliceCursor()->SetThickMode(t); |
| 139 | |
| 140 | if (t) |
| 141 | { |
| 142 | resliceCursorRepNew = vtkSmartPointer<vtkResliceCursorThickLineRepresentation>::New(); |
| 143 | } |
| 144 | else |
| 145 | { |
| 146 | resliceCursorRepNew = vtkSmartPointer<vtkResliceCursorLineRepresentation>::New(); |
| 147 | } |
| 148 | |
| 149 | int e = this->ResliceCursorWidget->GetEnabled(); |
| 150 | this->ResliceCursorWidget->SetEnabled(0); |
| 151 | |
| 152 | resliceCursorRepNew->GetResliceCursorActor()->GetCursorAlgorithm()->SetResliceCursor(rc); |
| 153 | resliceCursorRepNew->GetResliceCursorActor()->GetCursorAlgorithm()->SetReslicePlaneNormal( |
| 154 | this->SliceOrientation); |
| 155 | this->ResliceCursorWidget->SetRepresentation(resliceCursorRepNew); |
| 156 | resliceCursorRepNew->SetLookupTable(resliceCursorRepOld->GetLookupTable()); |
| 157 | |
| 158 | resliceCursorRepNew->SetWindowLevel( |
| 159 | resliceCursorRepOld->GetWindow(), resliceCursorRepOld->GetLevel(), 1); |
| 160 | |
| 161 | this->ResliceCursorWidget->SetEnabled(e); |
| 162 | } |
| 163 | |
| 164 | //------------------------------------------------------------------------------ |
| 165 | void vtkResliceImageViewer::SetResliceCursor(vtkResliceCursor* rc) |