Commit 6a51200e2b07c67702d9359d05f4de1d4093441d
1 parent
b87bcfe2
Exists in
master
and in
6 other branches
FIX: Added comentary in the TestOperationPosition method and removed some blank lines
Showing
1 changed file
with
3 additions
and
10 deletions
Show diff stats
invesalius/data/viewer_slice.py
... | ... | @@ -224,7 +224,6 @@ class Viewer(wx.Panel): |
224 | 224 | self.interactor.Render() |
225 | 225 | ps.Publisher().sendMessage('Update slice viewer') |
226 | 226 | |
227 | - | |
228 | 227 | def OnCrossMove(self, obj, evt_vtk): |
229 | 228 | coord = self.GetCoordinate() |
230 | 229 | # Update position in other slices |
... | ... | @@ -238,9 +237,7 @@ class Viewer(wx.Panel): |
238 | 237 | ps.Publisher().sendMessage(('Set scroll position', 'AXIAL'), |
239 | 238 | coord[2]) |
240 | 239 | |
241 | - | |
242 | 240 | def GetCoordinate(self): |
243 | - | |
244 | 241 | # Find position |
245 | 242 | mouse_x, mouse_y = self.interactor.GetEventPosition() |
246 | 243 | self.pick.Pick(mouse_x, mouse_y, 0, self.ren) |
... | ... | @@ -281,7 +278,6 @@ class Viewer(wx.Panel): |
281 | 278 | return coord |
282 | 279 | |
283 | 280 | def GetCoordinateCursor(self): |
284 | - | |
285 | 281 | # Find position |
286 | 282 | mouse_x, mouse_y = self.interactor.GetEventPosition() |
287 | 283 | self.pick.Pick(mouse_x, mouse_y, 0, self.ren) |
... | ... | @@ -289,7 +285,6 @@ class Viewer(wx.Panel): |
289 | 285 | return x, y, z |
290 | 286 | |
291 | 287 | def GetCoordinateCursorEdition(self): |
292 | - | |
293 | 288 | # Find position |
294 | 289 | mouse_x, mouse_y = self.interactor.GetEventPosition() |
295 | 290 | self.pick.Pick(mouse_x, mouse_y, 0, self.ren) |
... | ... | @@ -349,7 +344,6 @@ class Viewer(wx.Panel): |
349 | 344 | self.SetInput(imagedata) |
350 | 345 | |
351 | 346 | def SetInput(self, imagedata): |
352 | - | |
353 | 347 | self.imagedata = imagedata |
354 | 348 | |
355 | 349 | ren = self.ren |
... | ... | @@ -434,7 +428,6 @@ class Viewer(wx.Panel): |
434 | 428 | self.ren.Render() |
435 | 429 | |
436 | 430 | def __update_display_extent(self): |
437 | - | |
438 | 431 | pos = self.slice_number |
439 | 432 | e = self.imagedata.GetWholeExtent() |
440 | 433 | |
... | ... | @@ -479,6 +472,9 @@ class Viewer(wx.Panel): |
479 | 472 | self.interactor.Render() |
480 | 473 | |
481 | 474 | def TestOperationPosition(self, coord): |
475 | + """ | |
476 | + Test if coord is into the imagedata limits. | |
477 | + """ | |
482 | 478 | x, y, z = coord |
483 | 479 | xi, yi, zi = 0, 0, 0 |
484 | 480 | xf, yf, zf = self.imagedata.GetDimensions() |
... | ... | @@ -487,6 +483,3 @@ class Viewer(wx.Panel): |
487 | 483 | and zi <= z <= zf: |
488 | 484 | return True |
489 | 485 | return False |
490 | - | |
491 | - | |
492 | - | ... | ... |