Skip to content

Commit

Permalink
debugged mask.py only template averaging
Browse files Browse the repository at this point in the history
  • Loading branch information
riddhishb committed Aug 2, 2016
1 parent fd0bb75 commit 2aed020
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dipy/segment/mask.py
Expand Up @@ -376,14 +376,14 @@ def template_only_averaging(input_data, template_data, template_mask,
patch_size = patch_radius**3
output_mask = np.zeros(input_data.shape)
output_data = np.ones(input_data.shape, dtype = np.float64) * input_data

# print(template_mask.shape)
for i in range(patch_radius, n0 - patch_radius):
for j in range(patch_radius, n1 - patch_radius):
for k in range(patch_radius, n2 - patch_radius):

mask_patch = template_mask[i - patch_radius, i + patch_radius + 1,
j - patch_radius, j + patch_radius + 1,
k - patch_radius, k + patch_radius + 1]
mask_patch = template_mask[i - patch_radius : i + patch_radius + 1,
j - patch_radius : j + patch_radius + 1,
k - patch_radius : k + patch_radius + 1]

percent = np.double(np.sum(mask_patch)) / np.double(patch_size)

Expand Down

0 comments on commit 2aed020

Please sign in to comment.