diff --git a/PyNutil/coordinate_extraction.py b/PyNutil/coordinate_extraction.py index 761d01e..4559ceb 100644 --- a/PyNutil/coordinate_extraction.py +++ b/PyNutil/coordinate_extraction.py @@ -246,7 +246,6 @@ def load_segmentation(segmentation_path: str): def detect_pixel_id(segmentation: np.array): """Remove the background from the segmentation and return the pixel id.""" segmentation_no_background = segmentation[~np.all(segmentation == 0, axis=2)] - print("length of non background pixels: ", len(segmentation_no_background)) pixel_id = segmentation_no_background[0] print("detected pixel_id: ", pixel_id) return pixel_id diff --git a/PyNutil/main.py b/PyNutil/main.py index 02df14d..0feb176 100644 --- a/PyNutil/main.py +++ b/PyNutil/main.py @@ -245,8 +245,6 @@ def quantify_coordinates(self): per_section_df = [] current_centroids = None current_points = None - print("region areas list") - print(self.region_areas_list) for pl, cl, ra in zip( self.points_len, self.centroids_len, self.region_areas_list ): @@ -257,8 +255,6 @@ def quantify_coordinates(self): current_df = pixel_count_per_region( current_points, current_centroids, self.atlas_labels ) - print("current df", current_df) - # create the df for section report and all report # pixel_count_per_region returns a df with idx, pixel count, name and RGB. # ra is region area list from diff --git a/PyNutil/read_and_write.py b/PyNutil/read_and_write.py index be1f84e..c243c57 100644 --- a/PyNutil/read_and_write.py +++ b/PyNutil/read_and_write.py @@ -17,7 +17,6 @@ def load_visualign_json(filename): slices = vafile["sections"] vafile["slices"] = slices for slice in slices: - print(slice) slice["nr"] = int(re.search(r"_s(\d+)", slice["filename"]).group(1)) if "ouv" in slice: slice["anchoring"] = slice["ouv"] @@ -108,7 +107,6 @@ def code(): if "SegRLEv1" != f.read(8).decode(): raise "Header mismatch" atlas = f.read(code()).decode() - print(f"Target atlas: {atlas}") codes = [code() for x in range(code())] w = code() h = code() @@ -158,9 +156,6 @@ def files_in_directory(directory): list_of_files = [] for file in os.scandir(directory): if file.path.endswith(".flat") and file.is_file: - # print(filename.path) - # newfilename, file_ext = os.path.splitext(filename) - # print(newfilename) filename = os.path.basename(file) newfilename, file_ext = os.path.splitext(filename) list_of_files.append(newfilename) diff --git a/PyNutil/visualign_deformations.py b/PyNutil/visualign_deformations.py index 75f9fa2..5de1658 100644 --- a/PyNutil/visualign_deformations.py +++ b/PyNutil/visualign_deformations.py @@ -154,8 +154,6 @@ def __init__(self, a, b, c, vlist, elist): self.decomp = inv3x3( [[bx - ax, by - ay, 0], [cx - ax, cy - ay, 0], [ax, ay, 1]] ) - if self.decomp == None: - print("e") a2 = distsquare(bx, by, cx, cy) b2 = distsquare(ax, ay, cx, cy) c2 = distsquare(ax, ay, bx, by) @@ -211,8 +209,6 @@ def inforward_vec(self, x, y, xPrime, yPrime): ) def intriangle_vec(self, x, y, xPrime, yPrime): - if self.decomp is None: - print("e") uv1 = rowmul3_vec(x, y, self.decomp) # also compute the next step, since it uses the parameters of this triangle ok = ( diff --git a/scripts/waln_to_json.py b/scripts/waln_to_json.py index 342c30f..237c781 100644 --- a/scripts/waln_to_json.py +++ b/scripts/waln_to_json.py @@ -16,7 +16,6 @@ def waln_to_json(filename): vafile["slices"] = slices for slice in slices: - print(slice) # this prints info from waln to screen. if "filename" in slice: base_name = os.path.basename(slice["filename"]).split('.')[0] new_filename = base_name + '.png' @@ -24,18 +23,6 @@ def waln_to_json(filename): slice["nr"] = int(re.search(r"_s(\d+)", slice["filename"]).group(1)) if "ouv" in slice: slice["anchoring"] = slice["ouv"] - - ''' - for slice in slices: - print(slice) # this prints info from waln to screen. - if "filename" in slice: - name, old_extension = slice["filename"].rsplit('.',1) - new_filename = name + '.png' - slice["filename"] = new_filename - slice["nr"] = int(re.search(r"_s(\d+)", slice["filename"]).group(1)) - if "ouv" in slice: - slice["anchoring"] = slice["ouv"] - ''' name = os.path.basename(filename) va_compat_file = { @@ -51,8 +38,6 @@ def waln_to_json(filename): #json.dump(va_compat_file, f, indent=4) json.dump(va_compat_file, f, indent=4) - print("Waln or Wwrp converted successfully to JSON") - else: pass