4 Commits

Author SHA1 Message Date
Ma Nan
637fc758a7 Merge pull request #25 from OmooLab/feature/dev
chore: change version
2024-07-04 15:06:10 +08:00
f90bf5c532 chore: change version 2024-07-04 15:05:22 +08:00
Ma Nan
f2d1d02c48 Merge pull request #24 from OmooLab/feature/dev
fix: misspell of "scalar"
2024-07-04 15:03:58 +08:00
d04f100dfd fix: misspell of "scalar"
fix: not change raw value of data
2024-07-04 15:02:17 +08:00
5 changed files with 16 additions and 13 deletions

View File

@@ -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"

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

View File

@@ -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>"

View File

@@ -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"