Skip to content

Commit

Permalink
Update deps, adapt_object_mesh takes 4 params
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Dec 30, 2022
1 parent 9713a19 commit d60711b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Arguments to pass to `adapt_object_mesh`, which does mesh smoothing.
Use a larger value if the results are bumpy/voxelated in appearance.

```shell
extract_cp --adapt_object_mesh 1,100,1 /incoming /outgoing
extract_cp --adapt_object_mesh 0,100,0,0 /incoming /outgoing
```

#### `--inflate_to_sphere_implicit`
Expand Down
2 changes: 1 addition & 1 deletion extract_cp/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
help='Number of mincmorph iterations. Mincmorph is a mask preprocessing step '
'which repairs disconnected voxels. A larger value may improve results '
'for messy masks, but at the cost of accuracy.')
parser.add_argument('--adapt_object_mesh', dest='adapt_object_mesh', type=str, default='1,50,1',
parser.add_argument('--adapt_object_mesh', dest='adapt_object_mesh', type=str, default='0,50,0,0',
help='Parameters for adapt_object_mesh, which does mesh smoothing.')
parser.add_argument('--inflate_to_sphere_implicit', dest='inflate_to_sphere_implicit', type=str, default='200,200',
help='Parameters for inflate_to_sphere_implicit. Larger values are necessary '
Expand Down
6 changes: 3 additions & 3 deletions extract_cp/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class Parameters:
"""
side: SideStr
mincmorph_iterations: int
adapt_object_mesh: tuple[int, int, int]
adapt_object_mesh: tuple[int, int, int, int]
inflate_to_sphere_implicit: tuple[int, int]
keep_mask: bool
subsample: bool

def __post_init__(self):
if not len(self.adapt_object_mesh) == 3:
raise ValueError('adapt_object_mesh takes 3 parameters')
if not len(self.adapt_object_mesh) == 4:
raise ValueError('adapt_object_mesh takes 4 parameters')
if not len(self.inflate_to_sphere_implicit) == 2:
raise ValueError('inflate_to_sphere_implicit takes 2 parameters')

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
chris_plugin==0.0.17
pycivet==0.0.10
chris_plugin==0.1.2
pycivet==0.1.2
loguru==0.6.0

0 comments on commit d60711b

Please sign in to comment.