OrsDatasetSampler¶
Plugin for sampling StructuredGrid (up-sampling or down-sampling)
- author:
Dragonfly Team
- contact:
- email:
- organization:
Comet Technologies Canada Inc.
- address:
460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7
- copyright:
Comet Technologies Canada Inc. All rights reserved 2023.
- date:
Feb 17 2016 14:44
- dragonflyVersion:
3.0
- UUID:
ac240e0c761111e7b7ec448a5b5d70c0
Class Code¶
- class OrsPythonPlugins.OrsDatasetSampler.OrsDatasetSampler.OrsDatasetSampler(*args, **kwargs)¶
- classmethod getMainFormClass()¶
Gets the class of the main form
- Returns:
output –
- orsCurrentDisplayChange()¶
When the current view changes, let the mainform possibly react.
- interfacemethod sampleDatasetInSpacing(dataset: StructuredGrid, xSpacing: float, ySpacing: float, zSpacing: float, samplingType: CxvSamplingMethod, createNewDataset: bool) StructuredGrid¶
Samples the source structured grid.
- Parameters:
dataset (ORSModel.ors.StructuredGrid) – the dataset to sample
xSpacing (float) – new X spacing of the sampled dataset
ySpacing (float) – new Y spacing of the sampled dataset
zSpacing (float) – new Z spacing of the sampled dataset
samplingType (IntEnum CxvSamplingMethod) – sampling type (linear, nearest or cubic)
createNewDataset (bool) – if True, a new dataset will be generated. If False, the input dataset will be modified.
- Returns:
newDataset (ORSModel.ors.StructuredGrid) – sampled dataset. If createNewDataset is False, None is returned.
- interfacemethod sampleDatasetInVoxels(dataset: StructuredGrid, xSizeOutput: int, ySizeOutput: int, zSizeOutput: int, samplingType: CxvSamplingMethod, createNewDataset: bool) StructuredGrid¶
Samples the source structured grid.
- Parameters:
dataset (ORSModel.ors.StructuredGrid) – the dataset to sample
xSizeOutput (int) – xSize in voxels of the sampled dataset
ySizeOutput (int) – ySize in voxels of the sampled dataset
zSizeOutput (int) – zSize in voxels of the sampled dataset
samplingType (IntEnum CxvSamplingMethod) – sampling type (linear, nearest or cubic)
createNewDataset (bool) – if True, a new dataset will be generated. If False, the input dataset will be modified.
- Returns:
newDataset (ORSModel.ors.StructuredGrid) – sampled dataset. If createNewDataset is False, None is returned.