Skip to content

Commit

Permalink
feat: apply Tier4Viewer in Tier4 rendering
Browse files Browse the repository at this point in the history
Signed-off-by: ktro2828 <[email protected]>
  • Loading branch information
ktro2828 committed Oct 22, 2024
1 parent 8aacfe1 commit 8179df6
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 275 deletions.
13 changes: 11 additions & 2 deletions t4_devkit/dataclass/pointcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import struct
from abc import abstractmethod
from dataclasses import dataclass
from typing import TYPE_CHECKING, ClassVar
from typing import TYPE_CHECKING, ClassVar, TypeVar

import numpy as np

Expand All @@ -12,7 +12,13 @@

from t4_devkit.typing import NDArrayFloat, NDArrayU8

__all__ = ["PointCloud", "LidarPointCloud", "RadarPointCloud", "SegmentationPointCloud"]
__all__ = [
"PointCloud",
"LidarPointCloud",
"RadarPointCloud",
"SegmentationPointCloud",
"PointCloudLike",
]


@dataclass
Expand Down Expand Up @@ -196,3 +202,6 @@ def from_file(cls, point_filepath: str, label_filepath: str) -> Self:
points = scan.reshape((-1, 5))[:, : cls.num_dims()]
labels = np.fromfile(label_filepath, dtype=np.uint8)
return cls(points.T, labels)


PointCloudLike = TypeVar("PointCloudLike", bound=PointCloud)
Loading

0 comments on commit 8179df6

Please sign in to comment.