From 1193e5cf3d0a86807a9bc69fff4fb40e4654be57 Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Mon, 27 Jul 2009 14:11:44 +0000 Subject: [PATCH] FIX: fixed bug gradient editor initial value incorrect --- invesalius/reader/dicom_reader.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/invesalius/reader/dicom_reader.py b/invesalius/reader/dicom_reader.py index 34b8963..4eeff7f 100644 --- a/invesalius/reader/dicom_reader.py +++ b/invesalius/reader/dicom_reader.py @@ -27,14 +27,15 @@ import dicom import dicom_grouper from data.imagedata_utils import ResampleImage2D +import constants as const def LoadImages(dir_): # TODO!!! SUPER GAMBIARRA!!! DO THIS BETTER - if 0: - fow = vtk.vtkFileOutputWindow() - fow.SetFileName('vtk_output.txt') - ow = vtk.vtkOutputWindow () - ow.SetInstance (fow) + #if 0: + fow = vtk.vtkFileOutputWindow() + fow.SetFileName('vtk_output.txt') + ow = vtk.vtkOutputWindow () + ow.SetInstance (fow) dcm_files, acquisition_modality = GetDicomFiles(dir_) @@ -123,6 +124,10 @@ def LoadImages(dir_): img_axial.Update() + thresh_min, thresh_max = img_axial.GetScalarRange() + const.THRESHOLD_INVALUE = thresh_max + const.THRESHOLD_OUTVALUE = thresh_min + return img_axial, acquisition_modality, tilt def GetDicomFiles(path, recursive = False): -- libgit2 0.21.2