Skip to content

Commit 9930ea8

Browse files
anna-grimanna-grim
andauthored
bug: swc reader (#143)
Co-authored-by: anna-grim <[email protected]>
1 parent b1665b0 commit 9930ea8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/segmentation_skeleton_metrics/utils/swc_util.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,17 +512,17 @@ def process_content(self, content):
512512
513513
Returns
514514
-------
515-
tuple
516-
A tuple containing the following:
517-
- "content" (List[str]): lines from an SWC file after comments.
518-
- "offset" (Tuple[int]): offset used to shift coordinate.
515+
content : List[str]
516+
Lines from an SWC file after comments.
517+
offset : Tuple[int]
518+
Offset used to shift coordinate.
519519
"""
520520
offset = (0, 0, 0)
521521
for i, line in enumerate(content):
522522
if line.startswith("# OFFSET"):
523523
parts = line.split()
524524
offset = self.read_voxel(parts[2:5])
525-
if not line.startswith("#"):
525+
if not line.startswith("#") and len(line.strip()) > 0:
526526
return content[i:], offset
527527

528528
def read_voxel(self, xyz_str, offset):

0 commit comments

Comments
 (0)