@@ -43,9 +43,16 @@ class ImageWidget(ipyw.VBox):
4343
4444 image_width, image_height : int
4545 Dimension of Jupyter notebook's image widget.
46+
47+ image_widget : obj or None
48+ Jupyter notebook's image widget. If None, a new widget will be created.
49+
50+ cursor_widget : obj or None
51+ Jupyter notebook's cursor widget. If None, a new widget will be created.
4652 """
4753
4854 def __init__ (self , logger = None , image_width = 500 , image_height = 500 ,
55+ image_widget = None , cursor_widget = None ,
4956 ** kwargs ):
5057 super ().__init__ ()
5158 if 'use_opencv' in kwargs :
@@ -54,7 +61,7 @@ def __init__(self, logger=None, image_width=500, image_height=500,
5461 DeprecationWarning )
5562
5663 self ._viewer = EnhancedCanvasView (logger = logger )
57- self .ALLOWED_CURSOR_LOCATIONS = ['top' , 'bottom' , None ]
64+ self .ALLOWED_CURSOR_LOCATIONS = ['top' , 'bottom' , None ]
5865 self .RESERVED_MARKER_SET_NAMES = ['all' ]
5966
6067 if image_widget is None :
@@ -108,8 +115,6 @@ def __init__(self, logger=None, image_width=500, image_height=500,
108115 self ._cursor = 'bottom'
109116 self .children = [self ._jup_img , self ._jup_coord ]
110117
111-
112-
113118 # These need to also be set for now.
114119 # Ginga uses them to figure out what size image to make.
115120 self ._jup_img .width = image_width
0 commit comments