Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
637fc758a7 | ||
| f90bf5c532 | |||
|
|
f2d1d02c48 | ||
| d04f100dfd |
@@ -9,7 +9,7 @@ bl_info = {
|
||||
"author": "Ma Nan",
|
||||
"description": "",
|
||||
"blender": (4, 0, 0),
|
||||
"version": (0, 2, 3),
|
||||
"version": (0, 2, 4),
|
||||
"location": "File -> Import",
|
||||
"warning": "",
|
||||
"category": "Node"
|
||||
|
||||
@@ -415,10 +415,13 @@ class ImportVolumeDataDialog(bpy.types.Operator):
|
||||
volume = np.amax(volume, -1)
|
||||
# volume = skimage.color.rgb2gray(volume)
|
||||
|
||||
if volume.dtype.kind == 'u':
|
||||
imax_in = np.iinfo(volume.dtype).max
|
||||
volume = np.multiply(volume, 255.0 / imax_in, dtype=np.float32)
|
||||
elif volume.dtype.kind == 'i':
|
||||
# if volume.dtype.kind == 'u':
|
||||
# imax_in = np.iinfo(volume.dtype).max
|
||||
# volume = np.multiply(volume, 255.0 / imax_in, dtype=np.float32)
|
||||
# elif volume.dtype.kind == 'i':
|
||||
# volume = volume.astype(np.float32)
|
||||
|
||||
# should not change any value!
|
||||
volume = volume.astype(np.float32)
|
||||
|
||||
print(f"Resampling...")
|
||||
@@ -684,15 +687,15 @@ class ImportVolumeData():
|
||||
|
||||
class ImportAsScalarLayer(bpy.types.Operator, ImportVolumeData):
|
||||
bl_idname = "bioxelnodes.import_as_scalar_layer"
|
||||
bl_label = "Import as Scale Layer"
|
||||
bl_description = "Import Volume Data to Container as Scale Layer"
|
||||
bl_label = "Import as Scalar"
|
||||
bl_description = "Import Volume Data to Container as Scalar"
|
||||
read_as = "scalar"
|
||||
|
||||
|
||||
class ImportAsLabelLayer(bpy.types.Operator, ImportVolumeData):
|
||||
bl_idname = "bioxelnodes.import_as_label_layer"
|
||||
bl_label = "Import as Label Layer"
|
||||
bl_description = "Import Volume Data to Container as Label Layer"
|
||||
bl_label = "Import as Labels"
|
||||
bl_description = "Import Volume Data to Container as Label"
|
||||
read_as = "labels"
|
||||
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ def get_label_layer_selection(self, context):
|
||||
# ) # type: ignore
|
||||
|
||||
# scalar_layer: bpy.props.EnumProperty(
|
||||
# name="Scaler Layer",
|
||||
# name="Scalar Layer",
|
||||
# items=get_scalar_layer_selection
|
||||
# ) # type: ignore
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ schema_version = "1.0.0"
|
||||
# Example of manifest file for a Blender extension
|
||||
# Change the values according to your extension
|
||||
id = "bioxelnodes"
|
||||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
name = "Bioxel Nodes"
|
||||
tagline = "For scientific volumetric data visualization in Blender"
|
||||
maintainer = "Ma Nan <icrdr2010@outlook.com>"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "bioxelnodes"
|
||||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
description = ""
|
||||
authors = ["Ma Nan <icrdr2010@outlook.com>"]
|
||||
license = "MIT"
|
||||
|
||||
Reference in New Issue
Block a user