From 6063c678f39147b20224a217d1084006919421d0 Mon Sep 17 00:00:00 2001 From: tatiana Date: Fri, 19 Feb 2010 17:37:16 +0000 Subject: [PATCH] ENH: WW/WL slices initial value(fix #149) --- invesalius/reader/dicom_grouper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/invesalius/reader/dicom_grouper.py b/invesalius/reader/dicom_grouper.py index 3f14164..591e0d8 100644 --- a/invesalius/reader/dicom_grouper.py +++ b/invesalius/reader/dicom_grouper.py @@ -80,6 +80,7 @@ class DicomGroup: def AddSlice(self, dicom): if not self.dicom: self.dicom = dicom + pos = tuple(dicom.image.position) #Case to test: \other\higroma @@ -151,7 +152,9 @@ class DicomGroup: self.zspacing = 1 def GetDicomSample(self): - return self.dicom + size = len(self.slices_dict) + dicom = self.GetHandSortedList()[size/2] + return dicom class PatientGroup: def __init__(self): -- libgit2 0.21.2