Skip to content
Snippets Groups Projects
Commit de5108ad authored by fsdavid's avatar fsdavid Committed by Xiao Gui
Browse files

Update URL_STATE.md

parent 5de53fa4
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ Interactive Atlas Viewer could be run with already selected state. It is possibl
## URL query parameters in Interactive Atlas Viewer
URL query parameters are variables which are located after URL and separated from the URL with "?" mark. URL query parameter variable contains with variable name and value "variable_name=value" Url query parameters are divided by "&" symbol. it is not possible to use whitespaces in the URL query. In Interactive Atlas Viewer, URL query parameters are used to save or create an application state. There are 6 main parameters which are used to save the application state. They are: navigation, niftiLayers, parcellationSelected, pluginState, regionsSelected and templateSelected.
URL query parameters are variables which are located after URL and separated from the URL with "?" mark. URL query parameter variable contains variable name and value. Url query parameters are divided by "&" symbol. it is not possible to use whitespaces in the URL query. In Interactive Atlas Viewer, URL query parameters are used to save or create an application state. There are 6 main parameters which are used to save the application state. They are: navigation, niftiLayers, parcellationSelected, pluginState, regionsSelected and templateSelected.
Example of already filled URL looks like this:
......@@ -27,19 +27,19 @@ https://dev-next-interactive-viewer.apps-dev.hbp.eu/?templateSelected=MNI+152+IC
### Template Selected - parameter
Template Selected parameter, is used to save or __select the template__ before we run an application using URL. From the given example we can see the parameter:
Template Selected parameter, is used to or __select the template__ with using URL. From the given example we can see the parameter:
```
templateSelected=MNI+152+ICBM+2009c+Nonlinear+Asymmetric
```
In parameter value, whitespaces should be replaced with "+" symbol. So, the selected template name actually is:
In parameter value, whitespaces should be replaced with "+" symbol. So, actually, the selected template name is:
```
MNI 152 ICBM 2009c Nonlinear Asymmetric
```
To select a template from URL we do not need any other parameter. Parcellation Selected and Navigation parameters will be automatically added by default values. So, before the application automatically adds parameters, the URL will look like that:
To select a template from URL it is not required to have any other parameter. "Parcellation Selected" and "Navigation" parameters will be automatically added by default values. So, before the application automatically adds parameters, the URL will look like this:
```
https://dev-next-interactive-viewer.apps-dev.hbp.eu/?templateSelected=MNI+152+ICBM+2009c+Nonlinear+Asymmetric
......@@ -64,13 +64,13 @@ Fibre Bundle Atlas - Long Bundle
Navigation parameter is to determine orientation, position and zoom of 2d and 3d parts of the selected template. It does not depend on selected parcellation, but it depends on the selected template.
Navigation parameter itself includes 5 fields - orientation, perspectiveOrientation, perspectiveZoom, position and zoom. They are sorted appropriate and divided by "__" symbol.
This is the navigation part of the example
This is the navigation parameters part from the example
```
navigation=0_0_0_1__0.11092895269393921_0.8756000399589539_-0.44895267486572266_-0.13950254023075104__2500000__1430285_13076858_4495181__204326.41684726204
```
**orientation** - the field is used to determine an orientation of the 2D part in atlas viewer. The field contains with 4 numbers, divided by "_" symbol. 4 of these numbers should have value "0" and one should have value "1". Value 1 will determine the orientation of the image. In the example orientation is a first element - "0_0_0_1".
**orientation** - the field is used to determine an orientation of the 2D part in atlas viewer. The field contains with 4 numbers, divided by "_" symbol. 3 of these numbers should have value "0" and one should have value "1". Value 1 will determine the orientation of the 2D image. In the example orientation is a first element - "0_0_0_1".
**perspectiveOrientation** - the field is used to determine an orientation of the 3D part in atlas viewer. The field contains with 4 numbers, divided by "_" symbol. In the example perspective orientation is the second element
```
......@@ -84,18 +84,18 @@ navigation=0_0_0_1__0.11092895269393921_0.8756000399589539_-0.44895267486572266_
### Regions Selected - parameter
Every region of selected parcellation has its own integer number as id. To select a region from URL, with templateSelected and parcellationSelected parameters, URL should contain the regionSelected parameter. In this parameter. In the given example, we can see the region parameter part.
Every region of selected parcellation has its own integer number as id. To select the region from URL, with templateSelected and parcellationSelected parameters, URL should contain the regionSelected parameter. In this parameter. In the given example, we can see the region parameter part.
```
regionsSelected=31_51_32
```
in parameter, different regions are divided with "_" symbol. It meant that in the given example, there are 3 selected parameters - 31, 51 and 32.
The region belongs to parcellation, so user can not add regionsSelected without templateSelected and parcellationSelected regions. Navigation parameter will be automatically added by default values.
The region belongs to parcellation, so user can not add regionsSelected without templateSelected and parcellationSelected parameters. Navigation parameter will be automatically added by default values.
### Nifti Layers - parameter
Nifti Layers parameter adds to the application URL when the user selects the nifti layer of selected regions. The value of this parameter is text. Especially, it is a link where the nifti file is located.
Nifti Layers parameter adds to the application URL, when the user selects the nifti layer of selected regions. The value of this parameter is text. Especially, it is a link where the nifti file is located.
Example
```
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment