hal
plantimager.hal Link
AbstractCNC Link
AbstractCNC()
Abstract CNC class.
Source code in plantimager/hal.py
69 70 |
|
AbstractCamera Link
Bases: ABC
Abstract Camera class.
grab
abstractmethod
Link
grab(idx, metadata=None)
Grab data with an id and metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idx
|
int
|
Id of the data |
required |
metadata
|
dict
|
Dictionary of metadata associated to the camera data. |
None
|
Returns:
Type | Description |
---|---|
DataItem
|
The image data. |
Source code in plantimager/hal.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
AbstractScanner Link
AbstractScanner()
An abstract scanner class.
Attributes:
Name | Type | Description |
---|---|---|
scan_count |
int
|
Incremental counter saving last picture index for the |
exact_pose |
bool
|
States whether the camera pose is exact or approximate. |
ext |
str
|
Extension to use to write image data from the |
Source code in plantimager/hal.py
165 166 167 168 169 |
|
channels
abstractmethod
Link
channels()
Channel names associated to data from grab
method.
See Also
plantimager.hal.AbstractCamera
Source code in plantimager/hal.py
203 204 205 206 207 208 209 210 211 |
|
get_position
abstractmethod
Link
get_position()
Get the current position of the scanner.
Source code in plantimager/hal.py
171 172 173 174 |
|
get_target_pose Link
get_target_pose(elt)
Get the target pose from a given path element (singleton).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elt
|
PathElement
|
The path element to reach. |
required |
Returns:
Type | Description |
---|---|
Pose
|
The target pose to reach. |
Notes
If a Pose
attribute is missing from the given path element, we use the value from the previous pose.
Source code in plantimager/hal.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
|
grab
abstractmethod
Link
grab(idx, metadata)
Grab data with an id and metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idx
|
int
|
Id of the data |
required |
metadata
|
dict
|
Dictionary of metadata associated to the camera data. |
required |
Returns:
Type | Description |
---|---|
DataItem
|
The image data & metadata. |
See Also
plantimager.hal.AbstractCamera
Source code in plantimager/hal.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
inc_count Link
inc_count()
Incremental counter used to return a picture index for the grab
method.
Source code in plantimager/hal.py
213 214 215 216 217 |
|
scan Link
scan(path, fileset)
Performs a scan, that is a series of movements and image acquisitions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path
|
The path to follows to acquire image. |
required |
fileset
|
Fileset
|
The output fileset used to save the image. |
required |
Source code in plantimager/hal.py
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
scan_at Link
scan_at(pose, exact_pose=True, metadata=None)
Move to a given position and take a picture.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pose
|
Pose
|
The position of the camera to take the picture. |
required |
exact_pose
|
bool
|
If |
True
|
metadata
|
dict
|
The dictionary of metadata to associate to this picture. |
None
|
Returns:
Type | Description |
---|---|
DataItem
|
The picture data & metadata. |
Source code in plantimager/hal.py
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
|
set_position
abstractmethod
Link
set_position(pose)
Set the position of the scanner from a 5D Pose.
Source code in plantimager/hal.py
176 177 178 179 |
|