Giter VIP home page Giter VIP logo

ectopylasm's Introduction

ectopylasm

Tools for visualizing and fitting pointcloud data.

image

image

image

Documentation Status

Installation

The recommended way to install ectopylasm is by using a virtual environment. Using Miniconda, one can get a working environment on Linux with the following commands:

# on Linux
conda create -n ectopylasm python=3.7
conda activate ectopylasm
pip install git+https://github.com/sundial-pointcloud-geometry/ectopylasm.git

On macOS, the pptk dependency is only available for Python 3.6, so there one should use:

# on macOS
conda create -n ectopylasm python=3.6
conda activate ectopylasm
pip install git+https://github.com/sundial-pointcloud-geometry/ectopylasm.git

To install ectopylasm from a cloned git repo, do:

git clone https://github.com/sundial-pointcloud-geometry/ectopylasm.git
cd ectopylasm
pip install .

Run tests (including coverage) with:

python setup.py test

Contributing

If you want to contribute to the development of ectopylasm, have a look at the contribution guidelines.

License

Copyright (c) 2019, Humboldt-Universität zu Berlin

Licensed under the MIT License.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Credits

This package was created with Cookiecutter and the NLeSC/python-template.

ectopylasm's People

Contributors

egpbos avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

grasshoff

ectopylasm's Issues

Make Plane dataclass

For consistency with cones and for a cleaner interface, we should also build a dataclass for planes, like we did for cones. Such a class could also host alternative constructors, if necessary in the future. For planes, these already exist at some points, because we use two ways of specifying planes: with parameter d or with a point on the plane.

Faster filtering

Filtering is currently too slow (hence the need for tqdm progress bars). Make faster somehow.

Add OpenCone

We could add an object tentatively called an open cone, which would be a cone with no height, i.e. one that extends infinitely into one direction. Such an object has one parameter less than the Cone. The radius and the height (both meaningless for this infinite object) are replaced by the single opening angle parameter. The fact that there is one less parameter, may make fitting easier. In the case of sundials, this is then the preferred option, since it does not actually make sense to limit the cone in height and radius, as we must do now.

Add example notebook

We need a notebook (or several) to showcase ectopylasm functionality. It/they should do at least the following:

  • Notebook 1
    • Download Sundial data
    • Load it
    • Visualize the points
    • Filter out a plane section
    • Visualize filtered points
    • Fit a Plane shape to that filtered out section
    • Plot the shape together with the filtered points
  • Notebook 2
    • Fit a Cone shape to some points (maybe generated, don't know which data source to use for this)
    • Plot the shape together with the filtered points

Project points to fitted shape

After doing a fit to a plane or a cone, we want to be able to project the points to the nearest place on this shape. This will allow further two-dimensional analysis of e.g. lines or other carvings in this structure.

Add {Plane,Cone}.from_points() methods

Inspired by the NormalDist.from_samples() syntax, I think it would be nice if the shape classes could have constructors that take a point set as input, fit to that point set, and use the best fitting parameters to make the new shape. It would look like this:

from numpy.random import random, normal
from ectopylasm import Plane

N = 1000
xyz = (random(N), random(N), normal(0, 0.01, N))

plane = Plane.from_points(xyz)

Change `fig =` in visualize

It's not actually Figures that are returned from the ipyvolume functions. Change the names so that they make more semantic sense.

Cache loaded PLY file vertices

Loading PLY files is slow at the moment. We can speed this up by loading once with plyfile and then only saving the vertex coordinates in some other format, e.g. HDF5. This way we can skip loading the faces.

Hide symfit division by zero warning

When fitting to a plane, symfit throws a warning, because there is a conceptual issue with the way we're doing the fit, as described here: tBuLi/symfit#256

While that issue remains open, we should somehow block the warning from the ectopylasm side, since the issue is understood and should not be warned about.

Change output of filter functions to dataframes

Now the output of the filter_points_ functions are lists of arrays, which is really cumbersome to work with. Change this to output dataframes, similar to the dataframe that is used as input.

Add tests for changed functions

I forgot to write tests for the cone functions when I changed the interface to use Cone objects, violating my own unwritten rule about when to absolutely write tests (i.e. when you change a function). Do it anyway!

Make Cone constructor with apex and base center locations + radius

This may improve fitting, since these are a lot easier to interpret. Also visual / manual fitting might be easier with these parameters than by fiddling around with angles. This is probably the reason Mathematica uses these construction parameters instead of the set we currently use (height, radius, two angles, base position x, y, z). Note that in both cases we have 7 parameters for the cone.

Make plane dataclass

For consistency with cones and for a cleaner interface, we should also build a dataclass for planes, like we did for cones. Such a class could also host alternative constructors, if necessary in the future. For planes, these already exist at some points, because we use two ways of specifying planes: with parameter d or with a point on the plane.

Fit to lines in surfaces

We would like to be able to (automatically) fit to lines (or maybe other possible carvings) in the surface that we selected using a filter. This could either be in 3D, or in 2D after projection to a fit surface (see #7). To do this, we will likely first need tools in ipyvolume to manually alter or initialize such lines or carvings. The automatic process could consist of fitting to groove/carving shapes, or, more easily, by using some measure based on distance from the projected shape, which could also possibly lead to a further filter step, followed by a simple line fit.

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.