himena.standards.model_meta
ArrayMeta
Preset for describing an array metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axes
|
list[DimAxis] | None
|
Axes of the array. |
None
|
current_indices
|
tuple[Optional[int], ...] | None
|
Current slice indices to render the array in GUI. |
None
|
selections
|
list[tuple[tuple[int, int], tuple[int, int]]]
|
Selections of the array. This attribute should be any sliceable objects that can passed to the backend array object. |
<dynamic>
|
unit
|
str | None
|
Unit of the array values. |
None
|
Source code in src\himena\standards\model_meta.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
without_selections()
Make a copy of the metadata without selections.
Source code in src\himena\standards\model_meta.py
221 222 223 |
|
DataFrameMeta
Preset for describing the metadata for a "dataframe" type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
current_position
|
list[int] | None
|
Current index position of (row, column) in the table. |
None
|
selections
|
list[tuple[tuple[int, int], tuple[int, int]]]
|
Table selections in the format of ((row_start, row_end), (col_start, col_end)), where the end index is exclusive, as is always the case for the Python indexing. |
<dynamic>
|
separator
|
str | None
|
Separator of the table. |
None
|
transpose
|
bool
|
Whether the table is transposed. |
False
|
Source code in src\himena\standards\model_meta.py
59 60 61 62 63 64 65 66 67 |
|
DataFramePlotMeta
Preset for describing the metadata for a "dataframe.plot" type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
current_position
|
list[int] | None
|
Current index position of (row, column) in the table. |
None
|
selections
|
list[tuple[tuple[int, int], tuple[int, int]]]
|
Table selections in the format of ((row_start, row_end), (col_start, col_end)), where the end index is exclusive, as is always the case for the Python indexing. |
<dynamic>
|
separator
|
str | None
|
Separator of the table. |
None
|
transpose
|
bool
|
Whether the table is transposed. |
False
|
plot_type
|
Literal[str, str]
|
Type of the plot. |
'line'
|
plot_color_cycle
|
list[str] | None
|
Color cycle of the plot. |
None
|
plot_background_color
|
str | None
|
Background color of the plot. |
'#FFFFFF'
|
rois
|
RoiListModel | Callable[list, RoiListModel]
|
Regions of interest. |
<dynamic>
|
Source code in src\himena\standards\model_meta.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
unwrap_rois()
Unwrap the lazy-evaluation of the ROIs.
Source code in src\himena\standards\model_meta.py
114 115 116 117 118 119 |
|
DictMeta
Parameters:
Name | Type | Description | Default |
---|---|---|---|
current_tab
|
str | None
|
Current tab name. |
None
|
Source code in src\himena\standards\model_meta.py
70 71 72 73 74 75 76 77 |
|
DimAxis
A dimension axis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the axis. |
required |
scale
|
float
|
Pixel scale of the axis. |
1.0
|
origin
|
float
|
Offset of the axis. |
0.0
|
unit
|
str
|
Unit of the axis spacing. |
''
|
labels
|
list[str]
|
Category labels of the axis. |
<dynamic>
|
default_label_format
|
str
|
Default format of the labels. |
'{:s}'
|
Source code in src\himena\standards\model_meta.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
|
get_label(index)
Return the label of the axis at the given index.
Source code in src\himena\standards\model_meta.py
183 184 185 186 187 188 189 190 |
|
FunctionMeta
Preset for describing the metadata for a "function" type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_code
|
str | None
|
Source code of the function. |
None
|
Source code in src\himena\standards\model_meta.py
80 81 82 83 84 85 86 |
|
ImageChannel
A channel in an image file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
colormap
|
str | None
|
Color map of the channel. |
None
|
contrast_limits
|
tuple[float, float] | None
|
Contrast limits of the channel. |
None
|
visible
|
bool
|
Whether the channel is visible. |
True
|
Source code in src\himena\standards\model_meta.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
default()
classmethod
Return a default channel (also used for mono-channel images).
Source code in src\himena\standards\model_meta.py
143 144 145 146 |
|
with_colormap(colormap)
Set the colormap of the channel.
Source code in src\himena\standards\model_meta.py
148 149 150 |
|
ImageMeta
Preset for describing an image file metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axes
|
list[DimAxis] | None
|
Axes of the array. |
None
|
current_indices
|
tuple[Optional[int], ...] | None
|
Current slice indices to render the array in GUI. |
None
|
selections
|
list[tuple[tuple[int, int], tuple[int, int]]]
|
Selections of the array. This attribute should be any sliceable objects that can passed to the backend array object. |
<dynamic>
|
unit
|
str | None
|
Unit of the array values. |
None
|
channels
|
list[ImageChannel]
|
Channels of the image. At least one channel is required. |
[ImageChannel(colormap='gray', contrast_limits=None, visible=True)]
|
channel_axis
|
int | None
|
Channel axis of the image. |
None
|
is_rgb
|
bool
|
Whether the image is RGB. |
False
|
current_roi
|
RoiModel | int | None
|
Current region of interest |
None
|
current_roi_index
|
int | None
|
Current index of the ROI in the |
None
|
rois
|
RoiListModel | Callable[list, RoiListModel]
|
Regions of interest. |
<dynamic>
|
interpolation
|
str | None
|
Interpolation method. |
None
|
skip_image_rerendering
|
bool
|
Skip image rerendering when the model is passed to the |
False
|
more_metadata
|
Any | None
|
More metadata if exists. |
None
|
Source code in src\himena\standards\model_meta.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 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 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
|
colormap
property
writable
Return the colormap of the first visible channel.
contrast_limits
property
writable
Return the contrast limits of the first visible channel.
get_one_axis(index, value)
Drop an axis by index for the array slicing arr[..., value, ...].
Source code in src\himena\standards\model_meta.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
|
unwrap_rois()
Unwrap the lazy-evaluation of the ROIs.
Source code in src\himena\standards\model_meta.py
288 289 290 291 292 293 |
|
with_current_roi(roi)
Set the current ROI.
Source code in src\himena\standards\model_meta.py
279 280 281 282 283 284 285 286 |
|
ImageRoisMeta
Preset for describing an image-rois metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selections
|
list[int]
|
Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. |
<dynamic>
|
axes
|
list[DimAxis] | None
|
Axes of the ROIs. |
None
|
Source code in src\himena\standards\model_meta.py
389 390 391 392 393 394 395 |
|
ListMeta
Preset for describing a metadata for a list-like object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selections
|
list[int]
|
Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. |
<dynamic>
|
Source code in src\himena\standards\model_meta.py
383 384 385 386 |
|
TableMeta
Preset for describing the metadata for a "table" type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
current_position
|
list[int] | None
|
Current index position of (row, column) in the table. |
None
|
selections
|
list[tuple[tuple[int, int], tuple[int, int]]]
|
Table selections in the format of ((row_start, row_end), (col_start, col_end)), where the end index is exclusive, as is always the case for the Python indexing. |
<dynamic>
|
separator
|
str | None
|
Separator of the table. |
None
|
Source code in src\himena\standards\model_meta.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
TextMeta
Preset for describing the metadata for a "text" type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
language
|
str | None
|
Language of the text file. |
None
|
spaces
|
int
|
Number of spaces for indentation. |
4
|
selection
|
tuple[int, int] | None
|
Selection range. |
None
|
font_family
|
str | None
|
Font family. |
None
|
font_size
|
float
|
Font size. |
10
|
encoding
|
str | None
|
Encoding of the text file. |
None
|
Source code in src\himena\standards\model_meta.py
28 29 30 31 32 33 34 35 36 37 38 39 |
|