batoolset 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- batoolset/GUI/__init__.py +0 -0
- batoolset/GUI/list_gui.py +513 -0
- batoolset/GUI/multi_image_display.py +989 -0
- batoolset/GUI/open.py +325 -0
- batoolset/GUI/overlay_hints.py +45 -0
- batoolset/GUI/paint2.py +1345 -0
- batoolset/GUI/scrollablepaint.py +1152 -0
- batoolset/IJ_ROIs/__init__.py +0 -0
- batoolset/IJ_ROIs/tools.py +40 -0
- batoolset/PATH/__init__.py +0 -0
- batoolset/PATH/tools.py +79 -0
- batoolset/SQLite_tools/__init__.py +0 -0
- batoolset/SQLite_tools/tools.py +840 -0
- batoolset/__init__.py +0 -0
- batoolset/binary/__init__.py +0 -0
- batoolset/binary/tools.py +123 -0
- batoolset/binarytools/__init__.py +0 -0
- batoolset/binarytools/cell_center_detector.py +290 -0
- batoolset/clipboard_tools/__init__.py +0 -0
- batoolset/clipboard_tools/tools.py +7 -0
- batoolset/colors/__init__.py +0 -0
- batoolset/colors/colorgen.py +193 -0
- batoolset/colors/tools.py +22 -0
- batoolset/command_line/__init__.py +0 -0
- batoolset/command_line/tools.py +18 -0
- batoolset/dialogs/__init__.py +0 -0
- batoolset/dialogs/opensave.py +228 -0
- batoolset/dicts/__init__.py +0 -0
- batoolset/dicts/tools.py +299 -0
- batoolset/dims/__init__.py +0 -0
- batoolset/dims/tools.py +83 -0
- batoolset/draw/__init__.py +0 -0
- batoolset/draw/shapes/Position.py +183 -0
- batoolset/draw/shapes/__init__.py +0 -0
- batoolset/draw/shapes/automated_alignment_drawing_refactored.py +346 -0
- batoolset/draw/shapes/circle2d.py +99 -0
- batoolset/draw/shapes/compute_optimal_size_all_merged.py +317 -0
- batoolset/draw/shapes/ellipse2d.py +336 -0
- batoolset/draw/shapes/freehand2d.py +235 -0
- batoolset/draw/shapes/group.py +1830 -0
- batoolset/draw/shapes/image2d.py +2469 -0
- batoolset/draw/shapes/line2d.py +575 -0
- batoolset/draw/shapes/point2d.py +257 -0
- batoolset/draw/shapes/polygon2d.py +357 -0
- batoolset/draw/shapes/polyline2d.py +235 -0
- batoolset/draw/shapes/rect2d.py +388 -0
- batoolset/draw/shapes/rectangle2d.py +601 -0
- batoolset/draw/shapes/scalebar.py +304 -0
- batoolset/draw/shapes/serializablefont.py +126 -0
- batoolset/draw/shapes/serializableguiparams.py +10 -0
- batoolset/draw/shapes/square2d.py +103 -0
- batoolset/draw/shapes/textorientation.py +45 -0
- batoolset/draw/shapes/tools.py +467 -0
- batoolset/draw/shapes/transform2D.py +350 -0
- batoolset/draw/shapes/txt2d.py +550 -0
- batoolset/draw/widgets/__init__.py +0 -0
- batoolset/draw/widgets/col.py +343 -0
- batoolset/draw/widgets/image_group.py +248 -0
- batoolset/draw/widgets/image_organizer.py +96 -0
- batoolset/draw/widgets/paint.py +184 -0
- batoolset/draw/widgets/vectorial.py +257 -0
- batoolset/figure/__init__.py +0 -0
- batoolset/figure/alignment.py +814 -0
- batoolset/figure/column.py +1117 -0
- batoolset/figure/fig_tools.py +285 -0
- batoolset/figure/minimal_debugger_scale_etc.py +139 -0
- batoolset/figure/panel.py +697 -0
- batoolset/figure/row.py +852 -0
- batoolset/figure/user_selection.py +287 -0
- batoolset/files/__init__.py +0 -0
- batoolset/files/tools.py +1321 -0
- batoolset/images/__init__.py +0 -0
- batoolset/images/tools.py +81 -0
- batoolset/img.py +5216 -0
- batoolset/linux/__init__.py +0 -0
- batoolset/linux/tools.py +72 -0
- batoolset/lists/__init__.py +0 -0
- batoolset/lists/tools.py +436 -0
- batoolset/luts/__init__.py +0 -0
- batoolset/luts/lut_minimal_test.py +1207 -0
- batoolset/matplolib/__init__.py +0 -0
- batoolset/matplolib/tools.py +44 -0
- batoolset/np_tools/__init__.py +0 -0
- batoolset/np_tools/tools.py +252 -0
- batoolset/np_tools/trash.py +15 -0
- batoolset/pandas_tools/__init__.py +0 -0
- batoolset/pandas_tools/tools.py +880 -0
- batoolset/partials/__init__.py +0 -0
- batoolset/partials/tools.py +83 -0
- batoolset/plot_tools/__init__.py +0 -0
- batoolset/plot_tools/tools.py +70 -0
- batoolset/pyqt/__init__.py +0 -0
- batoolset/pyqt/tools.py +691 -0
- batoolset/re_tools/__init__.py +0 -0
- batoolset/re_tools/tools.py +35 -0
- batoolset/serialization/__init__.py +0 -0
- batoolset/serialization/tools.py +1192 -0
- batoolset/sets/__init__.py +0 -0
- batoolset/sets/tools.py +109 -0
- batoolset/settings/__init__.py +0 -0
- batoolset/settings/global_settings.py +134 -0
- batoolset/strings/__init__.py +0 -0
- batoolset/strings/tools.py +225 -0
- batoolset/ta/__init__.py +0 -0
- batoolset/ta/database/__init__.py +0 -0
- batoolset/ta/database/advanced_sql_plotter.py +1170 -0
- batoolset/ta/database/my_qt_table.py +79 -0
- batoolset/ta/database/preview_and_edit_sqlite_db.py +405 -0
- batoolset/ta/database/sql.py +2141 -0
- batoolset/ta/database/sql_column_name_dialog.py +122 -0
- batoolset/ta/measurements/TAmeasures.py +2226 -0
- batoolset/ta/measurements/__init__.py +0 -0
- batoolset/ta/measurements/measurements3D/__init__.py +0 -0
- batoolset/ta/measurements/measurements3D/get_point_on_surface_if_centroid_is_bad.py +175 -0
- batoolset/ta/measurements/measurements3D/height_map_to_projection.py +82 -0
- batoolset/ta/measurements/measurements3D/measures3D.py +208 -0
- batoolset/ta/measurements/measurements3D/triangulate.py +331 -0
- batoolset/ta/measurements/nematic.py +562 -0
- batoolset/ta/measurements/nematic_measurements.py +107 -0
- batoolset/ta/segmentation/__init__.py +0 -0
- batoolset/ta/segmentation/neo_wshed.py +314 -0
- batoolset/ta/selections/__init__.py +0 -0
- batoolset/ta/selections/selection.py +329 -0
- batoolset/ta/tracking/__init__.py +0 -0
- batoolset/ta/tracking/last_tracking_based_on_matching_or_on_translation_from_mermaid_warp.py +653 -0
- batoolset/ta/tracking/local_to_track_correspondance.py +138 -0
- batoolset/ta/tracking/rapid_detection_of_vertices.py +517 -0
- batoolset/ta/tracking/registration.py +108 -0
- batoolset/ta/tracking/swap_detector_and_fixer.py +296 -0
- batoolset/ta/tracking/track_correction.py +238 -0
- batoolset/ta/tracking/tracking_error_detector_and_fixer.py +3099 -0
- batoolset/ta/tracking/tracking_yet_another_approach_pyramidal_registration_n_neo_swapping_correction.py +725 -0
- batoolset/ta/utils/TA_tools.py +43 -0
- batoolset/ta/utils/__init__.py +0 -0
- batoolset/ta/utils/rps_tools.py +1783 -0
- batoolset/tests/__init__.py +0 -0
- batoolset/tests/rps_tools.py +51 -0
- batoolset/tests/tools.py +10 -0
- batoolset/tools/__init__.py +0 -0
- batoolset/tools/early_stopper_class.py +9 -0
- batoolset/tools/guided_data_recoverer.py +110 -0
- batoolset/tools/logger.py +100 -0
- batoolset/tools/mytimer.py +31 -0
- batoolset/tools/prompt_color.py +160 -0
- batoolset/tools/qthandler.py +118 -0
- batoolset/uitools/__init__.py +0 -0
- batoolset/uitools/blinker.py +56 -0
- batoolset/unsafe/__init__.py +0 -0
- batoolset/unsafe/tools.py +115 -0
- batoolset/utils/__init__.py +0 -0
- batoolset/utils/commontools.py +158 -0
- batoolset/utils/loadlist.py +728 -0
- batoolset/version.py +10 -0
- batoolset/xml/__init__.py +0 -0
- batoolset/xml/tools.py +65 -0
- batoolset/zip_tools/__init__.py +0 -0
- batoolset/zip_tools/tools.py +76 -0
- batoolset-0.1.0.dist-info/LICENSE +24 -0
- batoolset-0.1.0.dist-info/METADATA +45 -0
- batoolset-0.1.0.dist-info/RECORD +162 -0
- batoolset-0.1.0.dist-info/WHEEL +5 -0
- batoolset-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# below is the java code of my selection --> I should inspire myself from it
|
|
2
|
+
# see the best way todo that
|
|
3
|
+
# or maybe allow to handle only elements of a given scope --> in a way that simplifies a lot the things !!! --> think about it
|
|
4
|
+
# if scope is images --> only offer images options, if scope is panel --> offer panel options
|
|
5
|
+
# if scope is Figure --> only offer figure options
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# package GUIs;
|
|
9
|
+
#
|
|
10
|
+
# import MyShapes.Figure;
|
|
11
|
+
# import MyShapes.Montage;
|
|
12
|
+
# import MyShapes.MyImage2D;
|
|
13
|
+
# import MyShapes.PARoi;
|
|
14
|
+
# import MyShapes.Row;
|
|
15
|
+
# import MyShapes.MyTextRow;
|
|
16
|
+
# import java.awt.geom.Point2D;
|
|
17
|
+
# import java.util.ArrayList;
|
|
18
|
+
#
|
|
19
|
+
# /**
|
|
20
|
+
# * This class deals with selections
|
|
21
|
+
# *
|
|
22
|
+
# * @author benoit aigouy
|
|
23
|
+
# */
|
|
24
|
+
# public class OptimalSelection {
|
|
25
|
+
#
|
|
26
|
+
# public static Object getSelectionAt(ArrayList<Object> ROIs, boolean goDeeper, Point2D.Double mouseClick, Object objectsAlreadySelected) {
|
|
27
|
+
# Object sel = null;
|
|
28
|
+
# if (ROIs == null || ROIs.isEmpty()) {
|
|
29
|
+
# return null;
|
|
30
|
+
# }
|
|
31
|
+
# int size = ROIs.size();
|
|
32
|
+
# /* we loop in reverse order */
|
|
33
|
+
# loop1:
|
|
34
|
+
# for (int i = size - 1; i >= 0; i--) {
|
|
35
|
+
# Object object = ROIs.get(i);
|
|
36
|
+
# if (object == null) {
|
|
37
|
+
# continue;
|
|
38
|
+
# }
|
|
39
|
+
# if (objectsAlreadySelected instanceof MyImage2D) {
|
|
40
|
+
# /* we are at the lowest level --> we go up again */
|
|
41
|
+
# if ((object instanceof Figure) || (object instanceof Row) || (object instanceof Montage)) {
|
|
42
|
+
# if (object instanceof PARoi) {
|
|
43
|
+
# if (((PARoi) object).contains(mouseClick)) {
|
|
44
|
+
# return object;
|
|
45
|
+
# }
|
|
46
|
+
# }
|
|
47
|
+
# }
|
|
48
|
+
# }
|
|
49
|
+
# /* go deeper --> if selected object is a figure --> return the row under the mouse */
|
|
50
|
+
# if (objectsAlreadySelected instanceof Figure) {
|
|
51
|
+
# Row montageContainingClick = ((Figure) objectsAlreadySelected).getRowAtPosition(mouseClick);
|
|
52
|
+
# if (montageContainingClick instanceof Row) {
|
|
53
|
+
# return montageContainingClick;
|
|
54
|
+
# }
|
|
55
|
+
# }
|
|
56
|
+
# /* go deeper --> if selected object is a row --> return the montage under the mouse */
|
|
57
|
+
# if (objectsAlreadySelected instanceof Row) {
|
|
58
|
+
# Montage montageContainingClick = ((Row) objectsAlreadySelected).getMontageAtPosition(mouseClick);
|
|
59
|
+
# if (montageContainingClick instanceof Montage) {
|
|
60
|
+
# return montageContainingClick;
|
|
61
|
+
# }
|
|
62
|
+
# }
|
|
63
|
+
# /* go deeper --> if selected object is a Montage --> return the image2D under the mouse */
|
|
64
|
+
# if (objectsAlreadySelected instanceof Montage) {
|
|
65
|
+
# MyImage2D montageContainingClick = ((Montage) objectsAlreadySelected).getMyImage2DAtPosition(mouseClick);
|
|
66
|
+
# if (montageContainingClick instanceof MyImage2D) {
|
|
67
|
+
# return montageContainingClick;
|
|
68
|
+
# }
|
|
69
|
+
# }
|
|
70
|
+
# if (object instanceof PARoi) {
|
|
71
|
+
# if (((PARoi) object).contains(mouseClick)) {
|
|
72
|
+
# return object;
|
|
73
|
+
# }
|
|
74
|
+
# }
|
|
75
|
+
# }
|
|
76
|
+
# return sel;
|
|
77
|
+
# }
|
|
78
|
+
#
|
|
79
|
+
# /**
|
|
80
|
+
# * adds to the current selection the newly selected object
|
|
81
|
+
# *
|
|
82
|
+
# * @param ROIs
|
|
83
|
+
# * @param breakOnFirstEncounter
|
|
84
|
+
# * @param onlyAllowSameInstanceAsSelection
|
|
85
|
+
# * @param mouseClick
|
|
86
|
+
# * @param objectsAlreadySelected
|
|
87
|
+
# * @return
|
|
88
|
+
# */
|
|
89
|
+
# public static Object addToSelection(ArrayList<Object> ROIs, boolean breakOnFirstEncounter, boolean onlyAllowSameInstanceAsSelection, Point2D.Double mouseClick, Object objectsAlreadySelected) {
|
|
90
|
+
# Object newSel = getSelection(ROIs, breakOnFirstEncounter, onlyAllowSameInstanceAsSelection, mouseClick, objectsAlreadySelected);
|
|
91
|
+
# // System.out.println("potentially newly selected object " + newSel + " " + objectsAlreadySelected);
|
|
92
|
+
# /* if there is no cur sel return new sel as cur sel */
|
|
93
|
+
# if (objectsAlreadySelected == null) {
|
|
94
|
+
# return newSel;
|
|
95
|
+
# }
|
|
96
|
+
# if (newSel == null) {
|
|
97
|
+
# return objectsAlreadySelected;
|
|
98
|
+
# }
|
|
99
|
+
# /* if sel is already a list of selected objects add the new sel to the list and return it */
|
|
100
|
+
# if (objectsAlreadySelected instanceof ArrayList) {
|
|
101
|
+
# ArrayList<Object> sel = ((ArrayList<Object>) objectsAlreadySelected);
|
|
102
|
+
# if (!sel.contains(newSel)) {
|
|
103
|
+
# sel.add(newSel);
|
|
104
|
+
# }
|
|
105
|
+
# return sel;
|
|
106
|
+
# } else {
|
|
107
|
+
# /* there is already a selected object but we create a list and add all objects to it */
|
|
108
|
+
# ArrayList<Object> sel = new ArrayList<Object>();
|
|
109
|
+
# sel.add(objectsAlreadySelected);
|
|
110
|
+
# if (newSel != objectsAlreadySelected) {
|
|
111
|
+
# sel.add(newSel);
|
|
112
|
+
# }
|
|
113
|
+
# return sel;
|
|
114
|
+
# }
|
|
115
|
+
# }
|
|
116
|
+
#
|
|
117
|
+
# public static Object getSelection(ArrayList<Object> ROIs, boolean breakOnFirstEncounter, boolean onlyAllowSameInstanceAsSelection, Point2D.Double mouseClick, Object objectsAlreadySelected) {
|
|
118
|
+
# if (ROIs == null || ROIs.isEmpty()) {
|
|
119
|
+
# return null;
|
|
120
|
+
# }
|
|
121
|
+
# int size = ROIs.size();
|
|
122
|
+
# ArrayList<Object> foundObjects = new ArrayList<Object>();
|
|
123
|
+
# /* we loop in reverse order */
|
|
124
|
+
# loop1:
|
|
125
|
+
# for (int i = size - 1; i >= 0; i--) {
|
|
126
|
+
# Object object = ROIs.get(i);
|
|
127
|
+
# /* we prevent the object from being selected twice */
|
|
128
|
+
# if (object == objectsAlreadySelected) {
|
|
129
|
+
# continue;
|
|
130
|
+
# }
|
|
131
|
+
# if (objectsAlreadySelected != null && (objectsAlreadySelected instanceof ArrayList)) {
|
|
132
|
+
# /* prevent from selecting the same object again */
|
|
133
|
+
# ArrayList<Object> curObjects = ((ArrayList<Object>) objectsAlreadySelected);
|
|
134
|
+
# for (Object foundObject : curObjects) {
|
|
135
|
+
# if (object == foundObject) {
|
|
136
|
+
# continue loop1;
|
|
137
|
+
# }
|
|
138
|
+
# }
|
|
139
|
+
# }
|
|
140
|
+
# if (object instanceof PARoi) {
|
|
141
|
+
# if (((PARoi) object).contains(mouseClick)) {
|
|
142
|
+
# if (objectsAlreadySelected == null) {
|
|
143
|
+
# return object;
|
|
144
|
+
# }
|
|
145
|
+
# if (onlyAllowSameInstanceAsSelection) {
|
|
146
|
+
# /* if they are of the same instance take it directly otherwise look inside */
|
|
147
|
+
# /* here we just get objects of the same type */
|
|
148
|
+
# if ((object instanceof Figure) && ((objectsAlreadySelected instanceof Figure) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof Figure))) {
|
|
149
|
+
# if (breakOnFirstEncounter) {
|
|
150
|
+
# return object;
|
|
151
|
+
# } else {
|
|
152
|
+
# foundObjects.add(object);
|
|
153
|
+
# }
|
|
154
|
+
# }
|
|
155
|
+
# /* prevent MyTextRow to be selected with Rows even if they are Rows */
|
|
156
|
+
# if (((object instanceof MyTextRow)) && (((objectsAlreadySelected instanceof MyTextRow)) || ((objectsAlreadySelected instanceof ArrayList) && (((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof MyTextRow)))) {
|
|
157
|
+
# if (breakOnFirstEncounter) {
|
|
158
|
+
# return object;
|
|
159
|
+
# } else {
|
|
160
|
+
# foundObjects.add(object);
|
|
161
|
+
# }
|
|
162
|
+
# } else if (((object instanceof Row) && !(object instanceof MyTextRow)) && (((objectsAlreadySelected instanceof Row) && !(objectsAlreadySelected instanceof MyTextRow)) || ((objectsAlreadySelected instanceof ArrayList) && (((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof Row) && !(((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof MyTextRow)))) {
|
|
163
|
+
# if (breakOnFirstEncounter) {
|
|
164
|
+
# return object;
|
|
165
|
+
# } else {
|
|
166
|
+
# foundObjects.add(object);
|
|
167
|
+
# }
|
|
168
|
+
# }
|
|
169
|
+
# if ((object instanceof Montage) && ((objectsAlreadySelected instanceof Montage) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof Montage))) {
|
|
170
|
+
# if (breakOnFirstEncounter) {
|
|
171
|
+
# return object;
|
|
172
|
+
# } else {
|
|
173
|
+
# foundObjects.add(object);
|
|
174
|
+
# }
|
|
175
|
+
# }
|
|
176
|
+
# if ((object instanceof MyImage2D) && ((objectsAlreadySelected instanceof MyImage2D) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof MyImage2D))) {
|
|
177
|
+
# if (breakOnFirstEncounter) {
|
|
178
|
+
# return object;
|
|
179
|
+
# } else {
|
|
180
|
+
# foundObjects.add(object);
|
|
181
|
+
# }
|
|
182
|
+
# }
|
|
183
|
+
# if ((object instanceof Figure) && ((objectsAlreadySelected instanceof MyTextRow) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof MyTextRow))) {
|
|
184
|
+
# Object innerSelectedObject = ((Figure) object).getRowAtPosition(mouseClick);
|
|
185
|
+
# if (innerSelectedObject instanceof MyTextRow) {
|
|
186
|
+
# if (breakOnFirstEncounter) {
|
|
187
|
+
# return innerSelectedObject;
|
|
188
|
+
# } else {
|
|
189
|
+
# foundObjects.add(innerSelectedObject);
|
|
190
|
+
# }
|
|
191
|
+
# }
|
|
192
|
+
# } else if ((object instanceof Figure) && (((objectsAlreadySelected instanceof Row) && !(objectsAlreadySelected instanceof MyTextRow)) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof Row && !(((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof MyTextRow)))) {
|
|
193
|
+
# Object innerSelectedObject = ((Figure) object).getRowAtPosition(mouseClick);
|
|
194
|
+
# if ((innerSelectedObject instanceof Row) && !(innerSelectedObject instanceof MyTextRow) ) {
|
|
195
|
+
# if (breakOnFirstEncounter) {
|
|
196
|
+
# return innerSelectedObject;
|
|
197
|
+
# } else {
|
|
198
|
+
# foundObjects.add(innerSelectedObject);
|
|
199
|
+
# }
|
|
200
|
+
# }
|
|
201
|
+
# }
|
|
202
|
+
# /* if instance of objects differ then take the compatible one when grouping */
|
|
203
|
+
# if ((object instanceof Figure) && ((objectsAlreadySelected instanceof Montage) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof Montage))) {
|
|
204
|
+
# Object innerSelectedObject = ((Figure) object).getRowAtPosition(mouseClick);
|
|
205
|
+
# if (innerSelectedObject instanceof Row) {
|
|
206
|
+
# innerSelectedObject = ((Row) innerSelectedObject).getMontageAtPosition(mouseClick);
|
|
207
|
+
# }
|
|
208
|
+
# if (innerSelectedObject instanceof Montage) {
|
|
209
|
+
# if (breakOnFirstEncounter) {
|
|
210
|
+
# return innerSelectedObject;
|
|
211
|
+
# } else {
|
|
212
|
+
# foundObjects.add(innerSelectedObject);
|
|
213
|
+
# }
|
|
214
|
+
# }
|
|
215
|
+
# }
|
|
216
|
+
# /* if instance of objects differ then take the compatible one when grouping */
|
|
217
|
+
# if ((object instanceof Figure) && ((objectsAlreadySelected instanceof MyImage2D) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof MyImage2D))) {
|
|
218
|
+
# Object innerSelectedObject = ((Figure) object).getRowAtPosition(mouseClick);
|
|
219
|
+
# if (innerSelectedObject instanceof Row) {
|
|
220
|
+
# innerSelectedObject = ((Row) innerSelectedObject).getMontageAtPosition(mouseClick);
|
|
221
|
+
# }
|
|
222
|
+
# if (innerSelectedObject instanceof Montage) {
|
|
223
|
+
# innerSelectedObject = ((Montage) innerSelectedObject).getMyImage2DAtPosition(mouseClick);
|
|
224
|
+
# }
|
|
225
|
+
# if (innerSelectedObject instanceof MyImage2D) {
|
|
226
|
+
# if (breakOnFirstEncounter) {
|
|
227
|
+
# return innerSelectedObject;
|
|
228
|
+
# } else {
|
|
229
|
+
# foundObjects.add(innerSelectedObject);
|
|
230
|
+
# }
|
|
231
|
+
# }
|
|
232
|
+
# }
|
|
233
|
+
# /* if instance of objects differ then take the compatible one when grouping */
|
|
234
|
+
# if ((object instanceof Row) && ((objectsAlreadySelected instanceof Montage) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof Montage))) {
|
|
235
|
+
# //get the montage at position
|
|
236
|
+
# Object innerSelectedObject = ((Row) object).getMontageAtPosition(mouseClick);
|
|
237
|
+
# if (innerSelectedObject instanceof Montage) {
|
|
238
|
+
# if (breakOnFirstEncounter) {
|
|
239
|
+
# return innerSelectedObject;
|
|
240
|
+
# } else {
|
|
241
|
+
# foundObjects.add(innerSelectedObject);
|
|
242
|
+
# }
|
|
243
|
+
# }
|
|
244
|
+
# }
|
|
245
|
+
# /* if instance of objects differ then take the compatible one when grouping */
|
|
246
|
+
# if ((object instanceof Row) && ((objectsAlreadySelected instanceof MyImage2D) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof MyImage2D))) {
|
|
247
|
+
# Object innerSelectedObject = ((Row) object).getMontageAtPosition(mouseClick);
|
|
248
|
+
# if (innerSelectedObject instanceof Montage) {
|
|
249
|
+
# innerSelectedObject = ((Montage) innerSelectedObject).getMyImage2DAtPosition(mouseClick);
|
|
250
|
+
# }
|
|
251
|
+
# if (innerSelectedObject instanceof MyImage2D) {
|
|
252
|
+
# if (breakOnFirstEncounter) {
|
|
253
|
+
# return innerSelectedObject;
|
|
254
|
+
# } else {
|
|
255
|
+
# foundObjects.add(innerSelectedObject);
|
|
256
|
+
# }
|
|
257
|
+
# }
|
|
258
|
+
# }
|
|
259
|
+
# /* if instance of objects differ then take the compatible one when grouping */
|
|
260
|
+
# if ((object instanceof Montage) && ((objectsAlreadySelected instanceof MyImage2D) || ((objectsAlreadySelected instanceof ArrayList) && ((ArrayList<Object>) objectsAlreadySelected).get(0) instanceof MyImage2D))) {
|
|
261
|
+
# //get the montage at position
|
|
262
|
+
# Object innerSelectedObject = ((Montage) object).getMyImage2DAtPosition(mouseClick);
|
|
263
|
+
# if (innerSelectedObject instanceof MyImage2D) {
|
|
264
|
+
# if (breakOnFirstEncounter) {
|
|
265
|
+
# return innerSelectedObject;
|
|
266
|
+
# } else {
|
|
267
|
+
# foundObjects.add(innerSelectedObject);
|
|
268
|
+
# }
|
|
269
|
+
# }
|
|
270
|
+
# }
|
|
271
|
+
# } else {
|
|
272
|
+
# return object;
|
|
273
|
+
# }
|
|
274
|
+
# }
|
|
275
|
+
# }
|
|
276
|
+
# }
|
|
277
|
+
# if (!foundObjects.isEmpty()) {
|
|
278
|
+
# return foundObjects;
|
|
279
|
+
# }
|
|
280
|
+
# return null;
|
|
281
|
+
# }
|
|
282
|
+
#
|
|
283
|
+
# public static void main(String[] args) {
|
|
284
|
+
# System.exit(0);
|
|
285
|
+
# }
|
|
286
|
+
#
|
|
287
|
+
# }
|
|
File without changes
|