Commit ba2e8753fcf2b560cf8865aceca7ece1ef826aef
1 parent
d0d3a69b
Exists in
master
Removed prints
Showing
3 changed files
with
0 additions
and
29 deletions
Show diff stats
invesalius/control.py
... | ... | @@ -273,7 +273,6 @@ class Controller(): |
273 | 273 | def ShowDialogCloseProject(self): |
274 | 274 | session = ses.Session() |
275 | 275 | st = session.project_status |
276 | - print('Status', st, type(st)) | |
277 | 276 | if st == const.PROJ_CLOSE: |
278 | 277 | return -1 |
279 | 278 | try: |
... | ... | @@ -476,7 +475,6 @@ class Controller(): |
476 | 475 | def ImportMedicalImages(self, directory, gui=True): |
477 | 476 | patients_groups = dcm.GetDicomGroups(directory) |
478 | 477 | name = directory.rpartition('\\')[-1].split('.') |
479 | - print("patients: ", patients_groups) | |
480 | 478 | |
481 | 479 | if len(patients_groups): |
482 | 480 | # OPTION 1: DICOM |
... | ... | @@ -881,7 +879,6 @@ class Controller(): |
881 | 879 | def OnOpenDicomGroup(self, group, interval, file_range): |
882 | 880 | dicom = group.GetDicomSample() |
883 | 881 | samples_per_pixel = dicom.image.samples_per_pixel |
884 | - print("\n\n\n\n{}\n\n\n".format(samples_per_pixel)) | |
885 | 882 | if samples_per_pixel == 3: |
886 | 883 | dlg = wx.MessageDialog(wx.GetApp().GetTopWindow(), _("this is a rgb image, it's necessary to convert to grayscale to open on invesalius.\ndo you want to convert it to grayscale?"), _("Confirm"), wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION) |
887 | 884 | if dlg.ShowModal() != wx.ID_YES: |
... | ... | @@ -926,8 +923,6 @@ class Controller(): |
926 | 923 | xyspacing = dicom.image.spacing |
927 | 924 | orientation = dicom.image.orientation_label |
928 | 925 | samples_per_pixel = dicom.image.samples_per_pixel |
929 | - print("\n\n\n\n{}\n\n\n".format(samples_per_pixel)) | |
930 | - | |
931 | 926 | |
932 | 927 | wl = float(dicom.image.level) |
933 | 928 | ww = float(dicom.image.window) |
... | ... | @@ -968,11 +963,8 @@ class Controller(): |
968 | 963 | elif orientation == 'SAGITTAL': |
969 | 964 | spacing = zspacing, xyspacing[1], xyspacing[0] |
970 | 965 | else: |
971 | - print(">>>>>> filelist", filelist) | |
972 | 966 | self.matrix, scalar_range, spacing, self.filename = image_utils.dcmmf2memmap(filelist[0], orientation) |
973 | 967 | |
974 | - print(">>>>>> spacing", spacing) | |
975 | - | |
976 | 968 | self.Slice = sl.Slice() |
977 | 969 | self.Slice.matrix = self.matrix |
978 | 970 | self.Slice.matrix_filename = self.filename | ... | ... |
invesalius/data/imagedata_utils.py
... | ... | @@ -362,9 +362,6 @@ def bitmap2memmap(files, slice_size, orientation, spacing, resolution_percentage |
362 | 362 | |
363 | 363 | for n, f in enumerate(files): |
364 | 364 | image_as_array = bitmap_reader.ReadBitmap(f) |
365 | - | |
366 | - print(image_as_array.dtype) | |
367 | - | |
368 | 365 | image = converters.to_vtk( |
369 | 366 | image_as_array, |
370 | 367 | spacing=spacing, |
... | ... | @@ -428,7 +425,6 @@ def bitmap2memmap(files, slice_size, orientation, spacing, resolution_percentage |
428 | 425 | matrix.flush() |
429 | 426 | scalar_range = min_scalar, max_scalar |
430 | 427 | |
431 | - print("MATRIX", matrix.shape) | |
432 | 428 | return matrix, scalar_range, temp_file |
433 | 429 | |
434 | 430 | |
... | ... | @@ -488,7 +484,6 @@ def dcmmf2memmap(dcm_file, orientation): |
488 | 484 | np_image = converters.gdcm_to_numpy(image, pf.GetSamplesPerPixel() == 1) |
489 | 485 | if samples_per_pixel == 3: |
490 | 486 | np_image = image_normalize(rgb2gray(np_image), 0, 255) |
491 | - print("\n\n\nnp_image.min = {} - np_image.max = {}\n\n\n".format(np_image.min(), np_image.max())) | |
492 | 487 | temp_file = tempfile.mktemp() |
493 | 488 | matrix = numpy.memmap(temp_file, mode="w+", dtype="int16", shape=np_image.shape) |
494 | 489 | z, y, x = np_image.shape | ... | ... |
invesalius/gui/data_notebook.py
... | ... | @@ -473,11 +473,6 @@ class MasksListCtrlPanel(InvListCtrl): |
473 | 473 | """ |
474 | 474 | selected_items = self.GetSelected() |
475 | 475 | |
476 | - print("mask_list_index = {}".format(self.mask_list_index)) | |
477 | - mask_dict = project.Project().mask_dict | |
478 | - for i in mask_dict: | |
479 | - print("{} - {}".format(i, mask_dict[i].index)) | |
480 | - | |
481 | 476 | if selected_items: |
482 | 477 | Publisher.sendMessage('Remove masks', mask_indexes=selected_items) |
483 | 478 | else: |
... | ... | @@ -488,7 +483,6 @@ class MasksListCtrlPanel(InvListCtrl): |
488 | 483 | self.imagelist.RemoveAll() |
489 | 484 | self.__init_image_list() |
490 | 485 | |
491 | - print("mask_list_index = {}".format(self.mask_list_index)) | |
492 | 486 | new_dict = {} |
493 | 487 | self.current_index = 0 |
494 | 488 | self.mask_list_index = {} |
... | ... | @@ -500,11 +494,6 @@ class MasksListCtrlPanel(InvListCtrl): |
500 | 494 | if mask.is_shown: |
501 | 495 | self.current_index = n |
502 | 496 | |
503 | - | |
504 | - for i in mask_dict: | |
505 | - print("{} - {}".format(i, mask_dict[i].index)) | |
506 | - print("mask_list_index = {}".format(self.mask_list_index)) | |
507 | - | |
508 | 497 | self.SetItemImage(self.current_index, 1) |
509 | 498 | Publisher.sendMessage('Change mask selected', index=self.current_index) |
510 | 499 | Publisher.sendMessage('Show mask', index=self.current_index, value=1) |
... | ... | @@ -515,7 +504,6 @@ class MasksListCtrlPanel(InvListCtrl): |
515 | 504 | self.mask_list_index = {} |
516 | 505 | |
517 | 506 | def OnChangeCurrentMask(self, index): |
518 | - print("index = {}".format(index)) | |
519 | 507 | try: |
520 | 508 | self.SetItemImage(index, 1) |
521 | 509 | self.current_index = index |
... | ... | @@ -586,7 +574,6 @@ class MasksListCtrlPanel(InvListCtrl): |
586 | 574 | def InsertNewItem(self, index=0, label=_("Mask"), threshold="(1000, 4500)", colour=None): |
587 | 575 | image = self.CreateColourBitmap(colour) |
588 | 576 | image_index = self.imagelist.Add(image) |
589 | - print("image_index = {}".format(image_index)) | |
590 | 577 | self.InsertItem(index, "") |
591 | 578 | self.SetItemImage(index, 0) |
592 | 579 | self.SetItem(index, 1, label, imageId=image_index) |
... | ... | @@ -599,7 +586,6 @@ class MasksListCtrlPanel(InvListCtrl): |
599 | 586 | |
600 | 587 | def AddMask(self, mask): |
601 | 588 | image_index = len(self.mask_list_index) |
602 | - # print("image_index = {}".format(image_index)) | |
603 | 589 | self.mask_list_index[image_index] = mask.index |
604 | 590 | self.InsertNewItem(image_index, mask.name, str(mask.threshold_range), mask.colour) |
605 | 591 | |
... | ... | @@ -607,7 +593,6 @@ class MasksListCtrlPanel(InvListCtrl): |
607 | 593 | self.SetItem(index, 2, str(threshold_range)) |
608 | 594 | |
609 | 595 | def EditMaskColour(self, index, colour): |
610 | - print("EDITMASKCOLOUR {}".format(index)) | |
611 | 596 | image = self.CreateColourBitmap(colour) |
612 | 597 | # image_index = self.mask_list_index[index] |
613 | 598 | self.imagelist.Replace(index + 2, image) |
... | ... | @@ -974,7 +959,6 @@ class SurfacesListCtrlPanel(InvListCtrl): |
974 | 959 | |
975 | 960 | def UpdateItemInfo(self, index=0, label="Surface 1", volume="0 mm3", |
976 | 961 | area="0 mm2", transparency="0%%", colour=None): |
977 | - print("UpdateItemInfo", index) | |
978 | 962 | # TODO: Retornar esse codigo |
979 | 963 | self.SetItem(index, 1, label, |
980 | 964 | imageId = self.surface_list_index[index]) | ... | ... |