Compare commits
69 Commits
MS-read-pa
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b0b407acf | |||
| bec1f44322 | |||
| e865a60866 | |||
| 12df390145 | |||
| 51110e3d0e | |||
| c7d8dfec61 | |||
| 89bf11d1df | |||
| 88f9b744eb | |||
| 010191e1d4 | |||
| 5d0708dc70 | |||
| 6d565559fd | |||
| ae93773e0a | |||
| bcc8fce3f5 | |||
| 3b061a8c50 | |||
| c4e9bf1dbe | |||
| f942aca114 | |||
| 3f1e6fe747 | |||
| fc0689d177 | |||
| f21122b429 | |||
| 2ad99f87d5 | |||
| e361545507 | |||
| afa64d6351 | |||
| ecd741be9d | |||
| b7fd2202c8 | |||
| c17428eacb | |||
| 8be00a72f6 | |||
| 91e9cdc143 | |||
| 1f6acc4227 | |||
| db492fd5e3 | |||
| f6d5bad5cb | |||
| 72f8aad237 | |||
| 748c4da4b9 | |||
| 75b5323994 | |||
| 7ee0bd3514 | |||
| 00d6f32768 | |||
| 0d420d2912 | |||
| 903307d26c | |||
| faaea012f8 | |||
| dfde213798 | |||
| 8615388009 | |||
| 62cc7921b3 | |||
| 923e0d0eec | |||
| 47fb50d869 | |||
| abacac1104 | |||
| bcb4eb52af | |||
| 2f184749ff | |||
| 690d34abd5 | |||
| c240b3900a | |||
| 8a472ab316 | |||
| a059a68d37 | |||
| 2746cebf81 | |||
| 3365f13ecb | |||
| 1f62cddc7b | |||
| 31f98dc647 | |||
| b318cf34ec | |||
| 3427967e4d | |||
| 25cfe50f44 | |||
| ec1259303b | |||
| a929a097ab | |||
| 9e99b1136f | |||
| 8108ff2187 | |||
| a4083a8cf4 | |||
| 0a88bba53a | |||
| 265be9de63 | |||
| 96ea80aefc | |||
| 22860e351d | |||
| f519685d39 | |||
| b8d26956d9 | |||
| cd9fd03d32 |
@@ -8,7 +8,7 @@ pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- mkdir public
|
||||
- cp -r docs/build/html/* public
|
||||
- cp -r docs/sphinx/build/html/* public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
||||
@@ -5,3 +5,9 @@ This is a collection of plugins and scripts to be used in Fiji for
|
||||
TOMCAT-specific tasks.
|
||||
|
||||
Make sure to add your new script, plugin, or macro to the corresponding folder.
|
||||
|
||||
Documentation on individual plugins and macros:
|
||||
|
||||
* [**Multiscale_Coords:**](docs/markdown/MultiscaleCoordsDocumentation.md) plugin to visually find the motor coordinates for high resolution ROI scans, taking as reference a low resolution overview scan.
|
||||
|
||||
* [**Opt_Scan:**](docs/markdown/OptScanDocumentation.md) plugin to find the optimal high resolution scanning grid for irregular samples, taking as reference a low resolution overview scan.
|
||||
|
||||
BIN
docs/build/doctrees/Multiscale_Coords.doctree
vendored
BIN
docs/build/doctrees/environment.pickle
vendored
BIN
docs/build/doctrees/index.doctree
vendored
@@ -1,90 +0,0 @@
|
||||
.. Multiscale_Coords documentation master file, created by
|
||||
sphinx-quickstart on Thu Jun 29 14:02:29 2017.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
|
||||
**Multiscale_Coords.ijm documentation**
|
||||
=======================================
|
||||
|
||||
**Introduction & Purpose**
|
||||
--------------------------
|
||||
|
||||
In some experiments, low resolution (LowRes) scans are acquired in order to have a global overview of the sample (usually fits in the field of view), and then higher resolution (HighRes) scans are performed in small desired regions of interest (ROI) in order to have a look at finer structures (usually local tomography). Placing the motors into the correct position for the HighRes scan requires tedious, not straightforward and error-prone calculations that need many parameters to be taken into account.
|
||||
|
||||
Multiscale_Coords.ijm is an ImageJ plugin to find the final/relative coordinates for moving the XX, ZZ and Y motors in a visual manner. The ROI size of the HighRes scan is shown according to the user-supplied parameters of LowRes and HighRes scans. The user can move the ROI interactively to the desired position, and the corresponding movements in um are given as the result. Start and end position values for stitched scans are also available.
|
||||
|
||||
*Created by hector.dejea@psi.ch in May 2017 extending and adapting localtomo_coords.txt from bernd.pinzer@psi.ch (August 2011)*
|
||||
|
||||
**Instructions of use**
|
||||
-----------------------
|
||||
|
||||
1. Open your LowRes stack of images with ImageJ.
|
||||
|
||||
2. Initialise the plugin:
|
||||
|
||||
* **Locally**: ImageJ -> Plugins -> Macros -> Run -> Browse script
|
||||
* **Beamline**: ImageJ -> Plugins -> TOMCAT -> Multiscale Coords
|
||||
|
||||
3. A dialog asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:
|
||||
- **LowRes imagePixelSize**: pixel size (um) in your LowRes scan.
|
||||
- **LowRes XX center**: XX motor position in your LowRes scan.
|
||||
- **LowRes ZZ center**: ZZ motor position in your LowRes scan.
|
||||
- **LowRes Y position**: Y motor position in your LowRes scan.
|
||||
- **HighRes FOV X**: field of view in pixels in X (horizontal) of HighRes scan.
|
||||
- **HighRes FOV Y**: field of view in pixels in Y (vertical) of HighRes scan.
|
||||
- **HighRes imagePixelSize**: pixel size (um) in your HighRes scan.
|
||||
- **Camera movement X**: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.
|
||||
- **Camera movement Y**: Following previous explanation, introduce here the camera movement in Y.
|
||||
- **Stitched scan**: check this box if you want to do a stitched scan and not just a single volume. If checked, a new dialog will pop up after pressing OK.
|
||||
- **Overlap in X and Z (pixels)**: amount of overlapping pixels in the X and Z directions. Currently, it's not possible to have a different value for each direction.
|
||||
- **Overlap in Y (pixels)**: amount of overlapping slices in the Y directions.
|
||||
- **Scans in X**: size of the stitched scan grid in the X direction (the plugin assumes X to be vertical direction in reconstructed slices).
|
||||
- **Scans in Z**: size of the stitched scan grid in the Z direction (the plugin assumes Z to be horizontal direction in reconstructed slices).
|
||||
- **Slices in Y**: size in number of slices of the stitched scan.
|
||||
- **Selected Y slice as**: select the viewed slice to be the first (top) or the middle of the scan. It is recommended to use first.
|
||||
|
||||
.. note::
|
||||
* If *LowRes ZZ center, LowRes XX center, LowRes Y position,* and *Camera movements* are left to 0, only the relative movements will be given.
|
||||
* If the value given to *Slices in Y* is smaller than the FOV Y in HighRes, the total FOV will be considered.
|
||||
|
||||
Once OK has been clicked, a circle (no stitched scan) or a rectangle (stitched scan) with the size of the area to be scanned given your inputs will appear in the image.
|
||||
|
||||
.. image:: images/Dialog1.png
|
||||
:height: 8cm
|
||||
.. image:: images/DialogSt.png
|
||||
:height: 8cm
|
||||
|
||||
|
||||
4. Move the ROI to the position in which you would like to perform the high resolution scans and press OK. If you selected stitched scan, the circles corresponding to each of the individual scans will be shown.
|
||||
|
||||
.. note::
|
||||
In case the size of the ROI shown is not adequate for your purposes, press Shift+OK and the stitched scan parameters dialog will pop up again. This applies both when stitched or not stitched scan have been selected in the first instance.
|
||||
|
||||
.. image:: images/single.png
|
||||
:height: 9cm
|
||||
.. image:: images/stitch.png
|
||||
:height: 9cm
|
||||
.. image:: images/stitchfin.png
|
||||
:align: center
|
||||
:height: 9cm
|
||||
|
||||
5. Finally, a dialog with the relative motor movements and absolute motor position values will pop up. In addition, a command line with the corresponding inputs will be generated. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3.
|
||||
|
||||
.. note::
|
||||
Restarting the plugin using the checkbox instead of closing and opening again has the advantage that your last input values will appear as default in the new dialogs.
|
||||
|
||||
.. image:: images/finalsingle.png
|
||||
:height: 8cm
|
||||
:align: center
|
||||
.. image:: images/finalstitch.png
|
||||
:height: 8cm
|
||||
:align: center
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
BIN
docs/build/html/objects.inv
vendored
1
docs/build/html/searchindex.js
vendored
@@ -1 +0,0 @@
|
||||
Search.setIndex({docnames:["FijiInstallationInstructions","Multiscale_Coords","index"],envversion:53,filenames:["FijiInstallationInstructions.rst","Multiscale_Coords.rst","index.rst"],objects:{},objnames:{},objtypes:{},terms:{"51s":0,"case":1,"class":0,"default":1,"export":0,"final":1,"new":[0,1],"return":0,For:0,The:[0,1],_multiscale_coord:0,absolut:1,accord:1,account:[0,1],acquir:1,acquisit:1,adapt:1,add:0,addit:1,adequ:1,advantag:1,after:1,again:1,all:0,also:1,amount:1,ani:1,appear:1,appli:1,area:1,ask:1,assum:1,attribut:0,august:1,avail:[0,1],back:1,beamlin:1,been:1,behavior:0,bernd:1,bin:0,both:1,box:1,bring:1,brows:1,calcul:1,camera:1,can:1,center:1,centering_overlai:0,chang:1,check:1,checkbox:1,circl:1,classpath:0,click:1,close:1,com:0,command:1,consid:1,content:2,coord:1,coordin:1,copi:0,correct:1,correspond:1,creat:[0,1],current:1,decompil:0,dejea:1,desir:1,dialog:1,differ:[0,1],direct:1,directli:1,directori:0,distribut:0,dmp:0,dmp_reader:0,done:0,download:0,due:1,each:1,end:1,endswith:0,error:1,exist:0,experi:1,explain:0,explan:1,extend:1,field:1,file:0,fill:1,find:1,finer:1,first:1,fit:1,folder:0,follow:[0,1],fov:1,from:[0,1],gener:1,getuid:0,gfa:0,git:0,github:0,given:1,global:1,grid:1,group:0,handleextrafiletyp:0,has:[0,1],have:[0,1],hdf5:0,hdf5reader:0,hector:1,here:[0,1],high:1,higher:1,highr:1,horizont:1,http:0,ijm:2,imag:1,imagej:[0,1],imagepixels:1,includ:2,index:2,individu:1,initialis:1,input:1,instal:2,instanc:1,instead:[0,1],instruct:2,interact:1,interest:1,introduc:1,io_:0,jad:0,jar:0,java:0,javac:0,just:1,jython:0,last:1,left:1,like:1,line:[0,1],local:1,localtomo_coord:1,locat:0,look:1,low:1,lowr:1,macro:1,magnif:1,mai:1,mani:1,manner:1,master:0,middl:1,might:1,miss:0,modul:[0,2],motor:1,move:1,movement:1,multiscal:1,multiscale_coord:2,necessari:0,need:[0,1],net:0,now:0,number:1,okai:1,older:0,onc:1,onli:1,open:1,order:1,other:0,overlap:1,overview:1,page:[0,2],paramet:1,path:0,paulscherrerinstitut:0,perform:1,permiss:0,person:0,pinzer:1,pixel:1,place:1,plugin:1,pop:1,posit:1,possibl:1,press:1,previou:1,previous:0,problem:0,process:1,prone:1,psi:[0,1],purpos:0,read:0,realign:1,realpath:0,reason:1,reco_manag:0,recommend:1,recompil:0,reconstruct:1,rectangl:1,region:1,rel:1,relev:0,remov:0,requir:1,resolut:1,restart:1,result:1,roi:1,run:[0,1],sampl:1,scan:1,scratch:0,script:1,search:2,select:1,shade:0,shift:1,should:0,shown:1,singl:1,size:1,slice:1,small:1,smaller:1,some:[0,1],stack:1,start:1,station:1,step:[0,1],stitch:1,straightforward:1,strang:0,structur:1,substitut:0,suppli:1,taken:1,tediou:1,than:1,therefor:0,thi:[0,1],tomcat:1,tomographi:1,top:1,total:1,tree:0,tri:0,tryplugin:0,txt:[0,1],unpack:0,unzip:0,used:0,user:1,using:[0,1],usual:1,valu:1,version:0,vertic:1,view:1,viewer:0,visual:1,volum:1,want:1,when:1,which:1,wish:1,would:1,x02da_copy_permissions_fijiinstal:0,x86_64:0,you:1,your:1,zeromq_view:0,zip:0},titles:["Fiji Installation Instructions including TOMCAT plugins","<strong>Multiscale_Coords.ijm documentation</strong>","Welcome to TOMCAT Fiji documentation!"],titleterms:{"new":[],Using:2,all:[],beamlin:2,document:[1,2],fiji:[0,2],from:[],ijm:1,includ:0,indic:2,instal:0,instruct:[0,1],introduct:1,multiscale_coord:1,plugin:[0,2],purpos:1,relev:[],scratch:[],tabl:2,tomcat:[0,2],use:1,version:[],welcom:2}})
|
||||
80
docs/markdown/MultiscaleCoordsDocumentation.md
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
# Multiscale_Coords.ijm documentation
|
||||
|
||||
## Introduction & Purpose
|
||||
|
||||
Often, low resolution (LowRes) scans are acquired in order to have a global overview of the sample (usually fitting the field of view) and identify regions of interest (ROI). These ROIs are then scanned with higher resolution (HighRes) in order to observer finer structures (usually local tomography). To move the motors into the correct position for the HighRes scan requires tedious, not straightforward and error-prone calculations that need many parameters to be taken into account.
|
||||
|
||||
Multiscale_Coords.ijm is an ImageJ plugin to find the final/relative coordinates for moving the XX, ZZ and Y motors in a visual manner. The ROI size of the HighRes scan is shown according to the user-supplied parameters of LowRes and HighRes scans. The user can move the ROI interactively to the desired position, and the movements in um are given as the result. Start and end position values for stitched scans are also available.
|
||||
|
||||
_Created by hector.dejea@psi.ch in May 2017 extending and adapting localtomo_coords.txt from bernd.pinzer@psi.ch (August 2011)_
|
||||
|
||||
*Reference paper: Dejea, H. et al. Scientific Reports 9, 6996 (2019)*
|
||||
|
||||
## Instructions of use
|
||||
|
||||
*BEFORE STARTING, make sure that the beamline has been optimally prepared. Otherwise, shifts and errors in the motor positions are to be expected.*
|
||||
|
||||
*1.* Open your LowRes stack of images with ImageJ.
|
||||
|
||||
*2.* Initialise the plugin:
|
||||
* Locally: ImageJ -> Plugins -> Macros -> Run -> Browse script.
|
||||
* Beamline: ImageJ -> Plugins -> TOMCAT -> Multiscale Coords.
|
||||
|
||||
*3.* A dialogue asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:
|
||||
* LowRes imagePixelSize: pixel size (um) in your LowRes scan.
|
||||
* LowRes XX center: XX motor position in your LowRes scan.
|
||||
* LowRes ZZ center: ZZ motor position in your LowRes scan.
|
||||
* LowRes Y position: Y motor position in your LowRes scan.
|
||||
* HighRes FOV X: field of view in pixels in X (horizontal) of HighRes scan.
|
||||
* HighRes FOV Y: field of view in pixels in Y (vertical) of HighRes scan.
|
||||
* HighRes imagePixelSize: pixel size (um) in your HighRes scan.
|
||||
* Camera movement X: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.
|
||||
* Camera movement Y: Following previous explanation, introduce here the camera movement in Y.
|
||||
* _*Under development* Stage rotation (degrees): If the starting rotation angle is different from 0, introduce here._
|
||||
|
||||
*NOTE 3.1:* For those using a stitched scan as low resolution reference volume, introduce its Y center in _LowRes Y position_ (i.e. for most cases, take the average between the first and last Y positions of the volumes forming the stitched scan).
|
||||
|
||||
*NOTE 3.2:* For those interested in doing 360 deg HighRes scans, introduce the 360 deg FOV in _HighRes FOV X_.
|
||||
|
||||
<img src="images/MultiscaleCoords/dialogue1.png" width="250" height="300">
|
||||
|
||||
*4.* Then, a dialogue asking for stitched scan parameters will appear. Fill up the corresponding inputs:
|
||||
* Overlap in X and Z (pixels): amount of overlapping pixels in the X and Z directions. The value shown by default is 1/3 of the input _HighRes FOV X_. Currently, it is not possible to have a different value for each direction.
|
||||
* Overlap in Y (pixels): amount of overlapping slices in the Y directions.
|
||||
* Scans in X: size of the stitched scan grid in the X direction (the plugin assumes X to be vertical direction in reconstructed slices).
|
||||
* Scans in Z: size of the stitched scan grid in the Z direction (the plugin assumes Z to be horizontal direction in reconstructed slices).
|
||||
* Number of Slices in Y (in LR): The number calculated by default gives you the amount of slices in LR corresponding to one volume in HR. If you reduce this value you will have one height done in HR, if you increase this value you will end up with a stacked scan. *Example:* I want to acquire in HR an area from LR slice 500 to 1500. Thus, _Number of Slices in Y (in LR) = 1000_.
|
||||
* Selected Y slice as: select the viewed slice to be the first (top) or the middle of the scan. The middle option is valid only for 1 Y block: no matter the value you introduce in _Slices in Y_, a safety "IF" will put it back to default.
|
||||
|
||||
*NOTE 4.1:* Set Scans in X *AND* Scans in Z to 1 in order to have one single scan in the XX/ZZ plane.
|
||||
|
||||
*NOTE 4.2:* If _LowRes ZZ center_, _LowRes XX center_, _LowRes Y position_, and _Camera movements_ are left to 0, only the relative movements will be given. If the value given to _Slices in Y_ is smaller than the _Highres FOV Y_, the total FOV will be considered.
|
||||
|
||||
Once OK has been clicked, a circle (single scan) or a rectangle (stitched scan) with the size of the area to be scanned given your inputs will appear in the image.
|
||||
|
||||
<img src="images/MultiscaleCoords/dialogue2.png" width="350" height="200">
|
||||
|
||||
*5.* Move the ROI to the position in which you would like to perform the high resolution scans and press OK. If you selected stitched scan, the circles corresponding to each of the individual scans will be shown.
|
||||
|
||||
*NOTE 5.1:* In case the size of the ROI shown is not adequate for your purposes, press Shift+OK and the stitched scan parameters dialogue will pop up again.
|
||||
|
||||
<img src="images/MultiscaleCoords/single.png" width="300" height="300">
|
||||
<img src="images/MultiscaleCoords/stitch.png" width="300" height="300">
|
||||
<img src="images/MultiscaleCoords/stitchfin.png" width="300" height="300">
|
||||
|
||||
*6.* Finally, a dialogue with the relative motor movements and absolute motor position values will pop up. In addition, a command line with the corresponding inputs will be generated. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3. If you would like to save the motor positions or Fiji coordinates of the ROI for all volumes in txt files, check the corresponding boxes.
|
||||
|
||||
*NOTE 6.1:* Both by restarting the plugin using the checkbox and byclosing and opening again, your last input values will appear as default in the new dialogs (see _'home/.multiscale_settings.txt'_)
|
||||
|
||||
*NOTE 6.2:* Before launching the high resolution scan, make sure that the given motor positions lead to the amount of scans desired. Sometimes, the calculations will lead to values that make the system scan 1 extra volume in a specific direction. You can check with "-t" in the macro and, if this is the case, change one of the motor positions by 0.1 to make sure you have the correct amount of volumes.
|
||||
|
||||
*NOTE 6.3:* The stitching macro to be used is localised in the beamline git repository: _beamline-scripts/scan/ForLargeSamples_. In this folder, you will find also the multiplescan.sh macro in order to launch several stitching macros at the same time.
|
||||
|
||||
<img src="images/MultiscaleCoords/finalDialog.png" width="450" height="380">
|
||||
|
||||
*7.* If you checked the motor positions txt file box, a new dialog will appear. This dialog asks whether you want to save the volume coordinates in the conventional order (ZZ, XX, Y) or in the optimised order (Y, ZZ, XX). The optimised order will result in faster acquisitions, since the Y motor is the fastest. Once you press OK, you will be allowed to browse to the target directory and to restart the plugin.
|
||||
|
||||
<img src="images/MultiscaleCoords/saveTXToptions.png" width="425" height="150">
|
||||
|
||||
*NOTE 7.1:* In the beamline git repository: _beamline-scripts/scan/ForLargeSamples_ , you will find the _scanAtTXTCoords.py_ macro in order to launch scans with the coordinates saved in the txt file.
|
||||
47
docs/markdown/OptScanDocumentation.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Opt_Scan.ijm documentation
|
||||
|
||||
## Introduction & Purpose
|
||||
|
||||
Opt_Scan.ijm is an ImageJ plugin to find the optimal scanning grid for irregular objects. The plugin generates a .txt file that can be used as input for the beamline macro.
|
||||
|
||||
_Created by hector.dejea@psi.ch in February 2018_
|
||||
|
||||
## Instructions of use
|
||||
|
||||
*1.* Open your LowRes stack of images with ImageJ.
|
||||
|
||||
*2.* Initialise the plugin:
|
||||
* Locally: ImageJ -> Plugins -> Macros -> Run -> Browse script.
|
||||
* Beamline: ImageJ -> Plugins -> TOMCAT -> OptScan.
|
||||
|
||||
*3.* A dialog asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:
|
||||
* LowRes imagePixelSize: pixel size (um) in your LowRes scan.
|
||||
* LowRes XX center: XX motor position in your LowRes scan.
|
||||
* LowRes ZZ center: ZZ motor position in your LowRes scan.
|
||||
* LowRes Y position (B1): Y motor position of your highest (first) LowRes scan.
|
||||
* LowRes FOV Y: field of view in pixels in Y (vertical) of LowRes scan.
|
||||
* HighRes FOV X: field of view in pixels in X (horizontal) of HighRes scan.
|
||||
* HighRes FOV Y: field of view in pixels in Y (vertical) of HighRes scan.
|
||||
* HighRes imagePixelSize: pixel size (um) in your HighRes scan.
|
||||
* Camera movement X: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.
|
||||
* Camera movement Y: Following previous explanation, introduce here the camera movement in Y.
|
||||
* Overlap in X and Z (pixels): amount of overlapping HighRes pixels in the X and Z directions. Currently, it's not possible to have a different value for each direction.
|
||||
* Overlap in Y (pixels): amount of overlapping HighRes slices in the Y directions.
|
||||
* Projection Method: choose between maximum and minimum intensity projection depending if your object is brighter or darker than the background.
|
||||
|
||||
*NOTE 3.1:* For those interested in doing 360 deg HighRes scans, introduce the 360 deg FOV in _HighRes FOV X_.
|
||||
|
||||
<img src="images/OptScan/dialogue1.png" width="250" height="350">
|
||||
|
||||
|
||||
*4.* You will be asked to go to the first (top) and last (bottom) slice of the region that you want to include in your optimal scanning grid.
|
||||
|
||||
*5.* The number of Y layers will be computed and a maximum/minimum intensity projection will be generated for each of them and shown at a time. You should then place a rectangle covering your area of interest in each of the projections and the plugin will compute the necessary XX and ZZ coordinates to cover the selected areas.
|
||||
|
||||
*6.* The computed coordinates will be stored in a .txt file and saved in the desired path and with the desired name. Each line of the file will contain the XX, ZZ and Y coordinates separated by a coma of one of the volumes that need to be acquired. The volumes are ordered from left to right (ZZ), up to down (XX) and top to bottom (Y).
|
||||
|
||||
*7.* Finally, a dialog with a summary of the computation will pop up. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3.
|
||||
|
||||
*NOTE 7.1:* Both by restarting the plugin using the checkbox and byclosing and opening again, your last input values will appear as default in the new dialogs (see _'home/.optscan_settings.txt'_).
|
||||
|
||||
*NOTE 7.2:* In the beamline git repository: _beamline-scripts/scan/ForLargeSamples_ , you will find the _scanAtTXTCoords.py_ macro in order to launch scans with the coordinates saved in the txt file.
|
||||
BIN
docs/markdown/images/MultiscaleCoords/dialogue1.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/markdown/images/MultiscaleCoords/dialogue2.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/markdown/images/MultiscaleCoords/finalDialog.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
docs/markdown/images/MultiscaleCoords/saveTXToptions.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
docs/markdown/images/MultiscaleCoords/single.png
Normal file
|
After Width: | Height: | Size: 998 KiB |
BIN
docs/markdown/images/MultiscaleCoords/stitch.png
Normal file
|
After Width: | Height: | Size: 1006 KiB |
BIN
docs/markdown/images/MultiscaleCoords/stitchfin.png
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
docs/markdown/images/OptScan/dialogue1.png
Normal file
|
After Width: | Height: | Size: 119 KiB |
@@ -1,90 +0,0 @@
|
||||
.. Multiscale_Coords documentation master file, created by
|
||||
sphinx-quickstart on Thu Jun 29 14:02:29 2017.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
|
||||
**Multiscale_Coords.ijm documentation**
|
||||
=======================================
|
||||
|
||||
**Introduction & Purpose**
|
||||
--------------------------
|
||||
|
||||
In some experiments, low resolution (LowRes) scans are acquired in order to have a global overview of the sample (usually fits in the field of view), and then higher resolution (HighRes) scans are performed in small desired regions of interest (ROI) in order to have a look at finer structures (usually local tomography). Placing the motors into the correct position for the HighRes scan requires tedious, not straightforward and error-prone calculations that need many parameters to be taken into account.
|
||||
|
||||
Multiscale_Coords.ijm is an ImageJ plugin to find the final/relative coordinates for moving the XX, ZZ and Y motors in a visual manner. The ROI size of the HighRes scan is shown according to the user-supplied parameters of LowRes and HighRes scans. The user can move the ROI interactively to the desired position, and the corresponding movements in um are given as the result. Start and end position values for stitched scans are also available.
|
||||
|
||||
*Created by hector.dejea@psi.ch in May 2017 extending and adapting localtomo_coords.txt from bernd.pinzer@psi.ch (August 2011)*
|
||||
|
||||
**Instructions of use**
|
||||
-----------------------
|
||||
|
||||
1. Open your LowRes stack of images with ImageJ.
|
||||
|
||||
2. Initialise the plugin:
|
||||
|
||||
* **Locally**: ImageJ -> Plugins -> Macros -> Run -> Browse script
|
||||
* **Beamline**: ImageJ -> Plugins -> TOMCAT -> Multiscale Coords
|
||||
|
||||
3. A dialog asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:
|
||||
- **LowRes imagePixelSize**: pixel size (um) in your LowRes scan.
|
||||
- **LowRes XX center**: XX motor position in your LowRes scan.
|
||||
- **LowRes ZZ center**: ZZ motor position in your LowRes scan.
|
||||
- **LowRes Y position**: Y motor position in your LowRes scan.
|
||||
- **HighRes FOV X**: field of view in pixels in X (horizontal) of HighRes scan.
|
||||
- **HighRes FOV Y**: field of view in pixels in Y (vertical) of HighRes scan.
|
||||
- **HighRes imagePixelSize**: pixel size (um) in your HighRes scan.
|
||||
- **Camera movement X**: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.
|
||||
- **Camera movement Y**: Following previous explanation, introduce here the camera movement in Y.
|
||||
- **Stitched scan**: check this box if you want to do a stitched scan and not just a single volume. If checked, a new dialog will pop up after pressing OK.
|
||||
- **Overlap in X and Z (pixels)**: amount of overlapping pixels in the X and Z directions. Currently, it's not possible to have a different value for each direction.
|
||||
- **Overlap in Y (pixels)**: amount of overlapping slices in the Y directions.
|
||||
- **Scans in X**: size of the stitched scan grid in the X direction (the plugin assumes X to be vertical direction in reconstructed slices).
|
||||
- **Scans in Z**: size of the stitched scan grid in the Z direction (the plugin assumes Z to be horizontal direction in reconstructed slices).
|
||||
- **Slices in Y**: size in number of slices of the stitched scan.
|
||||
- **Selected Y slice as**: select the viewed slice to be the first (top) or the middle of the scan. It is recommended to use first.
|
||||
|
||||
.. note::
|
||||
* If *LowRes ZZ center, LowRes XX center, LowRes Y position,* and *Camera movements* are left to 0, only the relative movements will be given.
|
||||
* If the value given to *Slices in Y* is smaller than the FOV Y in HighRes, the total FOV will be considered.
|
||||
|
||||
Once OK has been clicked, a circle (no stitched scan) or a rectangle (stitched scan) with the size of the area to be scanned given your inputs will appear in the image.
|
||||
|
||||
.. image:: images/Dialog1.png
|
||||
:height: 8cm
|
||||
.. image:: images/DialogSt.png
|
||||
:height: 8cm
|
||||
|
||||
|
||||
4. Move the ROI to the position in which you would like to perform the high resolution scans and press OK. If you selected stitched scan, the circles corresponding to each of the individual scans will be shown.
|
||||
|
||||
.. note::
|
||||
In case the size of the ROI shown is not adequate for your purposes, press Shift+OK and the stitched scan parameters dialog will pop up again. This applies both when stitched or not stitched scan have been selected in the first instance.
|
||||
|
||||
.. image:: images/single.png
|
||||
:height: 9cm
|
||||
.. image:: images/stitch.png
|
||||
:height: 9cm
|
||||
.. image:: images/stitchfin.png
|
||||
:align: center
|
||||
:height: 9cm
|
||||
|
||||
5. Finally, a dialog with the relative motor movements and absolute motor position values will pop up. In addition, a command line with the corresponding inputs will be generated. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3.
|
||||
|
||||
.. note::
|
||||
Restarting the plugin using the checkbox instead of closing and opening again has the advantage that your last input values will appear as default in the new dialogs.
|
||||
|
||||
.. image:: images/finalsingle.png
|
||||
:height: 8cm
|
||||
:align: center
|
||||
.. image:: images/finalstitch.png
|
||||
:height: 8cm
|
||||
:align: center
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 173 KiB |
|
Before Width: | Height: | Size: 205 KiB |
BIN
docs/sphinx/build/doctrees/Multiscale_Coords.doctree
Normal file
BIN
docs/sphinx/build/doctrees/Opt_Scan.doctree
Normal file
BIN
docs/sphinx/build/doctrees/environment.pickle
Normal file
BIN
docs/sphinx/build/doctrees/index.doctree
Normal file
@@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 7461f3895893e57d7c0adad4ef7f44ab
|
||||
config: b082e353bbf65fa7546671c0e09a5b24
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
@@ -2,12 +2,16 @@
|
||||
|
||||
<!doctype html>
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Fiji Installation Instructions including TOMCAT plugins — TOMCAT Fiji Plugins 0.1.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
@@ -31,7 +35,7 @@
|
||||
<script type="text/javascript" src="_static/css3-mediaqueries.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<body role="document">
|
||||
<div class="related" role="navigation" aria-label="related navigation">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
@@ -171,7 +175,7 @@
|
||||
</div>
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2017, TOMCAT team.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.3.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,12 +2,16 @@
|
||||
|
||||
<!doctype html>
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Multiscale_Coords.ijm documentation — TOMCAT Fiji Plugins 0.1.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
@@ -24,14 +28,14 @@
|
||||
<script type="text/javascript" src="_static/bizstyle.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Instructions for the installation of a new Fiji version from scratch with all relevant TOMCAT plugins" href="FijiInstallationInstructions.html" />
|
||||
<link rel="prev" title="Welcome to TOMCAT Fiji Plugins’s documentation!" href="index.html" />
|
||||
<link rel="next" title="Opt_Scan.ijm documentation" href="Opt_Scan.html" />
|
||||
<link rel="prev" title="Fiji Installation Instructions including TOMCAT plugins" href="FijiInstallationInstructions.html" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="_static/css3-mediaqueries.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<body role="document">
|
||||
<div class="related" role="navigation" aria-label="related navigation">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
@@ -39,10 +43,10 @@
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="FijiInstallationInstructions.html" title="Instructions for the installation of a new Fiji version from scratch with all relevant TOMCAT plugins"
|
||||
<a href="Opt_Scan.html" title="Opt_Scan.ijm documentation"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="index.html" title="Welcome to TOMCAT Fiji Plugins’s documentation!"
|
||||
<a href="FijiInstallationInstructions.html" title="Fiji Installation Instructions including TOMCAT plugins"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li class="nav-item nav-item-0"><a href="index.html">TOMCAT Fiji Plugins 0.1.0 documentation</a> »</li>
|
||||
</ul>
|
||||
@@ -59,11 +63,11 @@
|
||||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="index.html"
|
||||
title="previous chapter">Welcome to TOMCAT Fiji Plugins’s documentation!</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="FijiInstallationInstructions.html"
|
||||
title="next chapter">Instructions for the installation of a new Fiji version from scratch with all relevant TOMCAT plugins</a></p>
|
||||
title="previous chapter">Fiji Installation Instructions including TOMCAT plugins</a></p>
|
||||
<h4>Next topic</h4>
|
||||
<p class="topless"><a href="Opt_Scan.html"
|
||||
title="next chapter"><strong>Opt_Scan.ijm documentation</strong></a></p>
|
||||
<div role="note" aria-label="source link">
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
@@ -93,12 +97,14 @@
|
||||
<h1><strong>Multiscale_Coords.ijm documentation</strong><a class="headerlink" href="#multiscale-coords-ijm-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="introduction-purpose">
|
||||
<h2><strong>Introduction & Purpose</strong><a class="headerlink" href="#introduction-purpose" title="Permalink to this headline">¶</a></h2>
|
||||
<p>In some experiments, low resolution (LowRes) scans are acquired in order to have a global overview of the sample (usually fits in the field of view), and then higher resolution (HighRes) scans are performed in small desired regions of interest (ROI) in order to have a look at finer structures (usually local tomography). Placing the motors into the correct position for the HighRes scan requires tedious, not straightforward and error-prone calculations that need many parameters to be taken into account.</p>
|
||||
<p>Multiscale_Coords.ijm is an ImageJ plugin to find the final/relative coordinates for moving the XX, ZZ and Y motors in a visual manner. The ROI size of the HighRes scan is shown according to the user-supplied parameters of LowRes and HighRes scans. The user can move the ROI interactively to the desired position, and the corresponding movements in um are given as the result. Start and end position values for stitched scans are also available.</p>
|
||||
<p>Often, low resolution (LowRes) scans are acquired in order to have a global overview of the sample (usually fitting the field of view) and identify regions of interest (ROI). These ROIs are then scanned with higher resolution (HighRes) in order to observer finer structures (usually local tomography). To move the motors into the correct position for the HighRes scan requires tedious, not straightforward and error-prone calculations that need many parameters to be taken into account.</p>
|
||||
<p>Multiscale_Coords.ijm is an ImageJ plugin to find the final/relative coordinates for moving the XX, ZZ and Y motors in a visual manner. The ROI size of the HighRes scan is shown according to the user-supplied parameters of LowRes and HighRes scans. The user can move the ROI interactively to the desired position, and the movements in um are given as the result. Start and end position values for stitched scans are also available.</p>
|
||||
<p><em>Created by hector.dejea@psi.ch in May 2017 extending and adapting localtomo_coords.txt from bernd.pinzer@psi.ch (August 2011)</em></p>
|
||||
<p><em>Reference paper: Dejea, H. et al. Scientific Reports 9, 6996 (2019)</em></p>
|
||||
</div>
|
||||
<div class="section" id="instructions-of-use">
|
||||
<h2><strong>Instructions of use</strong><a class="headerlink" href="#instructions-of-use" title="Permalink to this headline">¶</a></h2>
|
||||
<p><em>BEFORE STARTING, make sure that the beamline has been optimally prepared. Otherwise, shifts and errors in the motor positions are to be expected.</em></p>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">Open your LowRes stack of images with ImageJ.</p>
|
||||
</li>
|
||||
@@ -122,19 +128,7 @@
|
||||
<li><strong>HighRes imagePixelSize</strong>: pixel size (um) in your HighRes scan.</li>
|
||||
<li><strong>Camera movement X</strong>: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.</li>
|
||||
<li><strong>Camera movement Y</strong>: Following previous explanation, introduce here the camera movement in Y.</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt><strong>Stitched scan</strong>: check this box if you want to do a stitched scan and not just a single volume. If checked, a new dialog will pop up after pressing OK.</dt>
|
||||
<dd><ul class="first last">
|
||||
<li><strong>Overlap in X and Z (pixels)</strong>: amount of overlapping pixels in the X and Z directions. Currently, it’s not possible to have a different value for each direction.</li>
|
||||
<li><strong>Overlap in Y (pixels)</strong>: amount of overlapping slices in the Y directions.</li>
|
||||
<li><strong>Scans in X</strong>: size of the stitched scan grid in the X direction (the plugin assumes X to be vertical direction in reconstructed slices).</li>
|
||||
<li><strong>Scans in Z</strong>: size of the stitched scan grid in the Z direction (the plugin assumes Z to be horizontal direction in reconstructed slices).</li>
|
||||
<li><strong>Slices in Y</strong>: size in number of slices of the stitched scan.</li>
|
||||
<li><strong>Selected Y slice as</strong>: select the viewed slice to be the first (top) or the middle of the scan. It is recommended to use first.</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li><strong>Under development</strong> Stage rotation (degrees): If the starting rotation angle is different from 0, introduce here.</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -143,32 +137,88 @@
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<ul class="last simple">
|
||||
<li>For those using a stitched scan as low resolution reference volume, introduce its Y center in <em>LowRes Y position_</em> (i.e. for most cases, take the average between the first and last Y positions of the volumes forming the stitched scan).</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<ul class="last simple">
|
||||
<li>For those interested in doing 360 deg HighRes scans, introduce the 360 deg FOV in <em>HighRes FOV X</em>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ol class="arabic simple" start="4">
|
||||
<li><dl class="first docutils">
|
||||
<dt>A dialogue asking for stitched scan parameters will appear. Fill up the corresponding inputs:</dt>
|
||||
<dd><ul class="first last">
|
||||
<li><strong>Overlap in X and Z (pixels)</strong>: amount of overlapping pixels in the X and Z directions. The value shown by default is 1/3 of the input <em>HighRes FOV X</em>. Currently, it is not possible to have a different value for each direction.</li>
|
||||
<li><strong>Overlap in Y (pixels)</strong>: amount of overlapping slices in the Y directions.</li>
|
||||
<li><strong>Scans in X</strong>: size of the stitched scan grid in the X direction (the plugin assumes X to be vertical direction in reconstructed slices).</li>
|
||||
<li><strong>Scans in Z</strong>: size of the stitched scan grid in the Z direction (the plugin assumes Z to be horizontal direction in reconstructed slices).</li>
|
||||
<li><strong>Number of Slices in Y (in LR)</strong>: The number calculated by default gives you the amount of slices in LR corresponding to one volume in HR. If you reduce this value you will have one height done in HR, if you increase this value you will end up with a stacked scan. <strong>Example:</strong> I want to acquire in HR an area from LR slice 500 to 1500. Thus, <em>Number of Slices in Y (in LR) = 1000</em>.</li>
|
||||
<li><strong>Selected Y slice as</strong>: select the viewed slice to be the first (top) or the middle of the scan. The middle option is valid only for 1 Y block: no matter the value you introduce in <em>Slices in Y</em>, a safety “IF” will put it back to default.</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<ul class="last simple">
|
||||
<li>Set Scans in X <em>AND</em> Scans in Z to 1 in order to have one single scan in the XX/ZZ plane.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<ul class="last simple">
|
||||
<li>If <em>LowRes ZZ center, LowRes XX center, LowRes Y position,</em> and <em>Camera movements</em> are left to 0, only the relative movements will be given.</li>
|
||||
<li>If the value given to <em>Slices in Y</em> is smaller than the FOV Y in HighRes, the total FOV will be considered.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>Once OK has been clicked, a circle (no stitched scan) or a rectangle (stitched scan) with the size of the area to be scanned given your inputs will appear in the image.</p>
|
||||
<a class="reference internal image-reference" href="_images/Dialog1.png"><img alt="_images/Dialog1.png" src="_images/Dialog1.png" style="height: 8cm;" /></a>
|
||||
<a class="reference internal image-reference" href="_images/DialogSt.png"><img alt="_images/DialogSt.png" src="_images/DialogSt.png" style="height: 8cm;" /></a>
|
||||
<ol class="arabic simple" start="4">
|
||||
<p>Once OK has been clicked, a circle (single scan) or a rectangle (stitched scan) with the size of the area to be scanned given your inputs will appear in the image.</p>
|
||||
<a class="reference internal image-reference" href="_images/dialogue11.png"><img alt="_images/dialogue11.png" src="_images/dialogue11.png" style="height: 8cm;" /></a>
|
||||
<a class="reference internal image-reference" href="_images/dialogue2.png"><img alt="_images/dialogue2.png" src="_images/dialogue2.png" style="height: 8cm;" /></a>
|
||||
<ol class="arabic simple" start="5">
|
||||
<li>Move the ROI to the position in which you would like to perform the high resolution scans and press OK. If you selected stitched scan, the circles corresponding to each of the individual scans will be shown.</li>
|
||||
</ol>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">In case the size of the ROI shown is not adequate for your purposes, press Shift+OK and the stitched scan parameters dialog will pop up again. This applies both when stitched or not stitched scan have been selected in the first instance.</p>
|
||||
<p class="last">In case the size of the ROI shown is not adequate for your purposes, press Shift+OK and the stitched scan parameters dialog will pop up again.</p>
|
||||
</div>
|
||||
<a class="reference internal image-reference" href="_images/single.png"><img alt="_images/single.png" src="_images/single.png" style="height: 9cm;" /></a>
|
||||
<a class="reference internal image-reference" href="_images/stitch.png"><img alt="_images/stitch.png" src="_images/stitch.png" style="height: 9cm;" /></a>
|
||||
<a class="reference internal image-reference" href="_images/stitchfin.png"><img alt="_images/stitchfin.png" class="align-center" src="_images/stitchfin.png" style="height: 9cm;" /></a>
|
||||
<ol class="arabic simple" start="5">
|
||||
<li>Finally, a dialog with the relative motor movements and absolute motor position values will pop up. In addition, a command line with the corresponding inputs will be generated. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3.</li>
|
||||
<a class="reference internal image-reference" href="_images/single.png"><img alt="_images/single.png" src="_images/single.png" style="height: 8cm;" /></a>
|
||||
<a class="reference internal image-reference" href="_images/stitch.png"><img alt="_images/stitch.png" src="_images/stitch.png" style="height: 8cm;" /></a>
|
||||
<a class="reference internal image-reference" href="_images/stitchfin.png"><img alt="_images/stitchfin.png" src="_images/stitchfin.png" style="height: 8cm;" /></a>
|
||||
<ol class="arabic simple" start="6">
|
||||
<li>Finally, a dialog with the relative motor movements and absolute motor position values will pop up. In addition, a command line with the corresponding inputs will be generated. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3. If you would like to save the motor positions or Fiji coordinates of the ROI for all volumes in txt files, check the corresponding boxes.</li>
|
||||
</ol>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">Restarting the plugin using the checkbox instead of closing and opening again has the advantage that your last input values will appear as default in the new dialogs.</p>
|
||||
<ul class="last simple">
|
||||
<li>Both by restarting the plugin using the checkbox and byclosing and opening again, your last input values will appear as default in the new dialogs (see ‘<em><home>/.multiscale_settings.txt’</em>).</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<ul class="last simple">
|
||||
<li>Before launching the high resolution scan, make sure that the given motor positions lead to the amount of scans desired. Sometimes, tiny calculation errors will lead to values that make the system scan 1 extra volume in a specific direction. You can check with “-t” in the macro and, if this is the case, change one of the motor positions by 0.1 to make sure you have the correct amount of volumes.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<ul class="last simple">
|
||||
<li>In the beamline git repository: <em>beamline-scripts/scan/ForLargeSamples</em> , you will find the <em>multiplescan.sh</em> macro in order to launch several stitching macros at the same time.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="reference internal image-reference" href="_images/finalDialog.png"><img alt="_images/finalDialog.png" class="align-center" src="_images/finalDialog.png" style="height: 9cm;" /></a>
|
||||
<ol class="arabic simple" start="7">
|
||||
<li>If you checked the motor positions txt file box, a new dialog will appear. This dialog asks whether you want to save the volume coordinates in the conventional order (ZZ, XX, Y) or in the optimised order (Y, ZZ, XX). The optimised order will result in faster acquisitions, since the Y motor is the fastest. Once you press OK, you will be allowed to browse to the target directory and to restart the plugin.</li>
|
||||
</ol>
|
||||
<a class="reference internal image-reference" href="_images/saveTXToptions.png"><img alt="_images/saveTXToptions.png" class="align-center" src="_images/saveTXToptions.png" style="height: 3cm;" /></a>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<ul class="last simple">
|
||||
<li>In the beamline git repository: <em>beamline-scripts/scan/ForLargeSamples</em> , you will find the <em>scanAtTXTCoords.py</em> macro in order to launch scans with the coordinates saved in the txt file.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="reference internal image-reference" href="_images/finalsingle.png"><img alt="_images/finalsingle.png" class="align-center" src="_images/finalsingle.png" style="height: 8cm;" /></a>
|
||||
<a class="reference internal image-reference" href="_images/finalstitch.png"><img alt="_images/finalstitch.png" class="align-center" src="_images/finalstitch.png" style="height: 8cm;" /></a>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
</div>
|
||||
@@ -187,17 +237,17 @@
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="FijiInstallationInstructions.html" title="Instructions for the installation of a new Fiji version from scratch with all relevant TOMCAT plugins"
|
||||
<a href="Opt_Scan.html" title="Opt_Scan.ijm documentation"
|
||||
>next</a> |</li>
|
||||
<li class="right" >
|
||||
<a href="index.html" title="Welcome to TOMCAT Fiji Plugins’s documentation!"
|
||||
<a href="FijiInstallationInstructions.html" title="Fiji Installation Instructions including TOMCAT plugins"
|
||||
>previous</a> |</li>
|
||||
<li class="nav-item nav-item-0"><a href="index.html">TOMCAT Fiji Plugins 0.1.0 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2017, TOMCAT team.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.3.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
177
docs/sphinx/build/html/Opt_Scan.html
Normal file
@@ -0,0 +1,177 @@
|
||||
|
||||
|
||||
<!doctype html>
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Opt_Scan.ijm documentation — TOMCAT Fiji Plugins 0.1.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.1.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: '.txt'
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/bizstyle.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="prev" title="Multiscale_Coords.ijm documentation" href="Multiscale_Coords.html" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" src="_static/css3-mediaqueries.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body role="document">
|
||||
<div class="related" role="navigation" aria-label="related navigation">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li class="right" >
|
||||
<a href="Multiscale_Coords.html" title="Multiscale_Coords.ijm documentation"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li class="nav-item nav-item-0"><a href="index.html">TOMCAT Fiji Plugins 0.1.0 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h3><a href="index.html">Table Of Contents</a></h3>
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#"><strong>Opt_Scan.ijm documentation</strong></a><ul>
|
||||
<li><a class="reference internal" href="#introduction-purpose"><strong>Introduction & Purpose</strong></a></li>
|
||||
<li><a class="reference internal" href="#instructions-of-use"><strong>Instructions of use</strong></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4>Previous topic</h4>
|
||||
<p class="topless"><a href="Multiscale_Coords.html"
|
||||
title="previous chapter"><strong>Multiscale_Coords.ijm documentation</strong></a></p>
|
||||
<div role="note" aria-label="source link">
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/Opt_Scan.rst.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="searchbox" style="display: none" role="search">
|
||||
<h3>Quick search</h3>
|
||||
<form class="search" action="search.html" method="get">
|
||||
<div><input type="text" name="q" /></div>
|
||||
<div><input type="submit" value="Go" /></div>
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="opt-scan-ijm-documentation">
|
||||
<h1><strong>Opt_Scan.ijm documentation</strong><a class="headerlink" href="#opt-scan-ijm-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="introduction-purpose">
|
||||
<h2><strong>Introduction & Purpose</strong><a class="headerlink" href="#introduction-purpose" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Opt_Scan.ijm is an ImageJ plugin to find the optimal scanning grid for irregular objects. The plugin generates a .txt file that can be used as input for the beamline macro.</p>
|
||||
<p><em>Created by hector.dejea@psi.ch in February 2018</em></p>
|
||||
</div>
|
||||
<div class="section" id="instructions-of-use">
|
||||
<h2><strong>Instructions of use</strong><a class="headerlink" href="#instructions-of-use" title="Permalink to this headline">¶</a></h2>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">Open your LowRes stack of images with ImageJ.</p>
|
||||
</li>
|
||||
<li><p class="first">Initialise the plugin:</p>
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<li><strong>Locally</strong>: ImageJ -> Plugins -> Macros -> Run -> Browse script</li>
|
||||
<li><strong>Beamline</strong>: ImageJ -> Plugins -> TOMCAT -> Multiscale Coords</li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</li>
|
||||
<li><dl class="first docutils">
|
||||
<dt>A dialog asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:</dt>
|
||||
<dd><ul class="first last simple">
|
||||
<li><strong>LowRes imagePixelSize</strong>: pixel size (um) in your LowRes scan.</li>
|
||||
<li><strong>LowRes XX center</strong>: XX motor position in your LowRes scan.</li>
|
||||
<li><strong>LowRes ZZ center</strong>: ZZ motor position in your LowRes scan.</li>
|
||||
<li><strong>LowRes Y position (B1)</strong>: Y motor position of your highest (first) LowRes scan.</li>
|
||||
<li><strong>LowRes FOV Y</strong>: field of view in pixels in Y (vertical) of LowRes scan.</li>
|
||||
<li><strong>HighRes FOV X</strong>: field of view in pixels in X (horizontal) of HighRes scan.</li>
|
||||
<li><strong>HighRes FOV Y</strong>: field of view in pixels in Y (vertical) of HighRes scan.</li>
|
||||
<li><strong>HighRes imagePixelSize</strong>: pixel size (um) in your HighRes scan.</li>
|
||||
<li><strong>Camera movement X</strong>: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.</li>
|
||||
<li><strong>Camera movement Y</strong>: Following previous explanation, introduce here the camera movement in Y.</li>
|
||||
<li><strong>Overlap in X and Z (pixels)</strong>: amount of overlapping HighRes pixels in the X and Z directions. Currently, it’s not possible to have a different value for each direction.</li>
|
||||
<li><strong>Overlap in Y (pixels)</strong>: amount of overlapping HighRes slices in the Y directions.</li>
|
||||
<li><strong>Projection Method</strong>: choose between maximum and minimum intensity projection depending if your object is brighter or darker than the background.</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ol>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">For those interested in doing 360 deg HighRes scans, introduce the 360 deg FOV in <em>HighRes FOV X</em>.</p>
|
||||
</div>
|
||||
<a class="reference internal image-reference" href="_images/dialogue1.png"><img alt="_images/dialogue1.png" src="_images/dialogue1.png" style="height: 8cm;" /></a>
|
||||
<ol class="arabic simple" start="4">
|
||||
<li>You will be asked to go to the first (top) and last (bottom) slice of the region that you want to include in your optimal scanning grid.</li>
|
||||
<li>The number of Y layers will be computed and a maximum/minimum intensity projection will be generated for each of them and shown at a time. You should then place a rectangle covering your area of interest in each of the projections and the plugin will compute the necessary XX and ZZ coordinates to cover the selected areas.</li>
|
||||
<li>The computed coordinates will be stored in a .txt file and saved in the desired path and with the desired name. Each line of the file will contain the XX, ZZ and Y coordinates separated by a coma of one of the volumes that need to be acquired. The volumes are ordered from left to right (ZZ), up to down (XX) and top to bottom (Y).</li>
|
||||
<li>Finally, a dialog with a summary of the computation will pop up. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3.</li>
|
||||
</ol>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">Both by restarting the plugin using the checkbox and byclosing and opening again, your last input values will appear as default in the new dialogs (see <em>‘home/.optscan_settings.txt’</em>).</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">In the beamline git repository: <em>beamline-scripts/scan/ForLargeSamples</em> , you will find the <em>scanAtTXTCoords.py</em> macro in order to launch scans with the coordinates saved in the txt file.</p>
|
||||
</div>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="related" role="navigation" aria-label="related navigation">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li class="right" >
|
||||
<a href="Multiscale_Coords.html" title="Multiscale_Coords.ijm documentation"
|
||||
>previous</a> |</li>
|
||||
<li class="nav-item nav-item-0"><a href="index.html">TOMCAT Fiji Plugins 0.1.0 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2017, TOMCAT team.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
BIN
docs/sphinx/build/html/_images/dialogue1.png
Normal file
|
After Width: | Height: | Size: 119 KiB |
BIN
docs/sphinx/build/html/_images/dialogue11.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/sphinx/build/html/_images/dialogue2.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/sphinx/build/html/_images/finalDialog.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 173 KiB |
|
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 205 KiB |
BIN
docs/sphinx/build/html/_images/saveTXToptions.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
116
docs/sphinx/build/html/_sources/Multiscale_Coords.rst.txt
Normal file
@@ -0,0 +1,116 @@
|
||||
.. Multiscale_Coords documentation master file, created by
|
||||
sphinx-quickstart on Thu Jun 29 14:02:29 2017.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
|
||||
**Multiscale_Coords.ijm documentation**
|
||||
=======================================
|
||||
|
||||
**Introduction & Purpose**
|
||||
--------------------------
|
||||
|
||||
Often, low resolution (LowRes) scans are acquired in order to have a global overview of the sample (usually fitting the field of view) and identify regions of interest (ROI). These ROIs are then scanned with higher resolution (HighRes) in order to observer finer structures (usually local tomography). To move the motors into the correct position for the HighRes scan requires tedious, not straightforward and error-prone calculations that need many parameters to be taken into account.
|
||||
|
||||
Multiscale_Coords.ijm is an ImageJ plugin to find the final/relative coordinates for moving the XX, ZZ and Y motors in a visual manner. The ROI size of the HighRes scan is shown according to the user-supplied parameters of LowRes and HighRes scans. The user can move the ROI interactively to the desired position, and the movements in um are given as the result. Start and end position values for stitched scans are also available.
|
||||
|
||||
*Created by hector.dejea@psi.ch in May 2017 extending and adapting localtomo_coords.txt from bernd.pinzer@psi.ch (August 2011)*
|
||||
|
||||
*Reference paper: Dejea, H. et al. Scientific Reports 9, 6996 (2019)*
|
||||
|
||||
**Instructions of use**
|
||||
-----------------------
|
||||
|
||||
*BEFORE STARTING, make sure that the beamline has been optimally prepared. Otherwise, shifts and errors in the motor positions are to be expected.*
|
||||
|
||||
1. Open your LowRes stack of images with ImageJ.
|
||||
|
||||
2. Initialise the plugin:
|
||||
|
||||
* **Locally**: ImageJ -> Plugins -> Macros -> Run -> Browse script
|
||||
* **Beamline**: ImageJ -> Plugins -> TOMCAT -> Multiscale Coords
|
||||
|
||||
3. A dialog asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:
|
||||
- **LowRes imagePixelSize**: pixel size (um) in your LowRes scan.
|
||||
- **LowRes XX center**: XX motor position in your LowRes scan.
|
||||
- **LowRes ZZ center**: ZZ motor position in your LowRes scan.
|
||||
- **LowRes Y position**: Y motor position in your LowRes scan.
|
||||
- **HighRes FOV X**: field of view in pixels in X (horizontal) of HighRes scan.
|
||||
- **HighRes FOV Y**: field of view in pixels in Y (vertical) of HighRes scan.
|
||||
- **HighRes imagePixelSize**: pixel size (um) in your HighRes scan.
|
||||
- **Camera movement X**: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.
|
||||
- **Camera movement Y**: Following previous explanation, introduce here the camera movement in Y.
|
||||
- **Under development** Stage rotation (degrees): If the starting rotation angle is different from 0, introduce here.
|
||||
|
||||
.. note::
|
||||
* For those using a stitched scan as low resolution reference volume, introduce its Y center in *LowRes Y position_* (i.e. for most cases, take the average between the first and last Y positions of the volumes forming the stitched scan).
|
||||
|
||||
.. note::
|
||||
* For those interested in doing 360 deg HighRes scans, introduce the 360 deg FOV in *HighRes FOV X*.
|
||||
|
||||
4. A dialogue asking for stitched scan parameters will appear. Fill up the corresponding inputs:
|
||||
- **Overlap in X and Z (pixels)**: amount of overlapping pixels in the X and Z directions. The value shown by default is 1/3 of the input *HighRes FOV X*. Currently, it is not possible to have a different value for each direction.
|
||||
- **Overlap in Y (pixels)**: amount of overlapping slices in the Y directions.
|
||||
- **Scans in X**: size of the stitched scan grid in the X direction (the plugin assumes X to be vertical direction in reconstructed slices).
|
||||
- **Scans in Z**: size of the stitched scan grid in the Z direction (the plugin assumes Z to be horizontal direction in reconstructed slices).
|
||||
- **Number of Slices in Y (in LR)**: The number calculated by default gives you the amount of slices in LR corresponding to one volume in HR. If you reduce this value you will have one height done in HR, if you increase this value you will end up with a stacked scan. **Example:** I want to acquire in HR an area from LR slice 500 to 1500. Thus, *Number of Slices in Y (in LR) = 1000*.
|
||||
- **Selected Y slice as**: select the viewed slice to be the first (top) or the middle of the scan. The middle option is valid only for 1 Y block: no matter the value you introduce in *Slices in Y*, a safety "IF" will put it back to default.
|
||||
|
||||
.. note::
|
||||
* Set Scans in X *AND* Scans in Z to 1 in order to have one single scan in the XX/ZZ plane.
|
||||
|
||||
.. note::
|
||||
* If *LowRes ZZ center, LowRes XX center, LowRes Y position,* and *Camera movements* are left to 0, only the relative movements will be given.
|
||||
* If the value given to *Slices in Y* is smaller than the FOV Y in HighRes, the total FOV will be considered.
|
||||
|
||||
Once OK has been clicked, a circle (single scan) or a rectangle (stitched scan) with the size of the area to be scanned given your inputs will appear in the image.
|
||||
|
||||
.. image:: images/MultiscaleCoords/dialogue1.png
|
||||
:height: 8cm
|
||||
.. image:: images/MultiscaleCoords/dialogue2.png
|
||||
:height: 8cm
|
||||
|
||||
|
||||
5. Move the ROI to the position in which you would like to perform the high resolution scans and press OK. If you selected stitched scan, the circles corresponding to each of the individual scans will be shown.
|
||||
|
||||
.. note::
|
||||
In case the size of the ROI shown is not adequate for your purposes, press Shift+OK and the stitched scan parameters dialog will pop up again.
|
||||
|
||||
.. image:: images/MultiscaleCoords/single.png
|
||||
:height: 8cm
|
||||
.. image:: images/MultiscaleCoords/stitch.png
|
||||
:height: 8cm
|
||||
.. image:: images/MultiscaleCoords/stitchfin.png
|
||||
:height: 8cm
|
||||
|
||||
6. Finally, a dialog with the relative motor movements and absolute motor position values will pop up. In addition, a command line with the corresponding inputs will be generated. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3. If you would like to save the motor positions or Fiji coordinates of the ROI for all volumes in txt files, check the corresponding boxes.
|
||||
|
||||
.. note::
|
||||
* Both by restarting the plugin using the checkbox and byclosing and opening again, your last input values will appear as default in the new dialogs (see '*<home>/.multiscale_settings.txt'*).
|
||||
|
||||
.. note::
|
||||
* Before launching the high resolution scan, make sure that the given motor positions lead to the amount of scans desired. Sometimes, tiny calculation errors will lead to values that make the system scan 1 extra volume in a specific direction. You can check with "-t" in the macro and, if this is the case, change one of the motor positions by 0.1 to make sure you have the correct amount of volumes.
|
||||
|
||||
.. note::
|
||||
* In the beamline git repository: *beamline-scripts/scan/ForLargeSamples* , you will find the *multiplescan.sh* macro in order to launch several stitching macros at the same time.
|
||||
|
||||
.. image:: images/MultiscaleCoords/finalDialog.png
|
||||
:height: 9cm
|
||||
:align: center
|
||||
|
||||
7. If you checked the motor positions txt file box, a new dialog will appear. This dialog asks whether you want to save the volume coordinates in the conventional order (ZZ, XX, Y) or in the optimised order (Y, ZZ, XX). The optimised order will result in faster acquisitions, since the Y motor is the fastest. Once you press OK, you will be allowed to browse to the target directory and to restart the plugin.
|
||||
|
||||
.. image:: images/MultiscaleCoords/saveTXToptions.png
|
||||
:height: 3cm
|
||||
:align: center
|
||||
|
||||
.. note::
|
||||
* In the beamline git repository: *beamline-scripts/scan/ForLargeSamples* , you will find the *scanAtTXTCoords.py* macro in order to launch scans with the coordinates saved in the txt file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
71
docs/sphinx/build/html/_sources/Opt_Scan.rst.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
.. OptimialScanGrid documentation master file, created by
|
||||
sphinx-quickstart on Thu Apr 26 16:57:33 2018.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
**Opt_Scan.ijm documentation**
|
||||
=======================================
|
||||
|
||||
**Introduction & Purpose**
|
||||
--------------------------
|
||||
|
||||
Opt_Scan.ijm is an ImageJ plugin to find the optimal scanning grid for irregular objects. The plugin generates a .txt file that can be used as input for the beamline macro.
|
||||
|
||||
*Created by hector.dejea@psi.ch in February 2018*
|
||||
|
||||
**Instructions of use**
|
||||
-----------------------
|
||||
|
||||
1. Open your LowRes stack of images with ImageJ.
|
||||
|
||||
2. Initialise the plugin:
|
||||
|
||||
* **Locally**: ImageJ -> Plugins -> Macros -> Run -> Browse script
|
||||
* **Beamline**: ImageJ -> Plugins -> TOMCAT -> Multiscale Coords
|
||||
|
||||
3. A dialog asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:
|
||||
- **LowRes imagePixelSize**: pixel size (um) in your LowRes scan.
|
||||
- **LowRes XX center**: XX motor position in your LowRes scan.
|
||||
- **LowRes ZZ center**: ZZ motor position in your LowRes scan.
|
||||
- **LowRes Y position (B1)**: Y motor position of your highest (first) LowRes scan.
|
||||
- **LowRes FOV Y**: field of view in pixels in Y (vertical) of LowRes scan.
|
||||
- **HighRes FOV X**: field of view in pixels in X (horizontal) of HighRes scan.
|
||||
- **HighRes FOV Y**: field of view in pixels in Y (vertical) of HighRes scan.
|
||||
- **HighRes imagePixelSize**: pixel size (um) in your HighRes scan.
|
||||
- **Camera movement X**: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.
|
||||
- **Camera movement Y**: Following previous explanation, introduce here the camera movement in Y.
|
||||
- **Overlap in X and Z (pixels)**: amount of overlapping HighRes pixels in the X and Z directions. Currently, it's not possible to have a different value for each direction.
|
||||
- **Overlap in Y (pixels)**: amount of overlapping HighRes slices in the Y directions.
|
||||
- **Projection Method**: choose between maximum and minimum intensity projection depending if your object is brighter or darker than the background.
|
||||
|
||||
.. note::
|
||||
For those interested in doing 360 deg HighRes scans, introduce the 360 deg FOV in *HighRes FOV X*.
|
||||
|
||||
.. image:: images/OptScan/dialogue1.png
|
||||
:height: 8cm
|
||||
|
||||
4. You will be asked to go to the first (top) and last (bottom) slice of the region that you want to include in your optimal scanning grid.
|
||||
|
||||
5. The number of Y layers will be computed and a maximum/minimum intensity projection will be generated for each of them and shown at a time. You should then place a rectangle covering your area of interest in each of the projections and the plugin will compute the necessary XX and ZZ coordinates to cover the selected areas.
|
||||
|
||||
6. The computed coordinates will be stored in a .txt file and saved in the desired path and with the desired name. Each line of the file will contain the XX, ZZ and Y coordinates separated by a coma of one of the volumes that need to be acquired. The volumes are ordered from left to right (ZZ), up to down (XX) and top to bottom (Y).
|
||||
|
||||
7. Finally, a dialog with a summary of the computation will pop up. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3.
|
||||
|
||||
.. note::
|
||||
Both by restarting the plugin using the checkbox and byclosing and opening again, your last input values will appear as default in the new dialogs (see *'home/.optscan_settings.txt'*).
|
||||
|
||||
.. note::
|
||||
In the beamline git repository: *beamline-scripts/scan/ForLargeSamples* , you will find the *scanAtTXTCoords.py* macro in order to launch scans with the coordinates saved in the txt file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
@@ -23,6 +23,7 @@ TOMCAT plugins
|
||||
:maxdepth: 1
|
||||
|
||||
Multiscale_Coords.rst
|
||||
Opt_Scan.rst
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
|
Before Width: | Height: | Size: 78 B After Width: | Height: | Size: 78 B |
@@ -398,13 +398,6 @@ table.field-list td, table.field-list th {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.field-name {
|
||||
-moz-hyphens: manual;
|
||||
-ms-hyphens: manual;
|
||||
-webkit-hyphens: manual;
|
||||
hyphens: manual;
|
||||
}
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
ol.arabic {
|
||||
|
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 756 B |
|
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 641 B |
|
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 202 B |
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 203 B |
@@ -3,12 +3,16 @@
|
||||
|
||||
<!doctype html>
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — TOMCAT Fiji Plugins 0.1.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
@@ -30,7 +34,7 @@
|
||||
<script type="text/javascript" src="_static/css3-mediaqueries.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<body role="document">
|
||||
<div class="related" role="navigation" aria-label="related navigation">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
@@ -87,7 +91,7 @@
|
||||
</div>
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2017, TOMCAT team.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.3.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,12 +2,16 @@
|
||||
|
||||
<!doctype html>
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Welcome to TOMCAT Fiji documentation! — TOMCAT Fiji Plugins 0.1.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
@@ -30,7 +34,7 @@
|
||||
<script type="text/javascript" src="_static/css3-mediaqueries.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<body role="document">
|
||||
<div class="related" role="navigation" aria-label="related navigation">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
@@ -99,6 +103,7 @@
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Multiscale_Coords.html"><strong>Multiscale_Coords.ijm documentation</strong></a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Opt_Scan.html"><strong>Opt_Scan.ijm documentation</strong></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,7 +137,7 @@
|
||||
</div>
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2017, TOMCAT team.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.3.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
docs/sphinx/build/html/objects.inv
Normal file
@@ -2,12 +2,16 @@
|
||||
|
||||
<!doctype html>
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — TOMCAT Fiji Plugins 0.1.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
@@ -37,7 +41,7 @@
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body role="document">
|
||||
<div class="related" role="navigation" aria-label="related navigation">
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
@@ -97,7 +101,7 @@
|
||||
</div>
|
||||
<div class="footer" role="contentinfo">
|
||||
© Copyright 2017, TOMCAT team.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.3.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
docs/sphinx/build/html/searchindex.js
Normal file
@@ -0,0 +1 @@
|
||||
Search.setIndex({docnames:["FijiInstallationInstructions","Multiscale_Coords","Opt_Scan","index"],envversion:51,filenames:["FijiInstallationInstructions.rst","Multiscale_Coords.rst","Opt_Scan.rst","index.rst"],objects:{},objnames:{},objtypes:{},terms:{"51s":0,"case":1,"class":0,"default":[1,2],"export":0,"final":[1,2],"new":[0,1,2],"return":0,AND:1,For:[0,1,2],The:[0,1,2],These:1,_beamlin:[],_highr:[],_multiscale_coord:0,_scanattxtcoord:[],absolut:1,accord:1,account:[0,1],acquir:[1,2],acquisit:[1,2],adapt:1,add:0,addit:1,adequ:1,again:[1,2],all:[0,1],allow:1,also:1,amount:[1,2],angl:1,ani:[1,2],appear:[1,2],area:[1,2],ask:[1,2],assum:1,attribut:0,august:1,avail:[0,1],averag:1,back:[1,2],background:2,beamlin:[1,2],been:1,befor:1,behavior:0,bernd:1,between:[1,2],bin:0,binari:[],block:1,both:[1,2],bottom:2,box:[1,2],brighter:2,bring:[1,2],brows:[1,2],byclos:[1,2],calcul:1,camera:[1,2],can:[1,2],center:[1,2],centering_overlai:0,chang:[1,2],check:[1,2],checkbox:[1,2],choos:2,circl:1,classpath:0,click:1,com:0,coma:2,command:1,comput:2,consid:1,contain:2,content:3,convent:1,coord:[1,2],coordin:[1,2],copi:0,correct:1,correspond:[1,2],cover:2,creat:[0,1,2],current:[1,2],darker:2,decompil:0,deg:[1,2],degre:1,dejea:[1,2],depend:2,desir:[1,2],develop:1,dialog:[1,2],dialogu:1,differ:[0,1,2],direct:[1,2],directli:[1,2],directori:[0,1],distribut:0,dmp:0,dmp_reader:0,doing:[1,2],done:[0,1],down:2,download:0,due:[1,2],each:[1,2],end:[1,2],endswith:0,error:1,exampl:1,exist:0,expect:1,explain:0,explan:[1,2],extend:1,extra:1,faster:1,fastest:1,februari:2,field:[1,2],fiji:1,file:[0,1,2],fill:[1,2],find:[1,2],finer:1,first:[1,2],fit:1,folder:0,follow:[0,1,2],forlargesampl:[1,2],forlargesamples_:[],form:1,fov:[1,2],from:[0,1,2],gener:[1,2],getuid:0,gfa:0,git:[0,1,2],github:0,give:1,given:1,global:1,grid:[1,2],group:0,handleextrafiletyp:0,has:[0,1],have:[0,1,2],hdf5:0,hdf5reader:0,hector:[1,2],height:1,here:[0,1,2],high:1,higher:1,highest:2,highr:[1,2],home:[1,2],horizont:[1,2],http:0,identifi:1,ijm:3,imag:[1,2],imagej:[0,1,2],imagepixels:[1,2],includ:[2,3],increas:1,index:3,individu:1,initialis:[1,2],input:[1,2],instal:3,instead:0,instruct:3,intens:2,interact:1,interest:[1,2],introduc:[1,2],io_:0,irregular:2,its:1,jad:0,jar:0,java:0,javac:0,jython:0,last:[1,2],launch:[1,2],layer:2,lead:1,left:[1,2],like:1,line:[0,1,2],local:[1,2],localtomo_coord:1,locat:0,low:1,lowr:[1,2],macro:[1,2],magnif:[1,2],mai:1,make:1,mani:1,manner:1,master:0,matter:1,maximum:2,method:2,middl:1,might:[1,2],minimum:2,miss:0,modul:[0,3],most:1,motor:[1,2],move:1,movement:[1,2],multiplescan:1,multiscal:[1,2],multiscale_coord:3,multiscale_set:1,name:2,necessari:[0,2],need:[0,1,2],net:0,now:0,number:[1,2],object:2,observ:1,often:1,okai:[1,2],older:0,onc:1,one:[1,2],onli:1,open:[1,2],opt_scan:3,optim:[1,2],optimis:1,option:1,optscan_set:2,order:[1,2],other:0,otherwis:1,overlap:[1,2],overview:1,page:[0,3],paper:1,paramet:[1,2],path:[0,2],paulscherrerinstitut:0,perform:1,permiss:0,person:0,pinzer:1,pixel:[1,2],place:2,plane:1,plugin:[1,2],pop:[1,2],posit:[1,2],position_:1,possibl:[1,2],prepar:1,press:[1,2],previou:[1,2],previous:0,problem:0,process:[1,2],project:2,prone:1,psi:[0,1,2],purpos:0,put:1,py_:[],read:0,realign:[1,2],realpath:0,reason:[1,2],reco_manag:0,recompil:0,reconstruct:1,rectangl:[1,2],reduc:1,refer:1,region:[1,2],rel:1,relev:0,remov:0,report:1,repositori:[1,2],requir:1,resolut:1,restart:[1,2],result:1,right:2,roi:1,rotat:1,run:[0,1,2],safeti:1,same:1,sampl:1,save:[1,2],scan:[1,2],scanattxtcoord:[1,2],scientif:1,scratch:0,script:[1,2],search:3,see:[1,2],select:[1,2],separ:2,set:1,sever:1,shade:0,shift:1,should:[0,2],shown:[1,2],sinc:1,singl:1,size:[1,2],slice:[1,2],smaller:1,some:0,sometim:1,specif:1,stack:[1,2],stage:1,start:1,station:[1,2],step:[0,1,2],stitch:1,store:2,straightforward:1,strang:0,structur:1,substitut:0,summari:2,suppli:1,sure:1,system:1,take:1,taken:1,target:1,tediou:1,than:[1,2],them:2,therefor:0,thi:[0,1],those:[1,2],thu:1,time:[1,2],tini:1,tomcat:[1,2],tomographi:1,top:[1,2],total:1,tree:0,tri:0,tryplugin:0,txt:[0,1,2],under:1,unpack:0,unzip:0,used:[0,2],user:1,using:[0,1,2],usual:1,valid:1,valu:[1,2],version:0,vertic:[1,2],view:[1,2],viewer:0,visual:1,volum:[1,2],want:[1,2],whether:1,which:[1,2],wish:[1,2],would:1,x02da_copy_permissions_fijiinstal:0,x86_64:0,you:[1,2],your:[1,2],zeromq_view:0,zip:0},titles:["Fiji Installation Instructions including TOMCAT plugins","<strong>Multiscale_Coords.ijm documentation</strong>","<strong>Opt_Scan.ijm documentation</strong>","Welcome to TOMCAT Fiji documentation!"],titleterms:{Using:3,beamlin:3,document:[1,2,3],fiji:[0,3],ijm:[1,2],includ:0,indic:3,instal:0,instruct:[0,1,2],introduct:[1,2],multiscale_coord:1,opt_scan:2,plugin:[0,3],purpos:[1,2],tabl:3,tomcat:[0,3],use:[1,2],welcom:3}})
|
||||
116
docs/sphinx/source/Multiscale_Coords.rst
Normal file
@@ -0,0 +1,116 @@
|
||||
.. Multiscale_Coords documentation master file, created by
|
||||
sphinx-quickstart on Thu Jun 29 14:02:29 2017.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
|
||||
**Multiscale_Coords.ijm documentation**
|
||||
=======================================
|
||||
|
||||
**Introduction & Purpose**
|
||||
--------------------------
|
||||
|
||||
Often, low resolution (LowRes) scans are acquired in order to have a global overview of the sample (usually fitting the field of view) and identify regions of interest (ROI). These ROIs are then scanned with higher resolution (HighRes) in order to observer finer structures (usually local tomography). To move the motors into the correct position for the HighRes scan requires tedious, not straightforward and error-prone calculations that need many parameters to be taken into account.
|
||||
|
||||
Multiscale_Coords.ijm is an ImageJ plugin to find the final/relative coordinates for moving the XX, ZZ and Y motors in a visual manner. The ROI size of the HighRes scan is shown according to the user-supplied parameters of LowRes and HighRes scans. The user can move the ROI interactively to the desired position, and the movements in um are given as the result. Start and end position values for stitched scans are also available.
|
||||
|
||||
*Created by hector.dejea@psi.ch in May 2017 extending and adapting localtomo_coords.txt from bernd.pinzer@psi.ch (August 2011)*
|
||||
|
||||
*Reference paper: Dejea, H. et al. Scientific Reports 9, 6996 (2019)*
|
||||
|
||||
**Instructions of use**
|
||||
-----------------------
|
||||
|
||||
*BEFORE STARTING, make sure that the beamline has been optimally prepared. Otherwise, shifts and errors in the motor positions are to be expected.*
|
||||
|
||||
1. Open your LowRes stack of images with ImageJ.
|
||||
|
||||
2. Initialise the plugin:
|
||||
|
||||
* **Locally**: ImageJ -> Plugins -> Macros -> Run -> Browse script
|
||||
* **Beamline**: ImageJ -> Plugins -> TOMCAT -> Multiscale Coords
|
||||
|
||||
3. A dialog asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:
|
||||
- **LowRes imagePixelSize**: pixel size (um) in your LowRes scan.
|
||||
- **LowRes XX center**: XX motor position in your LowRes scan.
|
||||
- **LowRes ZZ center**: ZZ motor position in your LowRes scan.
|
||||
- **LowRes Y position**: Y motor position in your LowRes scan.
|
||||
- **HighRes FOV X**: field of view in pixels in X (horizontal) of HighRes scan.
|
||||
- **HighRes FOV Y**: field of view in pixels in Y (vertical) of HighRes scan.
|
||||
- **HighRes imagePixelSize**: pixel size (um) in your HighRes scan.
|
||||
- **Camera movement X**: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.
|
||||
- **Camera movement Y**: Following previous explanation, introduce here the camera movement in Y.
|
||||
- **Under development** Stage rotation (degrees): If the starting rotation angle is different from 0, introduce here.
|
||||
|
||||
.. note::
|
||||
* For those using a stitched scan as low resolution reference volume, introduce its Y center in *LowRes Y position_* (i.e. for most cases, take the average between the first and last Y positions of the volumes forming the stitched scan).
|
||||
|
||||
.. note::
|
||||
* For those interested in doing 360 deg HighRes scans, introduce the 360 deg FOV in *HighRes FOV X*.
|
||||
|
||||
4. A dialogue asking for stitched scan parameters will appear. Fill up the corresponding inputs:
|
||||
- **Overlap in X and Z (pixels)**: amount of overlapping pixels in the X and Z directions. The value shown by default is 1/3 of the input *HighRes FOV X*. Currently, it is not possible to have a different value for each direction.
|
||||
- **Overlap in Y (pixels)**: amount of overlapping slices in the Y directions.
|
||||
- **Scans in X**: size of the stitched scan grid in the X direction (the plugin assumes X to be vertical direction in reconstructed slices).
|
||||
- **Scans in Z**: size of the stitched scan grid in the Z direction (the plugin assumes Z to be horizontal direction in reconstructed slices).
|
||||
- **Number of Slices in Y (in LR)**: The number calculated by default gives you the amount of slices in LR corresponding to one volume in HR. If you reduce this value you will have one height done in HR, if you increase this value you will end up with a stacked scan. **Example:** I want to acquire in HR an area from LR slice 500 to 1500. Thus, *Number of Slices in Y (in LR) = 1000*.
|
||||
- **Selected Y slice as**: select the viewed slice to be the first (top) or the middle of the scan. The middle option is valid only for 1 Y block: no matter the value you introduce in *Slices in Y*, a safety "IF" will put it back to default.
|
||||
|
||||
.. note::
|
||||
* Set Scans in X *AND* Scans in Z to 1 in order to have one single scan in the XX/ZZ plane.
|
||||
|
||||
.. note::
|
||||
* If *LowRes ZZ center, LowRes XX center, LowRes Y position,* and *Camera movements* are left to 0, only the relative movements will be given.
|
||||
* If the value given to *Slices in Y* is smaller than the FOV Y in HighRes, the total FOV will be considered.
|
||||
|
||||
Once OK has been clicked, a circle (single scan) or a rectangle (stitched scan) with the size of the area to be scanned given your inputs will appear in the image.
|
||||
|
||||
.. image:: images/MultiscaleCoords/dialogue1.png
|
||||
:height: 8cm
|
||||
.. image:: images/MultiscaleCoords/dialogue2.png
|
||||
:height: 8cm
|
||||
|
||||
|
||||
5. Move the ROI to the position in which you would like to perform the high resolution scans and press OK. If you selected stitched scan, the circles corresponding to each of the individual scans will be shown.
|
||||
|
||||
.. note::
|
||||
In case the size of the ROI shown is not adequate for your purposes, press Shift+OK and the stitched scan parameters dialog will pop up again.
|
||||
|
||||
.. image:: images/MultiscaleCoords/single.png
|
||||
:height: 8cm
|
||||
.. image:: images/MultiscaleCoords/stitch.png
|
||||
:height: 8cm
|
||||
.. image:: images/MultiscaleCoords/stitchfin.png
|
||||
:height: 8cm
|
||||
|
||||
6. Finally, a dialog with the relative motor movements and absolute motor position values will pop up. In addition, a command line with the corresponding inputs will be generated. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3. If you would like to save the motor positions or Fiji coordinates of the ROI for all volumes in txt files, check the corresponding boxes.
|
||||
|
||||
.. note::
|
||||
* Both by restarting the plugin using the checkbox and byclosing and opening again, your last input values will appear as default in the new dialogs (see '*<home>/.multiscale_settings.txt'*).
|
||||
|
||||
.. note::
|
||||
* Before launching the high resolution scan, make sure that the given motor positions lead to the amount of scans desired. Sometimes, tiny calculation errors will lead to values that make the system scan 1 extra volume in a specific direction. You can check with "-t" in the macro and, if this is the case, change one of the motor positions by 0.1 to make sure you have the correct amount of volumes.
|
||||
|
||||
.. note::
|
||||
* In the beamline git repository: *beamline-scripts/scan/ForLargeSamples* , you will find the *multiplescan.sh* macro in order to launch several stitching macros at the same time.
|
||||
|
||||
.. image:: images/MultiscaleCoords/finalDialog.png
|
||||
:height: 9cm
|
||||
:align: center
|
||||
|
||||
7. If you checked the motor positions txt file box, a new dialog will appear. This dialog asks whether you want to save the volume coordinates in the conventional order (ZZ, XX, Y) or in the optimised order (Y, ZZ, XX). The optimised order will result in faster acquisitions, since the Y motor is the fastest. Once you press OK, you will be allowed to browse to the target directory and to restart the plugin.
|
||||
|
||||
.. image:: images/MultiscaleCoords/saveTXToptions.png
|
||||
:height: 3cm
|
||||
:align: center
|
||||
|
||||
.. note::
|
||||
* In the beamline git repository: *beamline-scripts/scan/ForLargeSamples* , you will find the *scanAtTXTCoords.py* macro in order to launch scans with the coordinates saved in the txt file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
71
docs/sphinx/source/Opt_Scan.rst
Normal file
@@ -0,0 +1,71 @@
|
||||
.. OptimialScanGrid documentation master file, created by
|
||||
sphinx-quickstart on Thu Apr 26 16:57:33 2018.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
**Opt_Scan.ijm documentation**
|
||||
=======================================
|
||||
|
||||
**Introduction & Purpose**
|
||||
--------------------------
|
||||
|
||||
Opt_Scan.ijm is an ImageJ plugin to find the optimal scanning grid for irregular objects. The plugin generates a .txt file that can be used as input for the beamline macro.
|
||||
|
||||
*Created by hector.dejea@psi.ch in February 2018*
|
||||
|
||||
**Instructions of use**
|
||||
-----------------------
|
||||
|
||||
1. Open your LowRes stack of images with ImageJ.
|
||||
|
||||
2. Initialise the plugin:
|
||||
|
||||
* **Locally**: ImageJ -> Plugins -> Macros -> Run -> Browse script
|
||||
* **Beamline**: ImageJ -> Plugins -> TOMCAT -> Multiscale Coords
|
||||
|
||||
3. A dialog asking for LowRes and HighRes acquisition parameters will appear. Fill up with the corresponding inputs:
|
||||
- **LowRes imagePixelSize**: pixel size (um) in your LowRes scan.
|
||||
- **LowRes XX center**: XX motor position in your LowRes scan.
|
||||
- **LowRes ZZ center**: ZZ motor position in your LowRes scan.
|
||||
- **LowRes Y position (B1)**: Y motor position of your highest (first) LowRes scan.
|
||||
- **LowRes FOV Y**: field of view in pixels in Y (vertical) of LowRes scan.
|
||||
- **HighRes FOV X**: field of view in pixels in X (horizontal) of HighRes scan.
|
||||
- **HighRes FOV Y**: field of view in pixels in Y (vertical) of HighRes scan.
|
||||
- **HighRes imagePixelSize**: pixel size (um) in your HighRes scan.
|
||||
- **Camera movement X**: due to the use of both end stations or the change of magnification, camera realignment might be needed. Introduce here the camera movement in X.
|
||||
- **Camera movement Y**: Following previous explanation, introduce here the camera movement in Y.
|
||||
- **Overlap in X and Z (pixels)**: amount of overlapping HighRes pixels in the X and Z directions. Currently, it's not possible to have a different value for each direction.
|
||||
- **Overlap in Y (pixels)**: amount of overlapping HighRes slices in the Y directions.
|
||||
- **Projection Method**: choose between maximum and minimum intensity projection depending if your object is brighter or darker than the background.
|
||||
|
||||
.. note::
|
||||
For those interested in doing 360 deg HighRes scans, introduce the 360 deg FOV in *HighRes FOV X*.
|
||||
|
||||
.. image:: images/OptScan/dialogue1.png
|
||||
:height: 8cm
|
||||
|
||||
4. You will be asked to go to the first (top) and last (bottom) slice of the region that you want to include in your optimal scanning grid.
|
||||
|
||||
5. The number of Y layers will be computed and a maximum/minimum intensity projection will be generated for each of them and shown at a time. You should then place a rectangle covering your area of interest in each of the projections and the plugin will compute the necessary XX and ZZ coordinates to cover the selected areas.
|
||||
|
||||
6. The computed coordinates will be stored in a .txt file and saved in the desired path and with the desired name. Each line of the file will contain the XX, ZZ and Y coordinates separated by a coma of one of the volumes that need to be acquired. The volumes are ordered from left to right (ZZ), up to down (XX) and top to bottom (Y).
|
||||
|
||||
7. Finally, a dialog with a summary of the computation will pop up. If, for any reason, you wish to restart the process, check the box and press okay, which will bring you directly back to step 3.
|
||||
|
||||
.. note::
|
||||
Both by restarting the plugin using the checkbox and byclosing and opening again, your last input values will appear as default in the new dialogs (see *'home/.optscan_settings.txt'*).
|
||||
|
||||
.. note::
|
||||
In the beamline git repository: *beamline-scripts/scan/ForLargeSamples* , you will find the *scanAtTXTCoords.py* macro in order to launch scans with the coordinates saved in the txt file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
BIN
docs/sphinx/source/images/MultiscaleCoords/dialogue1.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/sphinx/source/images/MultiscaleCoords/dialogue2.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/sphinx/source/images/MultiscaleCoords/finalDialog.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
docs/sphinx/source/images/MultiscaleCoords/saveTXToptions.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
BIN
docs/sphinx/source/images/OptScan/dialogue1.png
Normal file
|
After Width: | Height: | Size: 119 KiB |
@@ -23,6 +23,7 @@ TOMCAT plugins
|
||||
:maxdepth: 1
|
||||
|
||||
Multiscale_Coords.rst
|
||||
Opt_Scan.rst
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
10
plugins/Centering_overlay.ijm
Executable file
@@ -0,0 +1,10 @@
|
||||
// draw a crosshair in the center of the image
|
||||
h = getHeight();
|
||||
w = getWidth();
|
||||
setColor("yellow");
|
||||
Overlay.remove;
|
||||
Overlay.drawLine(w/2.0, 0, w/2.0, h);
|
||||
Overlay.add;
|
||||
Overlay.drawLine(0, h/2.0, w, h/2.0);
|
||||
Overlay.add;
|
||||
Overlay.show;
|
||||
@@ -4,7 +4,7 @@
|
||||
///////// MULTISCALE TOMOGRAPHY PLUGIN /////////
|
||||
///////// /////////
|
||||
///////// Created by Hector Dejea, hector.dejea@psi.ch /////////
|
||||
///////// October, 2019 /////////
|
||||
///////// May, 2017 /////////
|
||||
///////// /////////
|
||||
///////// Reference paper: /////////
|
||||
///////// Dejea, H. et al. Scientific Reports 9, 6996 (2019) /////////
|
||||
@@ -28,7 +28,9 @@ The ROI size of the HighRes scan is shown according to the user-
|
||||
supplied parameters of LowRes and HighRes scans. The user can move
|
||||
the ROI interactively to the desired position, and the movements in
|
||||
um are given as the result. Start and end position values for stitched
|
||||
scans are also available. */
|
||||
scans are also available.
|
||||
|
||||
Last modified: 10/10/2019*/
|
||||
|
||||
//Check if there is a file containing the multiscale settings
|
||||
settings_path = getDirectory("home") + "/.multiscale_settings.txt";
|
||||
@@ -96,6 +98,8 @@ while(repeatFlag == 1) {
|
||||
Dialog.addNumber("Camera movement X (um):", CameraMoveX);
|
||||
Dialog.addNumber("Camera movement Y (um):", CameraMoveY);
|
||||
// TO DO: angular correction // Dialog.addNumber("Stage Rotation (degrees):", stageRotation);
|
||||
Dialog.addHelp("http://tomcat.gitpages.psi.ch/fiji_plugins/Multiscale_Coords.html");
|
||||
|
||||
|
||||
Dialog.show();
|
||||
LowResimagePixelSize = Dialog.getNumber();
|
||||
@@ -134,6 +138,8 @@ while(repeatFlag == 1) {
|
||||
Dialog.addNumber("Scans in Z:",ScansInZ);
|
||||
Dialog.addNumber("Number of Slices in Y (in LR)",SlicesInY);
|
||||
Dialog.addChoice("Selected Y slice as:", newArray("first", "middle (only for 1 block in Y)"));
|
||||
Dialog.addHelp("http://tomcat.gitpages.psi.ch/fiji_plugins/Multiscale_Coords.html");
|
||||
|
||||
Dialog.show();
|
||||
|
||||
overlapXZ = Dialog.getNumber();
|
||||
@@ -171,11 +177,16 @@ while(repeatFlag == 1) {
|
||||
im_center_y = imageheight/2;
|
||||
|
||||
// Show circles for stitched scans
|
||||
ZZp = newArray(ScansInZ*ScansInX);
|
||||
XXp = newArray(ScansInZ*ScansInX);
|
||||
cnt = 0;
|
||||
|
||||
for (i=0; i<ScansInZ; i++){
|
||||
for (j=0; j<ScansInX; j++){
|
||||
ZZp = x+(i*target_circle_pix-i*(overlapXZ/real_magnification));
|
||||
XXp = y+(j*target_circle_pix-j*(overlapXZ/real_magnification));
|
||||
Overlay.drawEllipse(ZZp, XXp, target_circle_pix, target_circle_pix);
|
||||
ZZp[cnt] = x+(i*target_circle_pix-i*(overlapXZ/real_magnification));
|
||||
XXp[cnt] = y+(j*target_circle_pix-j*(overlapXZ/real_magnification));
|
||||
Overlay.drawEllipse(ZZp[cnt], XXp[cnt], target_circle_pix, target_circle_pix);
|
||||
cnt = cnt + 1;
|
||||
}
|
||||
}
|
||||
Overlay.show;
|
||||
@@ -214,6 +225,8 @@ while(repeatFlag == 1) {
|
||||
top_final_Y = YposLowRes + top_move_Y;
|
||||
bottom_final_Y = YposLowRes + bottom_move_Y;
|
||||
|
||||
ScansInY = computeYscans(cameraFOVY,overlapY,HighResimagePixelSize,top_final_Y, bottom_final_Y);
|
||||
|
||||
first_roi_move_XX = -first_roi_delta_y_pix * LowResimagePixelSize + CameraMoveX;
|
||||
first_roi_move_ZZ = first_roi_delta_x_pix * LowResimagePixelSize;
|
||||
last_roi_move_XX = -last_roi_delta_y_pix * LowResimagePixelSize + CameraMoveX;
|
||||
@@ -239,18 +252,18 @@ while(repeatFlag == 1) {
|
||||
" - pixel size of HighRes scan: " + HighResimagePixelSize + "\n" +
|
||||
" \n\n" +
|
||||
"FIRST ROI:\n" +
|
||||
"- Move XX " + first_roi_move_XX + " um to position " + first_roi_final_XX + "\n" +
|
||||
"- Move ZZ " + first_roi_move_ZZ + " um to position " + first_roi_final_ZZ + "\n" +
|
||||
"- Move XX by " + first_roi_move_XX + " um to position " + first_roi_final_XX + "\n" +
|
||||
"- Move ZZ by " + first_roi_move_ZZ + " um to position " + first_roi_final_ZZ + "\n" +
|
||||
" \n\n" +
|
||||
"LAST ROI:\n" +
|
||||
"- Move XX " + last_roi_move_XX + " um to position " + last_roi_final_XX + "\n" +
|
||||
"- Move ZZ " + last_roi_move_ZZ + " um to position " + last_roi_final_ZZ + "\n" +
|
||||
"- Move XX by " + last_roi_move_XX + " um to position " + last_roi_final_XX + "\n" +
|
||||
"- Move ZZ by " + last_roi_move_ZZ + " um to position " + last_roi_final_ZZ + "\n" +
|
||||
" \n\n" +
|
||||
"TOP ROIs:\n" +
|
||||
"- Move Y " + top_move_Y + " um to position " + top_final_Y + "\n" +
|
||||
"- Move Y by " + top_move_Y + " um to position " + top_final_Y + "\n" +
|
||||
" \n\n" +
|
||||
"BOTTOM ROIs:\n" +
|
||||
"- Move Y " + bottom_move_Y + " um to position " + bottom_final_Y + "\n" +
|
||||
"- Move Y by " + bottom_move_Y + " um to position " + bottom_final_Y + "\n" +
|
||||
" \n\n";
|
||||
|
||||
inputXX = " " + first_roi_final_XX + " " + last_roi_final_XX;
|
||||
@@ -267,37 +280,63 @@ while(repeatFlag == 1) {
|
||||
Dialog.addString("Command line:", command_line, 60);
|
||||
Dialog.addCheckbox("Good luck! Would you like to restart?", false);
|
||||
Dialog.addCheckbox("Would you like to save motor positions in txt file?", false);
|
||||
Dialog.addCheckbox("Would you like to save Fiji positions in txt file?", true);
|
||||
Dialog.addMessage("Reference Paper: Dejea H. et al. Scientific Reports 9, 6996 (2019)");
|
||||
Dialog.addHelp("http://tomcat.gitpages.psi.ch/fiji_plugins/Multiscale_Coords.html");
|
||||
|
||||
Dialog.show();
|
||||
|
||||
repeatFlag = Dialog.getCheckbox();
|
||||
txtFlag = Dialog.getCheckbox();
|
||||
txtMotorsFlag = Dialog.getCheckbox();
|
||||
txtFijiFlag = Dialog.getCheckbox();
|
||||
|
||||
//Set stageRotation back to degrees after the RepeatFlag
|
||||
stageRotation = stageRotation*360/(2*PI);
|
||||
|
||||
Overlay.remove;
|
||||
|
||||
//Save txt file with all volume coordinates
|
||||
if (txtFlag) {
|
||||
//Save txt file with all motor coordinates
|
||||
if (txtMotorsFlag) {
|
||||
Dialog.create("Motor movement protocol");
|
||||
Dialog.addMessage("Please select the desired protocol: \n" + " -Conventional: typical stitched scan following first ZZ - XX movements, then Y. \n" +
|
||||
" -Fast snake (Y): time-optimized protocol due to Y being the fastest motor." );
|
||||
Dialog.addChoice("Protocol:", newArray("Conventional", "Fast snake (Y)"));
|
||||
Dialog.addHelp("http://tomcat.gitpages.psi.ch/fiji_plugins/Multiscale_Coords.html");
|
||||
|
||||
Dialog.show();
|
||||
|
||||
protocol = Dialog.getChoice();
|
||||
|
||||
txtArray = generateTXTarray(ScansInX,ScansInZ,first_roi_final_XX,first_roi_final_ZZ,top_final_Y,
|
||||
bottom_final_Y,HighResimagePixelSize,cameraFOVY,cameraFOVX,overlapY,overlapXZ,protocol);
|
||||
if (txtFijiFlag) {
|
||||
Dialog.create("SAVE MOTOR COORDINATES FILE");
|
||||
Dialog.addMessage("Click OK and browse to the desired directory for the MOTOR Coordinates file ");
|
||||
Dialog.show();
|
||||
}
|
||||
|
||||
txtMotorCoordsArray = generateTXTMotorsArray(ScansInX,ScansInZ,ScansInY,first_roi_final_XX,first_roi_final_ZZ,top_final_Y,
|
||||
HighResimagePixelSize,cameraFOVX,overlapXZ,protocol);
|
||||
|
||||
writeCoordsFile(txtArray);
|
||||
|
||||
repeatFlag = finalDialog(txtArray);
|
||||
|
||||
Overlay.remove;
|
||||
writeMotorCoordsFile(txtMotorCoordsArray);
|
||||
}
|
||||
|
||||
//Save txt file with all volumes Fiji coordinates
|
||||
if (txtFijiFlag) {
|
||||
|
||||
if (txtMotorsFlag) {
|
||||
Dialog.create("SAVE IMAGEJ/FIJI COORDINATES FILE");
|
||||
Dialog.addMessage("Click OK and browse to the desired directory for the IMAGEJ/FIJI Coordinates file ");
|
||||
Dialog.show();
|
||||
}
|
||||
|
||||
centresYHxywh = generateTXTFijiArray (ZZp,XXp,ScansInY,CurrentSlice,LowResimagePixelSize,target_circle_pix,stackslices,overlapY);
|
||||
|
||||
writeFijiCoordsFile(centresYHxywh);
|
||||
}
|
||||
|
||||
if (txtMotorsFlag || txtFijiFlag) {
|
||||
repeatFlag = finalDialog();
|
||||
}
|
||||
|
||||
Overlay.remove;
|
||||
|
||||
//Save txt file with the parameters used, so that they are default for next use.
|
||||
settings_file = File.open(settings_path);
|
||||
settings_array = "File containing the last settings used in Multiscale_Coords.ijm\n" +
|
||||
@@ -324,25 +363,34 @@ while(repeatFlag == 1) {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function generateTXTarray (ScansInX,ScansInZ,first_roi_final_XX,first_roi_final_ZZ,top_final_Y,
|
||||
bottom_final_Y,HighResimagePixelSize,cameraFOVY,cameraFOVX,overlapY,overlapXZ,protocol) {
|
||||
//Function that generates the txt file with all motor positions for each volume.
|
||||
function computeYscans (cameraFOVY,overlapY,HighResimagePixelSize,top_final_Y, bottom_final_Y) {
|
||||
//Determine number of Y blocks
|
||||
ScansInY = newArray(2); //Will contain num of scans at [0], and block size at [1]
|
||||
|
||||
//Determine number of Y blocks
|
||||
blockSizeY = (cameraFOVY-overlapY)*HighResimagePixelSize;
|
||||
if (top_final_Y - bottom_final_Y == 0) {
|
||||
ScansInY = 1;
|
||||
ScansInY[0] = 1;
|
||||
} else {
|
||||
ScansInY = floor(abs(top_final_Y - bottom_final_Y) / blockSizeY) + 2;
|
||||
ScansInY[0] = floor(abs(top_final_Y - bottom_final_Y) / blockSizeY) + 2;
|
||||
}
|
||||
|
||||
ScansInY[1] = blockSizeY; //Save block size as second componentt of
|
||||
|
||||
return ScansInY;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
function generateTXTMotorsArray (ScansInX,ScansInZ,ScansInY,first_roi_final_XX,first_roi_final_ZZ,top_final_Y,HighResimagePixelSize,cameraFOVX,overlapXZ,protocol) {
|
||||
//Function that generates the txt file with all motor positions for each volume.
|
||||
|
||||
//Grid in stage coords giving (XX,ZZ,Y) for each volume, from top to bottom, left to right and up to down.
|
||||
centresXXZZY = newArray(ScansInX*ScansInZ*ScansInY*3);
|
||||
centresXXZZY = newArray(ScansInX*ScansInZ*ScansInY[0]*3);
|
||||
|
||||
//Position of center of first volume in stage coords
|
||||
centresXXreal = newArray(ScansInX);
|
||||
centresZZreal = newArray(ScansInZ);
|
||||
centresYreal = newArray(ScansInY);
|
||||
centresYreal = newArray(ScansInY[0]);
|
||||
|
||||
centresXXreal[0] = first_roi_final_XX;
|
||||
centresZZreal[0] = first_roi_final_ZZ;
|
||||
@@ -360,15 +408,15 @@ while(repeatFlag == 1) {
|
||||
if (abs(centresZZreal[k]) < 0.001) {centresZZreal[k] = 0;} //avoid extremely low exponential values
|
||||
}
|
||||
//Y position of each of the other volumes in stage coords
|
||||
for (l = 1; l<ScansInY; l++) {
|
||||
centresYreal[l] = centresYreal[l-1] - blockSizeY;
|
||||
for (l = 1; l<ScansInY[0]; l++) {
|
||||
centresYreal[l] = centresYreal[l-1] + ScansInY[1];
|
||||
if (abs(centresYreal[l]) < 0.001) {centresYreal[l] = 0;} //avoid extremely low exponential values
|
||||
}
|
||||
|
||||
if(protocol == "Conventional"){
|
||||
//Fill grid in stage coords giving (XX,ZZ,Y) for each volume. First move ZZ, then XX, then Y.
|
||||
cnt = 0;
|
||||
for (ll = 0; ll<ScansInY; ll++) {
|
||||
for (ll = 0; ll<ScansInY[0]; ll++) {
|
||||
for (jj = 0; jj<ScansInX; jj++) {
|
||||
for (kk = 0; kk<ScansInZ; kk++) {
|
||||
|
||||
@@ -387,7 +435,7 @@ while(repeatFlag == 1) {
|
||||
|
||||
for (ll = 0; ll<ScansInX; ll++) {
|
||||
for (jj = iterZZ; jj<ScansInZ && jj>(-1); jj = jj + auxZZ) {
|
||||
for (kk = iterY; kk<ScansInY && kk>(-1); kk = kk + auxY) {
|
||||
for (kk = iterY; kk<ScansInY[0] && kk>(-1); kk = kk + auxY) {
|
||||
|
||||
centresXXZZY[cnt2] = centresXXreal[ll];
|
||||
centresXXZZY[cnt2+1] = centresZZreal[jj];
|
||||
@@ -404,27 +452,81 @@ while(repeatFlag == 1) {
|
||||
return centresXXZZY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
////////////////////////////////////////
|
||||
|
||||
function writeCoordsFile(centresXXZZY) {
|
||||
function writeMotorCoordsFile(centresXXZZY) {
|
||||
//Function that writes the computed coordinates to a .txt file and saves it.
|
||||
file = File.open("");
|
||||
motorsfile = File.open("");
|
||||
for (i = 0; i < lengthOf(centresXXZZY); i=i+3) {
|
||||
print(file, centresXXZZY[i] + "," + centresXXZZY[i+1] + "," + centresXXZZY[i+2]);
|
||||
print(motorsfile, centresXXZZY[i] + "," + centresXXZZY[i+1] + "," + centresXXZZY[i+2]);
|
||||
}
|
||||
File.close(file);
|
||||
File.close(motorsfile);
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
function finalDialog(centresXXZZY) {
|
||||
//Function that shows the last dialog with a summary and the possibility of restart.
|
||||
info = "The motor positions of " + lengthOf(centresXXZZY)/3 + " scans have been computed. \n";
|
||||
function generateTXTFijiArray (ZZp,XXp,ScansInY,CurrentSlice,LowResimagePixelSize,roiDiameter,stackslices,overlapY) {
|
||||
//Function that generates the txt file with all motor positions for each volume.
|
||||
|
||||
//Grid in stage coords giving (XX,ZZ,Y) for each volume, from top to bottom, left to right and up to down.
|
||||
centresYHxywh = newArray(lengthOf(ZZp)*ScansInY[0]*6);
|
||||
blockSizeYpix = ScansInY[1]/LowResimagePixelSize;
|
||||
|
||||
cnt = 0;
|
||||
for (i = 0; i < ScansInY[0]; i++) {
|
||||
for (j = 0; j < lengthOf(ZZp); j++) {
|
||||
centresYHxywh[cnt] = CurrentSlice + i*blockSizeYpix;
|
||||
|
||||
height = floor(centresYHxywh[cnt]/(stackslices-overlapY));
|
||||
|
||||
centresYHxywh[cnt] = centresYHxywh[cnt] - height*(stackslices-overlapY);
|
||||
centresYHxywh[cnt+1] = height;
|
||||
centresYHxywh[cnt+2] = ZZp[j] + roiDiameter/2;
|
||||
centresYHxywh[cnt+3] = XXp[j] + roiDiameter/2;
|
||||
centresYHxywh[cnt+4] = roiDiameter;
|
||||
centresYHxywh[cnt+5] = roiDiameter;
|
||||
cnt = cnt + 6;
|
||||
}
|
||||
}
|
||||
return centresYHxywh;
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
function writeFijiCoordsFile(centresYHxywh) {
|
||||
//Function that writes the computed coordinates to a .txt file and saves it.
|
||||
|
||||
currentHeight = 0;
|
||||
|
||||
fijifile = File.open("");
|
||||
print(fijifile, "Slice number, x, y, width, height\n\n" +
|
||||
"To visualize in ImageJ/Fiji:\n" +
|
||||
"1- ImageJ/Fiji -> Edit -> Selection -> Specify\n" +
|
||||
"2- Check Oval and Centered\n" +
|
||||
"3- Enter the values and press OK\n" +
|
||||
"4- ImageJ/Fiji -> Image -> Overlay -> Add Selection...\n" +
|
||||
"5- Repeat process with next coordinates set\n\n" +
|
||||
"Overview Scan Height 0\n\n");
|
||||
|
||||
for (i = 0; i < lengthOf(centresYHxywh); i=i+6) {
|
||||
if (centresYHxywh[i+1] > currentHeight) {
|
||||
print(fijifile,"\nOverview Scan Height " + centresYHxywh[i+1] + "\n\n");
|
||||
currentHeight = centresYHxywh[i+1];
|
||||
}
|
||||
print(fijifile, centresYHxywh[i] + ", " + centresYHxywh[i+2] + ", " + centresYHxywh[i+3] + ", " + centresYHxywh[i+4] + ", " + centresYHxywh[i+5]);
|
||||
}
|
||||
File.close(fijifile);
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
function finalDialog() {
|
||||
//Function that shows the last dialog with a summary and the possibility of restart.
|
||||
|
||||
Dialog.create("MY WORK HERE IS DONE")
|
||||
Dialog.addMessage("Calculations finished and saved. Use the txt file as input for your acquisition. \n" +
|
||||
" \n\n" + info + " \n\n");
|
||||
Dialog.addMessage("Calculations finished and saved. Thank you for using this plugin. ");
|
||||
Dialog.addCheckbox("Good luck! Would you like to restart?",0);
|
||||
Dialog.addMessage("Reference Paper: Dejea H. et al. Scientific Reports 9, 6996 (2019) ");
|
||||
Dialog.show();
|
||||
|
||||
repeatFlag = Dialog.getCheckbox();
|
||||
|
||||
@@ -1,30 +1,65 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
///////// /////////
|
||||
///////// OPTIMISED SCAN PLUGIN /////////
|
||||
///////// /////////
|
||||
///////// Created by Hector Dejea, hector.dejea@psi.ch /////////
|
||||
///////// February, 2018 /////////
|
||||
///////// /////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* Optimised Scan
|
||||
|
||||
Opt_Scan.ijm is an ImageJ plugin to find the optimal scanning grid for irregular objects. Binary and
|
||||
non binary images are accepted. The option to have a constant grid on the whole object or
|
||||
independent grids for each of the different Y layers is given. The plugin generates a .txt file that
|
||||
can be used as input for the beamline macro.
|
||||
Opt_Scan.ijm is an ImageJ plugin to find the optimal scanning grid for
|
||||
irregular objects. Binary and non binary images are accepted. The plugin
|
||||
generates a .txt file that can be used as input for the beamline macro.
|
||||
|
||||
*Created by hector.dejea@psi.ch in February 2018* */
|
||||
Last modified: 18/10/2019 */
|
||||
|
||||
//Set default values
|
||||
LowResimagePixelSize = 6.5;
|
||||
ZZcenterLowRes = 0;
|
||||
XXcenterLowRes = 0;
|
||||
YposLowRes = 0;
|
||||
LowResFOVY = 590;
|
||||
cameraFOVX = 2560;
|
||||
cameraFOVY = 2160;
|
||||
HighResimagePixelSize = 0.65;
|
||||
CameraMoveX = 0;
|
||||
CameraMoveY = 0;
|
||||
//Check if there is a file containing the OptScan settings
|
||||
settings_path = getDirectory("home") + "/.optscan_settings.txt";
|
||||
|
||||
overlapXZ = cameraFOVX*0.3;
|
||||
overlapY = 50;
|
||||
if (File.exists(settings_path)){
|
||||
|
||||
//Set default parameters specified in the file
|
||||
parameters_file = File.openAsString(settings_path);
|
||||
lines=split(parameters_file,"\n");
|
||||
|
||||
LowResimagePixelSize = lines[3];
|
||||
ZZcenterLowRes = lines[5];
|
||||
XXcenterLowRes = lines[7];
|
||||
YposLowRes = lines[9];
|
||||
LowResFOVY = lines[11];
|
||||
cameraFOVX = lines[13];
|
||||
cameraFOVY = lines[15];
|
||||
HighResimagePixelSize = lines[17];
|
||||
CameraMoveX = lines[19];
|
||||
CameraMoveY = lines[21];
|
||||
overlapXZ = lines[23];
|
||||
overlapY = lines[25];
|
||||
|
||||
} else {
|
||||
|
||||
//Otherwise set these default values
|
||||
LowResimagePixelSize = 6.5;
|
||||
ZZcenterLowRes = 0;
|
||||
XXcenterLowRes = 0;
|
||||
YposLowRes = 0;
|
||||
LowResFOVY = 590;
|
||||
cameraFOVX = 2560;
|
||||
cameraFOVY = 2160;
|
||||
HighResimagePixelSize = 0.65;
|
||||
CameraMoveX = 0;
|
||||
CameraMoveY = 0;
|
||||
overlapXZ = cameraFOVX*0.3;
|
||||
overlapY = 50;
|
||||
|
||||
}
|
||||
|
||||
repeatFlag = 1;
|
||||
while (repeatFlag == 1){
|
||||
print("Welcome to the Scan Optimisation plugin!");
|
||||
print("Welcome to the Scan Optimisation plugin!\n");
|
||||
|
||||
//Ask the user for LowRes and HighRes acquisition parameters
|
||||
Dialog.create("Magnification and Camera Settings");
|
||||
@@ -41,12 +76,10 @@ while (repeatFlag == 1){
|
||||
Dialog.addNumber("Overlap in X and Z (pixels):", overlapXZ);
|
||||
Dialog.addNumber("Overlap in Y (pixels):", overlapY);
|
||||
Dialog.addChoice("Projection Method:", newArray("MaxIP" ,"MinIP"), "MaxIP");
|
||||
Dialog.addChoice("Grid Mode:", newArray("Constant !!NOT READY!!" ,"Independent"), "Independent");
|
||||
|
||||
Dialog.show();
|
||||
|
||||
LowResimagePixelSize = Dialog.getNumber();
|
||||
//angleLowRes = Dialog.getChoice();
|
||||
XXcenterLowRes = Dialog.getNumber();
|
||||
ZZcenterLowRes = Dialog.getNumber();
|
||||
YposLowRes = Dialog.getNumber();
|
||||
@@ -59,7 +92,6 @@ while (repeatFlag == 1){
|
||||
overlapXZ = Dialog.getNumber();
|
||||
overlapY = Dialog.getNumber();
|
||||
projMethod = Dialog.getChoice();
|
||||
gridMode = Dialog.getChoice();
|
||||
|
||||
// Real magnification
|
||||
real_magnification = LowResimagePixelSize/HighResimagePixelSize;
|
||||
@@ -74,13 +106,13 @@ while (repeatFlag == 1){
|
||||
|
||||
//Compute number of acquisition layers in Y and layer size
|
||||
blockSizeY = cameraFOVY-overlapY;
|
||||
print("Complete block Size in Y is " + (cameraFOVY/real_magnification) + " pixels");
|
||||
print("Volume Size in Y is " + (cameraFOVY/real_magnification) + " pixels");
|
||||
print("Block Size in Y is " + (blockSizeY/real_magnification) + " pixels");
|
||||
nLayersY = computeNumberBlocks("Y",blockSizeY,cameraFOVY,StartSlice,EndSlice,real_magnification);
|
||||
|
||||
//Compute blocksize XZ
|
||||
blockSizeXZ = cameraFOVX-overlapXZ;
|
||||
print("Complete block Size in XZ is " + (cameraFOVX/real_magnification) + " pixels");
|
||||
print("Volume Size in XZ is " + (cameraFOVX/real_magnification) + " pixels");
|
||||
print("Block Size in XZ is " + (blockSizeXZ/real_magnification) + " pixels");
|
||||
|
||||
//Check if image is binary
|
||||
@@ -127,20 +159,10 @@ while (repeatFlag == 1){
|
||||
yEndVals[i] = y + height -1;
|
||||
}
|
||||
|
||||
//GENERATE Y CONSTANT GRID
|
||||
if (gridMode == "Constant") {
|
||||
centresXXZZY = generateYConstantGrid(blockSizeXZ,blockSizeY,cameraFOVX,cameraFOVY,nLayersY,xVals,
|
||||
yVals,xEndVals,yEndVals,real_magnification,XXcenterLowRes,ZZcenterLowRes,LowResimagePixelSize,
|
||||
HighResimagePixelSize,LowResFOVY,CameraMoveX,CameraMoveY,imagewidth,imageheight,StartSlice);
|
||||
}
|
||||
|
||||
//GENERATE Y INDEPENDENT GRID
|
||||
if (gridMode == "Independent") {
|
||||
centresXXZZY = generateYIndependentGrid(blockSizeXZ,blockSizeY,cameraFOVX,cameraFOVY,nLayersY,xVals,
|
||||
yVals,xEndVals,yEndVals,real_magnification,XXcenterLowRes,ZZcenterLowRes,LowResimagePixelSize,
|
||||
HighResimagePixelSize,LowResFOVY,CameraMoveX,CameraMoveY,imagewidth,imageheight,StartSlice);
|
||||
}
|
||||
|
||||
//GENERATE GRID
|
||||
centresXXZZY = generateYIndependentGrid(blockSizeXZ,blockSizeY,cameraFOVX,cameraFOVY,nLayersY,xVals,
|
||||
yVals,xEndVals,yEndVals,real_magnification,XXcenterLowRes,ZZcenterLowRes,LowResimagePixelSize,
|
||||
HighResimagePixelSize,LowResFOVY,CameraMoveX,CameraMoveY,imagewidth,imageheight,StartSlice);
|
||||
|
||||
//COMPLETE FOR BINARY IMAGES -> ELIMINATE EMPTY VOLUMES
|
||||
|
||||
@@ -176,19 +198,11 @@ while (repeatFlag == 1){
|
||||
yEndVals[i] = y + height -1;
|
||||
}
|
||||
|
||||
//GENERATE CONSTANT GRID
|
||||
if (gridMode == "Constant") {
|
||||
centresXXZZY = generateYConstantGrid(blockSizeXZ,blockSizeY,cameraFOVX,cameraFOVY,nLayersY,xVals,
|
||||
yVals,xEndVals,yEndVals,real_magnification,XXcenterLowRes,ZZcenterLowRes,LowResimagePixelSize,
|
||||
HighResimagePixelSize,LowResFOVY,CameraMoveX,CameraMoveY,imagewidth,imageheight,StartSlice);
|
||||
}
|
||||
//GENERATE GRID
|
||||
centresXXZZY = generateYIndependentGrid(blockSizeXZ,blockSizeY,cameraFOVX,cameraFOVY,nLayersY,xVals,
|
||||
yVals,xEndVals,yEndVals,real_magnification,XXcenterLowRes,ZZcenterLowRes,LowResimagePixelSize,
|
||||
HighResimagePixelSize,LowResFOVY,CameraMoveX,CameraMoveY,imagewidth,imageheight,StartSlice);
|
||||
|
||||
//GENERATE INDEPENDENT GRID
|
||||
if (gridMode == "Independent") {
|
||||
centresXXZZY = generateYIndependentGrid(blockSizeXZ,blockSizeY,cameraFOVX,cameraFOVY,nLayersY,xVals,
|
||||
yVals,xEndVals,yEndVals,real_magnification,XXcenterLowRes,ZZcenterLowRes,LowResimagePixelSize,
|
||||
HighResimagePixelSize,LowResFOVY,CameraMoveX,CameraMoveY,imagewidth,imageheight,StartSlice);
|
||||
}
|
||||
}
|
||||
|
||||
//Print .txt file with the generated coordinates
|
||||
@@ -200,8 +214,26 @@ while (repeatFlag == 1){
|
||||
if (repeatFlag) {
|
||||
closeGeneratedImgs();
|
||||
}
|
||||
|
||||
//Save txt file with the parameters used, so that they are default for next use.
|
||||
settings_file = File.open(settings_path);
|
||||
settings_array = "File containing the last settings used in Opt_Scan.ijm\n" +
|
||||
"\nLowResimagePixelSize\n" + LowResimagePixelSize +
|
||||
"\nZZcenterLowRes\n" + ZZcenterLowRes +
|
||||
"\nXXcenterLowRes\n" + XXcenterLowRes +
|
||||
"\nYposLowRes\n" + YposLowRes +
|
||||
"\nLowResFOVY\n" + LowResFOVY +
|
||||
"\ncameraFOVX\n" + cameraFOVX +
|
||||
"\ncameraFOVY\n" + cameraFOVY +
|
||||
"\nHighResimagePixelSize\n" + HighResimagePixelSize +
|
||||
"\nCameraMoveX\n" + CameraMoveX +
|
||||
"\nCameraMoveY\n" + CameraMoveY +
|
||||
"\noverlapXZ\n" + overlapXZ +
|
||||
"\noverlapY\n" + overlapY;
|
||||
print(settings_file, settings_array);
|
||||
File.close(settings_file);
|
||||
|
||||
}
|
||||
} //END
|
||||
|
||||
|
||||
|
||||
@@ -332,8 +364,10 @@ while (repeatFlag == 1){
|
||||
totalBlocksLayer = 0;
|
||||
totalBlocks = 0;
|
||||
for (i = 0; i < nLayersY; i++ ) {
|
||||
print("\nY layer" + (i+1) + ":");
|
||||
numBlocksXX[i] = computeNumberBlocks("XX",blockSizeXZ,cameraFOVX,yVals[i],yEndVals[i],real_magnification);
|
||||
numBlocksZZ[i] = computeNumberBlocks("ZZ",blockSizeXZ,cameraFOVX,xVals[i],xEndVals[i],real_magnification);
|
||||
|
||||
//Total number of XX and ZZ blocks
|
||||
totalBlocksLayer = numBlocksXX[i]*numBlocksZZ[i];
|
||||
totalBlocks = totalBlocks + totalBlocksLayer;
|
||||
@@ -346,111 +380,6 @@ while (repeatFlag == 1){
|
||||
return centresXXZZY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
function generateYConstantGrid(blockSizeXZ,blockSizeY,cameraFOVX,cameraFOVY,nLayersY,xVals,yVals,xEndVals,
|
||||
yEndVals,real_magnification,XXcenterLowRes,ZZcenterLowRes,LowResimagePixelSize,HighResimagePixelSize,
|
||||
LowResFOVY,CameraMoveX,CameraMoveY,imagewidth,imageheight,StartSlice) {
|
||||
//Function that generates a constant grid for all Y layers.
|
||||
|
||||
Array.getStatistics(xVals, minx);
|
||||
Array.getStatistics(yVals, miny);
|
||||
Array.getStatistics(xEndVals, minw, maxw);
|
||||
Array.getStatistics(yEndVals, minh, maxh);
|
||||
|
||||
//Compute number of blocks for most extense rectangle
|
||||
numBlocksXXmax = computeNumberBlocks("XX",blockSizeXZ,cameraFOVX,miny,maxh,real_magnification);
|
||||
numBlocksZZmax = computeNumberBlocks("ZZ",blockSizeXZ,cameraFOVX,minx,maxw,real_magnification);
|
||||
|
||||
//Generate the FIXED GRID (in Low Resolution pixels)
|
||||
gridXX = newArray(numBlocksXXmax+1);
|
||||
gridZZ = newArray(numBlocksZZmax+1);
|
||||
gridXXcentres = newArray(numBlocksXXmax);
|
||||
gridZZcentres = newArray(numBlocksZZmax);
|
||||
|
||||
gridXX[0] = miny;
|
||||
gridZZ[0] = minx;
|
||||
|
||||
//First block is complete, so the center is computed without overlap taken into account
|
||||
gridXXcentres[0] = gridXX[0] + cameraFOVX/2/real_magnification;
|
||||
|
||||
//Compute XX center and XX position for each volume of the grid
|
||||
for (i=1; i < numBlocksXXmax; i++) {
|
||||
gridXXcentres[i] = gridXXcentres[i-1] + blockSizeXZ/real_magnification;
|
||||
gridXX[i] = gridXX[i-1] + blockSizeXZ/real_magnification;
|
||||
}
|
||||
|
||||
//First block is complete, so the center is computed without overlap taken into account
|
||||
gridZZcentres[0] = gridZZ[0] + cameraFOVX/2/real_magnification;
|
||||
|
||||
//Compute ZZ center and ZZ grid position for each volume of the grid
|
||||
for (i=1; i < numBlocksZZmax; i++) {
|
||||
gridZZcentres[i] = gridZZcentres[i-1] + blockSizeXZ/real_magnification;
|
||||
gridZZ[i] = gridZZ[i-1] + blockSizeXZ/real_magnification;
|
||||
}
|
||||
|
||||
//Modify rectangle coordinates to fit the generated grid
|
||||
//Central position of the corresponding FOV is given (in pixels)
|
||||
posInZZ = newArray(nLayersY);
|
||||
posFinZZ = newArray(nLayersY);
|
||||
posInXX = newArray(nLayersY);
|
||||
posFinXX = newArray(nLayersY);
|
||||
|
||||
for (i = 0; i < nLayersY; i++) {
|
||||
|
||||
for (j = 1; j < numBlocksZZmax+1; j++) {
|
||||
if (xVals[i] < gridZZ[j]){
|
||||
posInZZ[i] = gridZZcentres[j-1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (k = j; k < numBlocksZZmax+1; k++) {
|
||||
if (xEndVals[i] < gridZZ[k]){
|
||||
posFinZZ[i] = gridZZcentres[k-1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (jj = 1; jj < numBlocksXXmax+1; jj++) {
|
||||
if (yVals[i] < gridXX[jj]){
|
||||
posInXX[i] = gridXXcentres[jj-1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (kk = jj; kk < numBlocksXXmax+1; kk++) {
|
||||
if (yEndVals[i] < gridXX[kk]){
|
||||
posFinXX[i] = gridXXcentres[kk-1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Compute Y positions in stage coords
|
||||
centresYreal = computeYCoords(nLayersY,YposLowRes,LowResFOVY,StartSlice,LowResimagePixelSize,CameraMoveY,
|
||||
cameraFOVY,HighResimagePixelSize,blockSizeY);
|
||||
|
||||
//Compute number of blocks per layer and total number
|
||||
numBlocksXX = newArray(nLayersY);
|
||||
numBlocksZZ = newArray(nLayersY);
|
||||
totalBlocksLayer = 0;
|
||||
totalBlocks = 0;
|
||||
for (i = 0; i < nLayersY; i++ ) {
|
||||
numBlocksXX[i] = computeNumberBlocks("XX",blockSizeXZ,cameraFOVX,posInXX[i],posFinXX[i],real_magnification);
|
||||
numBlocksZZ[i] = computeNumberBlocks("ZZ",blockSizeXZ,cameraFOVX,posInZZ[i],posFinZZ[i],real_magnification);
|
||||
//Total number of XX and ZZ blocks
|
||||
totalBlocksLayer = numBlocksXX[i]*numBlocksZZ[i];
|
||||
totalBlocks = totalBlocks + totalBlocksLayer;
|
||||
}
|
||||
|
||||
//Grid in stage coords giving (XX,ZZ,Y) for each volume, from top to bottom, left to right and up to down.
|
||||
centresXXZZY = lowResPx2StageCoords(numBlocksXX,numBlocksZZ,totalBlocks,nLayersY,posInXX,posInZZ,
|
||||
cameraFOVX,real_magnification,imagewidth,imageheight,XXcenterLowRes,ZZcenterLowRes,LowResimagePixelSize,
|
||||
HighResimagePixelSize,CameraMoveX,blockSizeXZ,centresYreal);
|
||||
return centresXXZZY;
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
function writeCoordsFile(centresXXZZY) {
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
from ij import IJ
|
||||
from ij.gui import Overlay, Line
|
||||
|
||||
imp = IJ.getImage()
|
||||
cx = int(imp.width/2.0)
|
||||
cy = int(imp.height/2.0)
|
||||
|
||||
print cx, cy
|
||||
|
||||
overlay = Overlay()
|
||||
line_v = Line(cx,0,cx,imp.height)
|
||||
line_v.setStrokeWidth(1)
|
||||
overlay.add(line_v)
|
||||
line_h = Line(0,cy,imp.width,cy)
|
||||
line_h.setStrokeWidth(1)
|
||||
overlay.add(line_h)
|
||||
|
||||
imp.setOverlay(overlay)
|
||||
imp.show()
|
||||