-
Notifications
You must be signed in to change notification settings - Fork 12
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 #162 from eEcoLiDAR/development
Development
- Loading branch information
Showing
97 changed files
with
3,002 additions
and
2,171 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
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 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 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 |
---|---|---|
@@ -1 +1,7 @@ | ||
from ._version import __version__ | ||
|
||
from laserchicken.compute_neighbors import compute_neighborhoods | ||
from laserchicken.feature_extractor.feature_extraction import compute_features, register_new_feature_extractor | ||
from laserchicken.io.load import load | ||
from laserchicken.io.export import export | ||
from laserchicken.build_volume import build_volume |
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 |
---|---|---|
@@ -1 +1,6 @@ | ||
__version__ = '0.3.2' | ||
import os | ||
|
||
with open(os.path.join(os.path.dirname(__file__), '_version.txt'), | ||
'r') as f: | ||
version = f.read() | ||
__version__ = version.strip() |
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 @@ | ||
0.4.0 |
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,40 @@ | ||
import inspect | ||
|
||
import laserchicken | ||
from laserchicken.volume_specification import Volume | ||
|
||
|
||
def create_volume_map(): | ||
""" Generate map of volume types that are available """ | ||
volume_map = {} | ||
for name, obj in inspect.getmembers(laserchicken.volume_specification): | ||
if inspect.isclass(obj) and issubclass(obj, Volume) and obj is not Volume: | ||
volume_map[obj.TYPE] = obj | ||
return volume_map | ||
|
||
|
||
VOLUMES = create_volume_map() | ||
|
||
|
||
def build_volume(volume_type, *args, **kwargs): | ||
""" | ||
Return volume object from the volume name and the corresponding parameters | ||
Example: | ||
>>>> vol = build_volume('sphere', radius=5) | ||
:param volume_type: name corresponding to the | ||
:param args: optional non-keyword args to build the volume | ||
:param kwargs: optional keyword args to build the volume | ||
:return: | ||
""" | ||
_volume_type = volume_type.lower() | ||
_verify_volume_type(_volume_type) | ||
volume_builder = VOLUMES[_volume_type] | ||
return volume_builder(*args, **kwargs) | ||
|
||
|
||
def _verify_volume_type(volume_type): | ||
if volume_type not in VOLUMES.keys(): | ||
raise ValueError('Unknown volume specified: {}. Available volumes are: {}' | ||
.format(volume_type, ', '.join(VOLUMES.keys()))) |
Oops, something went wrong.