Skip to content
Snippets Groups Projects
Commit a8adf6e8 authored by polarbean's avatar polarbean
Browse files

removed excessive print statements

parent b3285a1b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -245,8 +245,6 @@ class PyNutil:
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 @@ class PyNutil:
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
......
......@@ -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 flat_to_array(file, labelfile):
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)
......
......@@ -154,8 +154,6 @@ class Triangle:
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 @@ class Triangle:
)
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 = (
......
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment