-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dbodor/prospector fixes #95
base: dbodor/tdd_collapsed
Are you sure you want to change the base?
Changes from 6 commits
78d17ab
b0f086f
7391a32
c8b28de
d115fd7
631c9e6
e5e932c
b65d2ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,7 +110,7 @@ def make_parser(): | |
return parser | ||
|
||
|
||
def main(argv): | ||
def main(argv): #pylint: disable=unused-argument | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it required to pass an argument here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is how I am used to dealing with command-line argparse. I suppose there could be some clever way to write it without an argument,,, but I don't know it. |
||
""" | ||
This runs the parser and subparsers. | ||
""" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
import os | ||
import glob | ||
import numpy as np | ||
from ipywidgets import IntSlider, Output | ||
import ipywidgets as widgets | ||
import matplotlib.pyplot as plt | ||
|
||
|
@@ -109,7 +108,7 @@ def plot_slice(self, z): | |
|
||
def n4_debias_sitk( | ||
image_filename, | ||
iteration_vector=[20, 10, 10, 5], | ||
iteration_vector=None, | ||
masking=True | ||
): | ||
""" | ||
|
@@ -119,6 +118,10 @@ def n4_debias_sitk( | |
Need to cite SITK | ||
""" | ||
# TODO: add sitk citation in docstring, | ||
|
||
if iteration_vector is None: | ||
iteration_vector = [20, 10, 10, 5] | ||
|
||
inputImage = sitk.ReadImage(image_filename) | ||
bits_in_input = inputImage.GetPixelIDTypeAsString() | ||
bit_dictionary = {"Signed 8 bit integer": sitk.sitkInt8, | ||
|
@@ -191,7 +194,7 @@ def debias_folder(file_directory, algorithm, processed, force=False): | |
if algorithm == 'n4_debias_sitk': | ||
array = n4_debias_sitk(file) | ||
elif algorithm == 'alternative_debias_a': | ||
array = alternative_debias_a(file) | ||
array = alternative_debias_a(file) #TODO: what is this? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this function doesn't exist. Is it a future to do? In that case, shall we just raise a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, exactly @DaniBodor it's a function we didn't write. And since it deals with images, we should hold off until we are working on images. |
||
|
||
else: | ||
array = n4_debias_sitk(file) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is what you meant, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not do anything on any function that deals with images directly, because we don't have them. You are probably right, but this worked on some version of an image I had. Please hold off until we have our actual images to repair carve.