To-do list:
In this case, I am planing to put an image onto a RectROI object.
The pixel size of the scenery image is not necessarily equal to that of a RectROI object.
Instead the image size is variable and capable of adaptive to any size you set .
Besides the image can be replaced with another one by double-mouse-click.
Any two of rectangle set can exchage the images with each other if needed.
Several things taken into consideration:
1. The top left corner is just the location that input image should be placed
2. Get the width and hieght of a rectangle, which will become the size of the input image.
Observer Pattern – Design Pattern (Using C#)
Users can continuously add or remove a ShapeROI of any shapes(RectROI, EllipseROI, SquareROI, …).
On the other hand, I create a ROIObservable class in order to monitor the size and location of the created ShapeROI objects.
If any ShapeROI object has changed its size or location,
ROIObservable instance will automatically notify to all of its members who has resgistered to it before.
In other words, ROIObserver and ScrollbarObserver objects are informed immediately once any ShapeROI object has changed.
In another scenrio, users may want to modify one of ShapeROI object by adjusting a scrollbar.
Hene a ShapeROI should has a ShapeROIObserver instance, which has registered to a ScrollbarObservable instance.
Then ShapeROI will be informed automatically if users has changed a size scrollbar or a location srollbar.
Here, ShapeROI should have a IDObserverable instance, which is reponsible to notify the amount
of all kinds of ShapeROI(RectROI, EllipseROI, …), and also the order of sequences. Therefore we
can easily handle all instances in ShapeROI, no matter that its order of sequences have changed or some instances
has been added or removed. Therefore ImageManager can be notified and update its oder of seqences of a image list.
To-do list:
1. To show or hide the control points around the image according to the user`s decision.
2. To build connections bewteen one region of interest(ROI) rectangle and antother ROI polygon.
In which the ROI polygon can be viewed as a child of ROI rectangle. If one had squeezed the size of a
ROI rectangle, followed by a smaller ROI polygon. However it hadn`t been changed for a ROI rectangle
when you only adjusted some points of a ROI polygon. This is because that a ROI polygon is just inside a ROI rectangle.
留言列表