Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
637fc758a7 | ||
| f90bf5c532 | |||
|
|
f2d1d02c48 | ||
| d04f100dfd |
@@ -9,7 +9,7 @@ bl_info = {
|
|||||||
"author": "Ma Nan",
|
"author": "Ma Nan",
|
||||||
"description": "",
|
"description": "",
|
||||||
"blender": (4, 0, 0),
|
"blender": (4, 0, 0),
|
||||||
"version": (0, 2, 3),
|
"version": (0, 2, 4),
|
||||||
"location": "File -> Import",
|
"location": "File -> Import",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
"category": "Node"
|
"category": "Node"
|
||||||
|
|||||||
@@ -415,10 +415,13 @@ 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)
|
||||||
|
|
||||||
|
# should not change any value!
|
||||||
volume = volume.astype(np.float32)
|
volume = volume.astype(np.float32)
|
||||||
|
|
||||||
print(f"Resampling...")
|
print(f"Resampling...")
|
||||||
@@ -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"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ schema_version = "1.0.0"
|
|||||||
# Example of manifest file for a Blender extension
|
# Example of manifest file for a Blender extension
|
||||||
# Change the values according to your extension
|
# Change the values according to your extension
|
||||||
id = "bioxelnodes"
|
id = "bioxelnodes"
|
||||||
version = "0.2.3"
|
version = "0.2.4"
|
||||||
name = "Bioxel Nodes"
|
name = "Bioxel Nodes"
|
||||||
tagline = "For scientific volumetric data visualization in Blender"
|
tagline = "For scientific volumetric data visualization in Blender"
|
||||||
maintainer = "Ma Nan <icrdr2010@outlook.com>"
|
maintainer = "Ma Nan <icrdr2010@outlook.com>"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "bioxelnodes"
|
name = "bioxelnodes"
|
||||||
version = "0.2.3"
|
version = "0.2.4"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Ma Nan <icrdr2010@outlook.com>"]
|
authors = ["Ma Nan <icrdr2010@outlook.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
Reference in New Issue
Block a user