Skip to content

Commit

Permalink
fixed a bug introduced by the previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jewettaij committed Aug 10, 2021
1 parent 4cef459 commit 782a7c1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 53 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ jobs:
#- run:
# name: Installing GCC
# command: 'sudo apt-get update && sudo apt-get install -y g++'
#- run:
# name: Installing CLANG
# command: 'sudo apt-get update && sudo apt-get install -y clang'
- run:
name: Installing CLANG
command: 'sudo apt-get update && sudo apt-get install -y clang'
- run:
name: Build CLANG version
name: Build
command: |
source alternate_compiler_settings/for_debugging_and_profiling/setup_clang_dbg.sh
source alternate_compiler_settings/for_debugging_and_profiling/setup_gcc_dbg.sh
make clean
make
- run:
name: Test CLANG version
name: Test
command: |
bash tests/test_fluctuation_filter.sh
bash tests/test_blob_detection.sh
Expand Down
93 changes: 47 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,53 @@ We hope to finish the remaining features
and submit a paper on this software in 2021.
Nevertheless, if you find a bug, please report it. I will fix it.




## Requirements

- **16GB** of RAM or higher.
(64GB is recommended. For membrane detection,
your RAM must exceed 11x the size of the tomogram that you are analyzing.
The *voxelize_mesh.py* program requires even more memory.
You can reduce the memory needed and computation time dramatically
by cropping or binning your tomogram.)
- A [C++ compiler](#Supported-compilers)
- [make](https://en.wikipedia.org/wiki/Make_(software))
- Software to visualize MRC/REC/MAP files
(such as [IMOD/3dmod](https://bio3d.colorado.edu/imod/))


Recommended:
- A text editor. (Word, Wordpad, and Notepad will not work.)
Popular graphical text editors
include **Atom**, **Sublime**, **Notepad++**, and **VSCode**.
Older, non-graphical programs include **vim**, **emacs**,
**nano**, **ne**, and **jove**.
(Apple's TextEdit can be used if you save the file as *plain text*.)
- python
- The "numpy", "matplotlib", "mrcfile", and python modules
(These are are installable via "pip3" or "pip".)


Optional, but needed for membrane segmentation:
- [**PoissonRecon**](https://github.com/mkazhdan/PoissonRecon).
- software to visualize mesh files
(such as [meshlab](http://www.meshlab.net)).
- python
- The "pyvista" python module (installable via "pip3" or "pip".)


### Supported compilers

The **CLANG** compiler is recommended, but no longer required.
Although this code appears to be working
with the **GCC** compiler now, I have run into
[difficulties in the past](https://github.com/jewettaij/visfd/issues/2).
*Feel free to use GCC, but if you notice strange behavior,
try compiling with CLANG.*


## Compilation

## Linux:
Expand Down Expand Up @@ -235,9 +282,6 @@ programs which you downloaded and installed directly from within the
WSL or WSL2 environment *(if possible)*. In particular, a couple of the
features of the *filter_mrc* program require you to learn and use a
(unix-style) text editor. (Word, Wordpad, and Notepad will not work.)
Popular text editors include **Atom**, **Sublime**, **Notepad++**,
and **VSCode**. Older, non-graphical programs include **vim**, **emacs**,
**nano**, **ne**, and **jove**.
Again, it is a good idea to install and run such programs from within WSL,
not windows.

Expand All @@ -261,49 +305,6 @@ Then compile visfd using:
make
```

## Requirements

- **16GB** of RAM or higher.
(64GB is recommended. For membrane detection,
your RAM must exceed 11x the size of the tomogram that you are analyzing.
The *voxelize_mesh.py* program requires even more memory.
You can reduce the memory needed and computation time dramatically
by cropping or binning your tomogram.)
- A [C++ compiler](#Supported-C++-compilers)
- [make](https://en.wikipedia.org/wiki/Make_(software))
- Software to visualize MRC/REC/MAP files
(such as [IMOD/3dmod](https://bio3d.colorado.edu/imod/))


Recommended:
- A text editor. (Word, Wordpad, and Notepad will not work.)
Popular graphical text editors
include **Atom**, **Sublime**, **Notepad++**, and **VSCode**.
Older, non-graphical programs include **vim**, **emacs**,
**nano**, **ne**, and **jove**.
(Apple's TextEdit can be used if you save the file as *plain text*.)
- python
- The "numpy", "matplotlib", "mrcfile", and python modules
(These are are installable via "pip3" or "pip".)


Optional, but needed for membrane segmentation:
- [**PoissonRecon**](https://github.com/mkazhdan/PoissonRecon).
- software to visualize mesh files
(such as [meshlab](http://www.meshlab.net)).
- python
- The "pyvista" python module (installable via "pip3" or "pip".)


### Supported C++ compilers

The **CLANG** compiler is recommended, but no longer required.
Although this code appears to be working
with the **GCC** compiler now, I have run into
[difficulties in the past](https://github.com/jewettaij/visfd/issues/2).
*Feel free to use GCC, but if you notice strange behavior,
try compiling with CLANG.*



## License
Expand Down
2 changes: 1 addition & 1 deletion bin/filter_mrc/handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ HandleTV(const Settings &settings,
for (int iz = 0; iz < image_size[2]; ++iz) {
for (int iy = 0; iy < image_size[1]; ++iy) {
for (int ix = 0; ix < image_size[0]; ++ix) {
if (mask.aaafI[iz][iy][ix] == 0.0)
if (mask.aaafI && mask.aaafI[iz][iy][ix] == 0.0)
continue;
// This next line fails with compiler optimizations on.
max_label = std::max(max_label, aaaiClusterId[iz][iy][ix]);
Expand Down

0 comments on commit 782a7c1

Please sign in to comment.