Version 52.1 by puchades on 2023/07/05 09:25

Hide last authors
puchades 6.1 1 == To set up your working environment: ==
puchades 1.1 2
3 1. [[Register>>url:https://ebrains.eu/register/]] for an EBRAINS account, login, and set up a [[private collab>>url:https://wiki.ebrains.eu/bin/view/Collabs/]].
4 1. Initialise the Bucket by clicking on Bucket in the navigation panel -> Create Bucket.
5 1. Give users Admin, Editor or Viewer rights by clicking** Team** in the navigation panel.
puchades 38.1 6 1. Install WebAlign, WebWarp, LocaliZoom, and Meshview from the EBRAINS Collaboratory App Store (see instructions below)
puchades 1.1 7
8 == How to install Collaboratory Apps ==
9
10 1. To install Collaboratory Apps, click on the + Create button (top right corner).
11 1. Give the page a Title (for example, WebAlign), select the Community App option, and click Create.
12 1. Select the App to install (for example, WebAlign), and click Save and View.
puchades 10.1 13 1. Repeat this for all the relevant Community Apps. You will need, "QUINT Image creator app"; "WebAlign"; "WebWarp"; "LocaliZoom" and "MeshView".
puchades 1.1 14 1. Navigate between the Apps in the navigation panel. File transfer between the Apps is through the Bucket.
15
puchades 8.2 16 == How to prepare your images? ==
puchades 2.1 17
18 **~1. Prepare your images before upload by naming them according this naming convention:**
19
20 The ID should be unique to the particular brain section and in the format sXXX, with XXX representing the section number. The section number should reflect the serial order and spacing of the sections (e.g., s002, s006, s010 for every 4^^th^^ section starting with section 2).
21
puchades 8.2 22 Example: tg2345_MMSH_s001.tif
23
puchades 8.3 24 - Upload the images you want to work with into the bucket of your collab using the Data proxy (press on //"Bucket"//)
25
puchades 8.2 26 **2. Image ingestion**
27
28 Two alternatives are available, the QUINT image creator app, which is automatically creating the necessary files for downstream analyses in your collab. Or, you can use the image service app which is able to create image tiles in different formats. The steps for preparing your files are described bellow:
29
30 === Use the "QUINT image creator" app ===
31
puchades 51.1 32 (% style="color:#e67e22" %)NB! we are still working on this app for the moment. For the enabling viewer links,  make your bucket "public". The collab can still be "private".
33
puchades 23.1 34 **2a. Select images to ingest**
puchades 8.2 35
puchades 19.1 36 Click on your images in order to select them and press the "create brain from selection" button. Choose a name for your serie.
puchades 8.2 37
38 The App will automatically generate the files for you. Monitor the progress under the "processing" tab and on the two dashboards on the left.
39
40 When the ingestion is finished, your serie will appear under the "Prepared Brains" tab.
41
42 Click on the "View Brain" button in order to preview your images.
43
puchades 24.1 44 Now go to the WebAlign app in order to start the registration to atlas.
45
puchades 18.1 46 [[image:Screenshot create_brain app.png]]
47
48
puchades 24.1 49 === Use Image service app (alt.) ===
puchades 8.2 50
puchades 23.1 51 **2b. Start the Image service UI from your webapp**
puchades 8.3 52
puchades 23.1 53 * ** Fill in the requested information:**
puchades 8.3 54
55 - type or paste the URL of the dataset folder containing the images. //Note!// the name of the collab supports only hyphens.
56
57 E.g. https:~/~/data-proxy.ebrains.eu/api/v1/buckets/name-of-my-collab
58
59 - you can filter the data using RegEx expressions. E.g. name_of_the_data_file.*\.jpg$ (for filtering jpeg files only). Or e.g hbp-00173_262_1366_1827.*\.tif$ for tiff files.
60
61 - If your URL is valid, you will see the list of files by pressing "yes". Paste the name of the file you want to select. You can go back to the previous step  by pressing "back"
62
63 - Or use a prefix: E.g. https:~/~/data-proxy.ebrains.eu/api/v1/buckets/name-of-my-collab?prefix=name_of_the_data_folder
64
65 - allow the image service to access your bucket
66
puchades 22.1 67 [[[[image:Skjermbilde 2022-02-08 103443.png||height="199" width="500"]]>>attach:Skjermbilde 2022-02-08 103443.png]]
puchades 8.3 68
69 - Store your results: Choose "create a new collab" where your ingested chunks will be stored in the bucket. This option is preferred in order not to overload the Bucket of your current  collab. Give a name to your Bucket as well as a name for the  collab (bucket slug) (see this illustration for more info)
70
puchades 22.1 71 [[image:create collab.png]]
puchades 8.3 72
73 - Customize your ingestion:
74
75 - give a name to your ingestion in the "description of ingestion" field.
76
puchades 23.1 77 * ** For obtaining chunks in DZI format  (compatible with WebAlign),** choose "2D" and "not stack of Images".
78 * ** Click //"preview"// in order to preview your task**
79 * ** Click //"create task"//  to launch your ingestion**
80 * ** Checking results in the Main UI page**
puchades 8.3 81
82 Press "Task" in the higher right corner of the window.
83
84 When creating the task, a red banner is displayed in the "Create Task" view if something goes wrong for instance.
85
86 Otherwise, you will be redirected to the tasks list where the created task is selected.
87
88 //Note! //A task will be first "Queued" then "Running"; "Stagingout"and ultimately "Successful" or "Failed"
89
90 Refresh your browser in order to check the status of your task.
91
92 When "successful", your chunks have been created.
93
puchades 3.1 94 == **How to use WebAlign** ==
95
puchades 5.1 96 WebAlign is an online tool for spatial registration of histological section images from rodent brains to reference 3D atlases.  Different experimental datasets registered to the same reference atlas allows you to spatially integrate, analyse and navigate these datasets within a standardised coordinate system. The output of WebAlign can be used for analysis in the online QUINT workflow.
97
puchades 8.1 98 Online user manual: [[https:~~/~~/webalign.readthedocs.io/en/latest/>>https://webalign.readthedocs.io/en/latest/]]
99
puchades 3.1 100 The view can be magnified using the 4-arrow "X" symbol in the top-right corner.
101
102 === Opening a sample dataset ===
103
puchades 25.1 104 Demo dataset is loaded using the file: **demo_mouse_data_start.waln**
puchades 3.1 105
puchades 25.1 106 You can see the result of a finished anchoring by choosing the file: **demo_mouse_data.waln**
puchades 3.1 107
108 === Opening a private dataset ===
109
puchades 25.1 110 After you have uploaded your images to the bucket and ingested your images with the QUINT Image creator app, this has generated DZIP chunks. These DZIP files are used by WebAlign.
puchades 3.1 111
112 ~1. Start a new registration by pressing "create new series", the UI will ask you for the name of the collab where DZI chunks are stored. E.g. my-collab-name
113
puchades 27.1 114 2. WebAlign will search for DZIP files and list those found.
puchades 3.1 115
116 3. Enter a name for the descriptor json file which will be created and will contain your anchoring information.
117
118 4. Choose the target 3D reference atlas (WHSv3 for Rat and CCFv3_2017 for Mouse).
119
120 5. Press //"create"//. The main window will now display WebAlign. This step can take some time.
121
puchades 27.1 122 [[image:create series webAlign.png]]
123
puchades 33.1 124 === Opening an EBRAINS dataset ===
puchades 27.1 125
puchades 28.1 126 (% class="wikigeneratedid" %)
puchades 33.1 127 If you would like to work with an EBRAINS dataset, fetch the LocaliZoom link from the KG dataset card ( [[https:~~/~~/search.kg.ebrains.eu>>https://search.kg.ebrains.eu]] )and paste it in the "Import LocaliZoom link" tab.
puchades 28.1 128
129 (% class="wikigeneratedid" %)
130 These series already have been registered to a reference atlas, so this gives you a starting point. The linear registrations obtained with WebAlign can be refined using WebWarp.
131
puchades 3.1 132 === Registration instructions ===
133
134 **Short keys**
135
136 |=To do this|=Press|=Description
137 |Place marker|Space bar|Markers are the anchor points of most transformations (stretch and rotate).
138 |Remove marker|Esc|Removes a previously placed marker.
139 |Horizontal stretch from marker |Left/Right arrow keys|Marker becomes a vertical line, and mouse drag horizontally resizes the cut.
140 |Vertical stretch from marker |Up/Down arrow keys|Marker becomes a horizontal line, and mouse drag vertically resizes the cut
141 |Rotate around marker|PgUp/PgDown|Marker becomes a cross with a surrounding arc, and mouse drag rotates the cut.
142 |In plane adjust |Click + drag|If there is no marker, or the marker is a cross, mouse drag slides the cut in its plane (translation).
143
144 **Start the registration**
145
146 The main window shows the selected image with the atlas overlay.
147
148 -If necessary, change the atlas from coronal view to sagittal or horizontal view (see Navigation panel below)
149
150 ~1. Move the atlas to the approximate position of your section using the yellow dots in the three small windows from the navigation panel.
151
152 2. Start anchoring by placing a marker with the //"Space bar//" , it is initially a cross, and it is the fix point of (most) transformations. The "//Escape key//" can be used to remove the marker.
153
154 3. The main window supports mouse drag in multiple modes in order to stretch the atlas and find the correct position.
155
156 -If there is no marker, or the marker is a cross, mouse drag slides the cut in its plane (translation).
157
158 -Keyboard controls to modify mouse drag (they also place the marker if it's not placed already):
159
160 -Left/Right arrow keys: marker becomes a vertical line, and mouse drag horizontally resizes the cut
161
162 -Up/Down arrow keys: marker becomes a horizontal line, and mouse drag vertically resizes the cut
163
164 -PgUp/PgDown keys: marker becomes a cross with a surrounding arc, and mouse drag rotates the cut. This may look weird because the cut remains being a rectangle, and when  the horizontal and vertical physical resolutions (like pixels/mm) of the image do not match, atlas cut will appear stretching/shrinking with the rotation.
165
166 After each transformation step, marker resets to a cross (translation mode).
167
168 //Note!// The panel can be resized towards the left (common border with Control Panel) and towards the bottom (common border with Filmstrip).
169
170 4. Save the position by pressing //"Store". //The registration is copied to the remaining slides to help with scaling (visible also in the filmstrip)
171
172 5. Go through all sections and refine position and cutting angles.
173
174 //Note!// When jumping from one section to the other, wait a few seconds for the image to load
175
176 //Note!// The "restore" button allows you to go back to the saved position if necessary
177
178 6. Save your results in the descriptor file (json) by pressing "Save to bucket".
179
180 7. When the registration is finished, you can export your descriptor files ( .flat files used for analysis in the QUINT workflow) by pressing //"export overlays".//
181
182 **Control panel:**
183
184 |=Button|=Function
185 |Store |Store the current alignment and propagate to unaligned sections (**Note** this does not save the series to your bucket)
186 |Restore |Reset the current alignment to the last stored position
187 |Clear |Reset the current alignment to the default position
188 |Overlay Slider |Opacity of the atlas overlay, when fully opaque, it becomes an outline
189 |Overlay color |The outline color
190 |Filmstrip slider and color|The above settings, applied to the filmstrip
191 |Save to bucket|Save the series to your bucket (and overwrite the existing file)
192 |Export overlays|Generates a series of .flat files (for Nutil or similar utility), and stores them into a .zip file in the bucket (re-using the name of the series descriptor, e.g. series13.json will export series13.zip)
193
194
195 The right border of the control panel can be dragged horizontally, allowing to resize the panel and the main view
196
197 **Filmstrip:**
198
199 Drag horizontally to see series, click on a section in order to load it into the main view The top border of the filmstrip can be dragged vertically, allowing to resize the panel and the main view
200
201 **Navigation panel:**
202
203 Shows the three standard planes centered around the midpoint of the current alignment visible in the main view.
204
205 The rectangle of the current cut is projected on each standard plane as a yellow line/rectangle/parallelogram. A small yellow circle represents the midpoint of the projection.
206
207 Drag the midpoint around to move the cut.
208
puchades 31.1 209 Drag anywhere else to rotate the cut (inside the given standard plane, around the midpoint).
210
puchades 32.1 211 == **How to use WebWarp** ==
puchades 33.2 212
213 WebWarp is an online tool for nonlinear refinement of spatial registration of histological section images from rodent brains to reference 3D atlases. Webwarp is compatible with registration performed with the WebAlign tool. Different experimental datasets registered to the same reference atlas allows you to spatially integrate, analyse and navigate these datasets within a standardised coordinate system.
214
215 Online user manual: [[https:~~/~~/webwarp.readthedocs.io/en/latest/>>https://webwarp.readthedocs.io/en/latest/]]
216
217 The view can be magnified using the 4-arrow "X" symbol in the top-right corner.
218
219 === Opening a sample dataset ===
220
221 Demo dataset is loaded using the file: **demo_mouse_data.waln**
222
223 You can see the result of a finished anchoring by choosing the file: **demo_mouse_data.wwrp**
224
puchades 34.1 225 === Opening a private dataset ===
226
puchades 39.2 227 (% class="wikigeneratedid" %)
228 All the .waln files located in the Bucket are displayed on the WebWarp main page. Your progress in WebWarp is saved as a .wwrp file.
229
230 === Opening an EBRAINS dataset ===
231
232 If you would like to work with an EBRAINS dataset, open the LocaliZoom link from the KG dataset card ( [[https:~~/~~/search.kg.ebrains.eu>>url:https://search.kg.ebrains.eu]]) and paste it in the "Import LocaliZoom link" tab in WebAlign. Save this series as a .waln file you then can open in WebWarp.
233
234 === Non-linear registration ===
235
puchades 34.1 236 1. Navigate to the WebWarp app in the left-hand panel: all the .waln files located in the Bucket are displayed on the WebWarp main page.
237 1. Select the waln file corresponding to your result from the WebAlign image registration.
238 1. Wait for the images to load: this may take some time.
239
puchades 39.2 240 [[[[image:image1.png||alt="_images/image1.png"]]>>url:https://webwarp.readthedocs.io/en/latest/_images/image1.png]]
puchades 34.1 241
puchades 39.2 242 Your registered images are visible in the main window. The atlas regions with transparency sliders can be toggled using the “Atlas opacity” button. The color of the atlas outline can be modified by clicking on the colored rectangle.
puchades 34.2 243
puchades 40.1 244 4. When going to “Settings”, the button for selecting the marker color will appear as well as “show triangles” which correspond to areas affected by the same    transformation.
puchades 34.2 245
puchades 39.2 246 5. Place a marker on an area you want to stretch using the space bar. Nonlinear distortions are applied by dragging a marker using the mouse.
247
248 6. Press Delete or Backspace to remove a marker under the mouse cursor.
249
puchades 40.1 250 7. Save your results pression the “save” button. “Save as” will allow you to save the adjustments as a new file with a different name.
puchades 39.2 251
puchades 40.1 252 8. When the registration is finished, you can export your descriptor files ( .seg files used for analysis in the QUINT workflow) by pressing “export overlays”. All results are zipped and stored in the bucket. The result file name will be the same as the one chosen to create the registration, e.g. “my-registration.zip”.
puchades 39.2 253
puchades 40.1 254
puchades 39.2 255
256
puchades 34.2 257 == **How to use LocaliZoom** ==
258
puchades 36.1 259 LocaliZoom is a web application for viewing of series of high-resolution 2D images that have been anchored to reference atlases. LocaliZoom allows the viewing and exploring of high-resolution images with superimposed atlas overlays, and the extraction of coordinates of annotated points within those images for viewing in 3D brain atlas space.
puchades 34.2 260
puchades 36.1 261 Online Manual: [[https:~~/~~/localizoom.readthedocs.io/en/latest/>>https://localizoom.readthedocs.io/en/latest/]]
262
263 The view can be magnified using the 4-arrow "X" symbol in the top-right corner.
264
265 === Opening a sample dataset ===
266
267 A demo dataset is loaded using the file: demo_mouse_data_lz
268
puchades 41.2 269 === Opening a private or EBRAINS dataset ===
puchades 36.1 270
puchades 41.2 271 LocaliZoom will open all WebAlign (.waln) or WebWarp (.wwrp) files.
puchades 36.1 272
puchades 41.2 273 === Create annotation points ===
puchades 35.1 274
puchades 42.1 275 To extract a coordinate, the mouse marker must be positioned at the desired location, and press the space bar. A cross will appear in the selected colour (under Settings), representing the location of the extracted coordinate. After all desired points have been marked, the coordinates can be exported either to Excel.
puchades 41.2 276
puchades 42.1 277 Press "delete" in order to remove an annotation.
puchades 41.2 278
puchades 42.1 279 Save your annotations with the "save" or "save as" buttons. The file format is .lz
280
puchades 41.2 281 === Export of coordinate points ===
282
puchades 42.1 283 The created points can be exported to an Excel book by pressing "XLSX export".
puchades 41.2 284
puchades 42.2 285 The saved .lz file can also be visualised in the 3D viewer, MeshView.
puchades 42.1 286
puchades 37.1 287 == **How to use MeshView** ==
puchades 35.1 288
puchades 44.1 289 MeshView is a web application for real-time 3D display of surface mesh data representing structural parcellations from volumetric atlases, and point clouds extracted from datasets.
puchades 35.1 290
puchades 44.1 291 Online manual: [[https:~~/~~/meshview-for-brain-atlases.readthedocs.io/en/latest>>https://meshview-for-brain-atlases.readthedocs.io/en/latest]]
292
293 The view can be magnified using the 4-arrow "X" symbol in the top-right corner.
294
295 === Open point cloud files ===
296
puchades 49.1 297 MeshView can open annotations from LocaliZoom (.lz files). Possibility of a global control of all structures, using the slider will render the meshes transparent or disappear.
puchades 44.1 298
puchades 50.1 299 The individual control allow each structure to be made transparent or disappear. The color for each structure can be changed when clicking on the colored square.
puchades 49.1 300
301 Navigation in the hierarchy is possible by clicking on the region names (grey boxes), this will collapse parts of the region tree.
302
puchades 48.1 303 === Export images ===
304
puchades 47.1 305 The "screenshot" button allows to capture the main window view as a png file.
306
puchades 46.1 307 [[image:image19.png]]
puchades 47.1 308
309