Exemple #1
0
def set_t2_value():
    if get_slicer_state('t2') is not None:
        x, y, z = bpy.context.scene.voxel_x, bpy.context.scene.voxel_y, bpy.context.scene.voxel_z
        t2_data = _addon().get_slicer_state('t2').data
        x, y, z = mu.in_mat(x, y, z, t2_data)
        bpy.context.scene.t2_value = t2_data[x, y, z]
    else:
        bpy.context.scene.t2_value = 0
Exemple #2
0
def set_ct_intensity():
    if get_slicer_state('ct') is not None:
        x, y, z = bpy.context.scene.ct_voxel_x, bpy.context.scene.ct_voxel_y, bpy.context.scene.ct_voxel_z
        ct_data = _addon().get_slicer_state('ct').data
        x, y, z = mu.in_mat(x, y, z, ct_data)
        bpy.context.scene.ct_intensity = ct_data[x, y, z]
    else:
        bpy.context.scene.ct_intensity = 0