fix: misspell of "scalar"

fix: not change raw value of data
This commit is contained in:
2024-07-04 15:02:17 +08:00
parent 78aba5394f
commit d04f100dfd
2 changed files with 13 additions and 10 deletions

View File

@@ -415,11 +415,14 @@ class ImportVolumeDataDialog(bpy.types.Operator):
volume = np.amax(volume, -1) volume = np.amax(volume, -1)
# volume = skimage.color.rgb2gray(volume) # volume = skimage.color.rgb2gray(volume)
if volume.dtype.kind == 'u': # if volume.dtype.kind == 'u':
imax_in = np.iinfo(volume.dtype).max # imax_in = np.iinfo(volume.dtype).max
volume = np.multiply(volume, 255.0 / imax_in, dtype=np.float32) # volume = np.multiply(volume, 255.0 / imax_in, dtype=np.float32)
elif volume.dtype.kind == 'i': # elif volume.dtype.kind == 'i':
volume = volume.astype(np.float32) # volume = volume.astype(np.float32)
# should not change any value!
volume = volume.astype(np.float32)
print(f"Resampling...") print(f"Resampling...")
volume = ski.resize(volume, volume = ski.resize(volume,
@@ -684,15 +687,15 @@ class ImportVolumeData():
class ImportAsScalarLayer(bpy.types.Operator, ImportVolumeData): class ImportAsScalarLayer(bpy.types.Operator, ImportVolumeData):
bl_idname = "bioxelnodes.import_as_scalar_layer" bl_idname = "bioxelnodes.import_as_scalar_layer"
bl_label = "Import as Scale Layer" bl_label = "Import as Scalar"
bl_description = "Import Volume Data to Container as Scale Layer" bl_description = "Import Volume Data to Container as Scalar"
read_as = "scalar" read_as = "scalar"
class ImportAsLabelLayer(bpy.types.Operator, ImportVolumeData): class ImportAsLabelLayer(bpy.types.Operator, ImportVolumeData):
bl_idname = "bioxelnodes.import_as_label_layer" bl_idname = "bioxelnodes.import_as_label_layer"
bl_label = "Import as Label Layer" bl_label = "Import as Labels"
bl_description = "Import Volume Data to Container as Label Layer" bl_description = "Import Volume Data to Container as Label"
read_as = "labels" read_as = "labels"

View File

@@ -178,7 +178,7 @@ def get_label_layer_selection(self, context):
# ) # type: ignore # ) # type: ignore
# scalar_layer: bpy.props.EnumProperty( # scalar_layer: bpy.props.EnumProperty(
# name="Scaler Layer", # name="Scalar Layer",
# items=get_scalar_layer_selection # items=get_scalar_layer_selection
# ) # type: ignore # ) # type: ignore