GithubHelp home page GithubHelp logo

Comments (11)

william-silversmith avatar william-silversmith commented on July 3, 2024

Hi Senthil,

I currently do not have access to a windows machine for compilation unfortunately as my lab runs its software development program on ubuntu and mac. In the past, others have recommended integrating https://www.appveyor.com/ which apparently offers windows builds. Another option is to use mingw as a cross compiler, but I wouldn't be able to verify that those binaries run on my own. It's kind of a pain for me to support windows generally, but this survey https://www.jetbrains.com/research/python-developers-survey-2017/ seems to indicated that based on detected OS of people taking the survey, ~50% of Python users are on windows with ~17% probably on mobile devices and that can be distributed somehow over the other three categories (Windows, Linux, Mac OS). Therefore, I am open to discussing this if it's not overly burdensome. For instance, I can't debug it for you guys on Windows.

Theoretically, you should be able to install on windows anyway using the source distribution if you have a C++ compiler installed and explicitly install numpy first. I'm a bit surprised that your pip install command gave you no matching distribution as there is a source distribution listed here: https://pypi.org/project/connected-components-3d/#files

Would you mind showing me the output of your command?

Thanks!
Will

from connected-components-3d.

william-silversmith avatar william-silversmith commented on July 3, 2024

Hi Senthil,

My friend compiled it for AMD on Python 3.7 for me. Unclear if this will help you, but at least the option is there.

Will

from connected-components-3d.

william-silversmith avatar william-silversmith commented on July 3, 2024

I also found some advice on StackOverflow, you can try using pip install connected-components-3d --no-binary :all: to force install from source.

from connected-components-3d.

tkseneee avatar tkseneee commented on July 3, 2024

from connected-components-3d.

william-silversmith avatar william-silversmith commented on July 3, 2024

Hi Senthil,

I think your email attachment got dropped unfortunately. You might have to use the web interface to share photos. Would you mind sharing which Python version you're using and whether you're running on Intel or AMD? Do you have a C++ compiler installed? Maybe I should work on getting AppVeyor working....

If you're in a crunch and there aren't too many labels, you can do the following (it might be kinda slow):

import numpy as np
from scipy.ndimage import measurements

image = create_image()
segids = np.unique(image)[1:] # get rid of 0

output = np.zeros(image.shape , dtype=image.dtype)

num_components = 0
for segid in segids:
    components, num_features = measurements.label( (image == segid) )
    components += num_components
    num_components += num_features
    output += components

You can also adjust the "structure" shape of scipy.ndimage.measurements.label in order to achieve 26-connectivity. By default, I think it is 6-connected.

from connected-components-3d.

tkseneee avatar tkseneee commented on July 3, 2024

err

from connected-components-3d.

william-silversmith avatar william-silversmith commented on July 3, 2024

Oh interesting! My colleague just submitted a fix for that last night when he compiled it for windows. Somehow it slipped my mind that you'd have the same issue, so I didn't immediately release a fix. Why don't I do that now.

The issue was that windows needs #include <algorithm.h> in cc3d.hpp.

from connected-components-3d.

william-silversmith avatar william-silversmith commented on July 3, 2024

Ok, I just uploaded some new source files. Give it a try! Version 1.0.1.

from connected-components-3d.

william-silversmith avatar william-silversmith commented on July 3, 2024

There's a little funkiness with the build process so I'm going to release 1.0.2.

  • Need to set the __VERSION__ property correctly.
  • Numpy 1.16.0 stopped building binaries for Python 3.4

from connected-components-3d.

tkseneee avatar tkseneee commented on July 3, 2024

Thank you very much. Its working now :)

from connected-components-3d.

william-silversmith avatar william-silversmith commented on July 3, 2024

Fantastic! I hope it's helpful. 😊Good luck with your research!

from connected-components-3d.

Related Issues (20)

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.