Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HastingsGreer authored Apr 13, 2024
1 parent 2204212 commit d3b1fa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unigradicon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def quantile(arr: torch.Tensor, q):
def preprocess(image):
image = itk.CastImageFilter[type(image), itk.Image[itk.F, 3]].New()(image)
min_ = quantile(torch.tensor(np.array(image)), .01).item()
image = itk.shift_scale_image_filter(image, shift=-min_, scale = 0)
image = itk.shift_scale_image_filter(image, shift=-min_, scale = 1)
max_ = quantile(torch.tensor(np.array(image)), .99).item()
image = itk.shift_scale_image_filter(image, shift=0, scale = 1/max_)
return image
Expand Down

0 comments on commit d3b1fa5

Please sign in to comment.