-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from LorenzLamm/cleanup_and_docs
clean up and docs
- Loading branch information
Showing
9 changed files
with
165 additions
and
632 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
## How to use the lasso plugin | ||
|
||
### 1. Preparation | ||
- Open the napari viewer | ||
- Load a 3D image (binary) | ||
- Load the lasso plugin | ||
|
||
### 2. Draw Lasso | ||
First, click the "Freehand" button in the upper right corner of the viewer. Then, draw a lasso on the image by clicking and dragging the mouse. | ||
|
||
<div style="text-align: center;"> | ||
<img src="https://private-user-images.githubusercontent.com/34575029/400213952-48f24e49-4cd0-4fa1-9f22-bfe8f9ae09bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYwOTU2MzAsIm5iZiI6MTczNjA5NTMzMCwicGF0aCI6Ii8zNDU3NTAyOS80MDAyMTM5NTItNDhmMjRlNDktNGNkMC00ZmExLTlmMjItYmZlOGY5YWUwOWJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE2NDIxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3YjEzMjk3ZjdlY2EyY2M5NDdmOWEwNDNhMzdhNmY2MmJhYjc1OGViOTk0ZDQ1Y2RlYTY3MDNmNDM2MzViMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.w9KCehExEcqAfsGSxw8-UVTLusFaS265ckAN9LMBtag" alt="lasso_selection" width="49%" /> | ||
<img src="https://private-user-images.githubusercontent.com/34575029/400213951-bf73433d-f9f2-4f7d-b798-de2c71f3197a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYwOTU2MzAsIm5iZiI6MTczNjA5NTMzMCwicGF0aCI6Ii8zNDU3NTAyOS80MDAyMTM5NTEtYmY3MzQzM2QtZjlmMi00ZjdkLWI3OTgtZGUyYzcxZjMxOTdhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE2NDIxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNjNjk3YmEyMTE1YWYzZTdhZDg1OGM0NTAwMDcxNWE4YzMzMTYyZDU5YjBlNDA3NTI3ZjI4ZWE3MTVkYzQwMGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.aYU0q4jzIQwb2maGQ0yiDJCXFaW3wDqGIYoFhDETy-w" alt="lasso_draw" width="49%" /> | ||
</div> | ||
|
||
|
||
### 3. Generate mask and mask out the image | ||
Click the "Lasso" button to generate a mask in the shape of the image you want to mask. Then click the "Mask Volume" button to mask out the image and generate a new layer with the masked image ("masked_volume"). | ||
|
||
|
||
<div style="text-align: center;"> | ||
<img src="https://private-user-images.githubusercontent.com/34575029/400213950-98242f8a-bfa7-44ed-9a44-aed49c124955.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYwOTU5NTYsIm5iZiI6MTczNjA5NTY1NiwicGF0aCI6Ii8zNDU3NTAyOS80MDAyMTM5NTAtOTgyNDJmOGEtYmZhNy00NGVkLTlhNDQtYWVkNDljMTI0OTU1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE2NDczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAxOTBmMzlhOTk2ZDIyNTIwMDYyYjI3MDVhNTVkNTg2ZTM5NTEwZGI1ZGE0ODUyM2EzZDE3NDk4NWNmOWNmNWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cgEHtdFzxq1gNZ08LLQF453ZqtzGUAPtPtD4KsymASg" alt="lasso_mask_generation" width="49%" /> | ||
<img src="https://private-user-images.githubusercontent.com/34575029/400213946-8dff4d4d-c0ce-4c31-abc5-f730c69f62c8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYwOTU5NTYsIm5iZiI6MTczNjA5NTY1NiwicGF0aCI6Ii8zNDU3NTAyOS80MDAyMTM5NDYtOGRmZjRkNGQtYzBjZS00YzMxLWFiYzUtZjczMGM2OWY2MmM4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE2NDczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlYjQ3OGFkZTg5NzQyZDc5MjhjYTk3Yjk2YTgyZjY5NWI1ZmYyNzMzMTQ5ZjU4ZjE4NjcyM2YwNmJlZDhkMTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HJjL9w-57SLYseQdlAuyImRCiEz6kQNFLNeszLVR3rw" alt="lasso_masked_volume" width="49%" /> | ||
</div> | ||
|
||
|
||
### 4. Compute connected components | ||
By selecting the "masked_volume" layer and clicking the "Connected Components" button, you can compute the connected components of the masked image. The connected components will be displayed as a new layer ("connected_components"). | ||
|
||
You can choose the remove small objects from the components by setting the "remove small objects" parameter to something other than 0. This will remove all connected components with a volume smaller than the specified value. | ||
|
||
You also the the option to perform morphological opening before computing the connected components. This could be useful to split components that were wrongly merged by single voxels in the initial segmentations. | ||
|
||
#### Visualization | ||
To look at a single connected component, you can select the number of the component you would like to visualize and click "Display Connected Components" to display the selected component. All others will be blacked out. | ||
|
||
If you would like to display all components again, you can select component number 0 and click "Display Connected Components". | ||
|
||
<div style="text-align: center;"> | ||
<img src="https://private-user-images.githubusercontent.com/34575029/400213937-2e4571ee-ab4c-4c01-bcfe-df3ceb2f9a60.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYwOTYyNzUsIm5iZiI6MTczNjA5NTk3NSwicGF0aCI6Ii8zNDU3NTAyOS80MDAyMTM5MzctMmU0NTcxZWUtYWI0Yy00YzAxLWJjZmUtZGYzY2ViMmY5YTYwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE2NTI1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ3YzhmZTdmZGY3NmMxZTgzNjYwYjExYjlkYmI3ZjUwZTA1ZTlhYzE5ZTBkZGZlNGY3NzlhNzU3MzQ0NDM3YjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.hOBHQ2oVUBADDjr2Wo5VScv-9Qcelfisyqi1al430pw" alt="lasso_compute_components" width="49%" /> | ||
<img src="https://private-user-images.githubusercontent.com/34575029/400213931-17253256-258e-4861-99d5-07c32f47bc07.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYwOTYyNzUsIm5iZiI6MTczNjA5NTk3NSwicGF0aCI6Ii8zNDU3NTAyOS80MDAyMTM5MzEtMTcyNTMyNTYtMjU4ZS00ODYxLTk5ZDUtMDdjMzJmNDdiYzA3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE2NTI1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE4Mjk2N2Y5OTI5OTU3MmE5NjdhMzRkZmFlY2Q2ZDBlYmU3YzNkMDc4OGQ2NGUzY2JlNmRkOGI0NTU5OTg5MDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MJuCpAPPt28BnjLXanxfz18rIX9D8VVYk_MYGcrZJRo" alt="lasso_look_at_components" width="49%" /> | ||
</div> | ||
|
||
### 5. Save out the connected components | ||
You can now save out the components you would like to keep by selecting the corresponding component number, specifiying a file path, and clicking the "Store Tomogram" button. This will save the selected component as a new .mrc file. | ||
|
||
Alternatively, you also also specify a directory path and select "Store All Components" to save out all components as individual .mrc files. | ||
|
||
<div style="text-align: center;"> | ||
<img src="https://private-user-images.githubusercontent.com/34575029/400213927-14c8b195-f439-49c4-8d9e-6af6c80c82eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYwOTYyNzUsIm5iZiI6MTczNjA5NTk3NSwicGF0aCI6Ii8zNDU3NTAyOS80MDAyMTM5MjctMTRjOGIxOTUtZjQzOS00OWM0LThkOWUtNmFmNmM4MGM4MmViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE2NTI1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmZTJhODY2YjkwNzYxMWQ3YTM1MTQxMTFlMDZmZmVmYzFjMTNjY2YwNjc0YjgwZjdkODlmYjhhOWRjMDNhZmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oypEXHl5zcB1Oq9V2jh9Cgy9gY6dlKm56giuGmksapE" alt="lasso_visualize_single_membrane" width="49%" /> | ||
<img src="https://private-user-images.githubusercontent.com/34575029/400213919-126cab19-3c36-4556-b674-ed79d5deaa18.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYwOTYyNzUsIm5iZiI6MTczNjA5NTk3NSwicGF0aCI6Ii8zNDU3NTAyOS80MDAyMTM5MTktMTI2Y2FiMTktM2MzNi00NTU2LWI2NzQtZWQ3OWQ1ZGVhYTE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE2NTI1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWViYmIwMDJjNDYzM2Q2NjhiODFiNDg2ZjY0ODg4NWU3MjQ2ODRkZGYxNjlhMjFjZDFmZmYwYmZjN2VlOTFlNDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-h77temIeiS21EJ4vE5h_x6aq0AchFU9aNjcy8SECIo" alt="generated_files" width="49%" /> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.