Giter Site home page Giter Site logo

Comments (7)

donghaozhang avatar donghaozhang commented on May 28, 2024

Can you try to lower your threshold?

from rivuletpy.

argunsah avatar argunsah commented on May 28, 2024

It didn't help. I just get more unrelated branches but the soma pad error remains.

from rivuletpy.

lsqshr avatar lsqshr commented on May 28, 2024

@argunsah
Hi, thanks for your interests and reporting this issue. I can confirm the issue and I am looking into it.

I have fixed it by adding the pad and save functions back to the Soma class. Before I commit the updates, do you mind sharing the testing tif?

from rivuletpy.

lsqshr avatar lsqshr commented on May 28, 2024

also the --soma flag has been deprecated (I just updated the readme). Now if you add --quality the tracing function will use the SRET algorithm to reconstruct the soma contour. Otherwise, a simple sphere estimation algorithm will be used.

from rivuletpy.

lsqshr avatar lsqshr commented on May 28, 2024

The second issue is caused by the pyglet package we used for the simple rendering function. I currently cannot reproduce this on my side, I guess it was caused by some package version incompatability (rejuvyesh/gym-dmcontrol#1). pyglet is known to be tricky to setup for windows.

I would recommend to drag the result swc file to a software like Vaa3D to render it for now to bypass this problem.

Pls let us know how it goes!

from rivuletpy.

argunsah avatar argunsah commented on May 28, 2024

I tried with --quality option and tried visualizing the .swc using Vaa3D or HBP viewer but didn't see soma. Is this expected?

Another question, if I want to use anisotropic diffusion, what is the option for that? It is not specified in the usage help file.

from rivuletpy.

lsqshr avatar lsqshr commented on May 28, 2024

If you have --save-soma and --quality, the reconstructed soma mask is saved to *.tif.r2.soma.tif in the same folder as your input tif if reconstructed correctly.

For image filtering, there is a script I once implemented under apps/anifilter that supports the OOF filter and the bi-gaussian filter. It allows the soma to be masked when the image is being filtered.

I have not used this script since we started to use CNNs to preprocess the image and run rivuletpy on the CNN predicted heatmaps. So adventures expected.

$ python anifilter -h
usage: anifilter [-h] -f FILE [-o OUT] [--soma] [--no-soma] [-t THRESHOLD]
                 [--filtertype FILTERTYPE] [--rlow RLOW] [--rhigh RHIGH]
                 [--rstep RSTEP] [--rho RHO]

Arguments to perform the anisotropic filter on the input image.

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  The input file. A image file (*.tif, *.nii, *.mat).
  -o OUT, --out OUT     The name of the output file
  --soma
  --no-soma
  -t THRESHOLD, --threshold THRESHOLD
                        The thresohld to get the segmentation for soma
                        detection. If not provided, the threshold will be
                        decided via otsu thresholding (not reliable for noisy
                        images).
  --filtertype FILTERTYPE
                        The type of filter to use for filtering images (bg or
                        oof); bf for Bi-Gaussian filter, oof for Optimal
                        Oriented Flux filter. default: oof
  --rlow RLOW           The lower bound of radius to try
  --rhigh RHIGH         The higher bound of radius to try
  --rstep RSTEP         The step size of trying radius
  --rho RHO             The rho value for the BG filter. Only used if filter
                        type is bg

For iterative anisotropic diffusion filter, there is an equavalent plugin in Vaa3D that could be called from commandline Vaa3D Menu->Plug-in->image filters-> anisotropic filter (not sure if the windows build works)

from rivuletpy.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.