Skip to content

Commit

Permalink
pep8 formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cmohl2013 committed Oct 1, 2020
1 parent 3492bd8 commit 16196b0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
3 changes: 0 additions & 3 deletions yapic_io/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def image_dimensions(self, image_nr):
'''
return self.pixel_connector.image_dimensions(image_nr)


def _smallest_image_size_xy(self):
Z = 10
X = 500
Expand All @@ -93,7 +92,6 @@ def _smallest_image_size_xy(self):
Y = size_y
return (Z, X, Y)


def pixel_statistics(self,
channels,
upper=99,
Expand Down Expand Up @@ -168,7 +166,6 @@ def channels_are_consistent(self):

return False, channel_cnt


def label_values(self):
'''
Get label values.
Expand Down
5 changes: 1 addition & 4 deletions yapic_io/ilastik_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,11 @@ def __repr__(self):
self.labelvalue_mapping)
return infostring

def _new_label(self,label_value):
labels_per_channel = []
def _new_label(self, label_value):

new_list = []
new_list = [x for x in label_value[1] if x[1] is not None]


for x in label_value:
if label_value[1] is not None:
new_list.append(x)
Expand All @@ -105,7 +103,6 @@ def _new_label(self,label_value):
label_value = new_list
return label_value


def filter_labeled(self):
'''
Removes images without labels.
Expand Down
5 changes: 1 addition & 4 deletions yapic_io/tests/test_ilastik_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ def test_incomplete_label_data(self):
'../test_data/ilastik/pixels_ilastik_mutliim-1.2_additional_img')
lbl_path = os.path.join(
base_path, '../test_data/ilastik/ilastik-multiim-1.2.ilp')
c = IlastikConnector(img_path, lbl_path)


IlastikConnector(img_path, lbl_path)

def test_constructor_with_subset(self):

Expand Down Expand Up @@ -264,7 +262,6 @@ def test_multi_channel_multi_z(self):

self.assertFalse(lbl[0, 0, 0])


p = os.path.join(base_path, '../test_data/ilastik/dimensionstest')
img_path = os.path.join(p, 'images')
lbl_path = os.path.join(p, 'x15_y10_z2_c4_classes2_ilastik1.3.3.ilp')
Expand Down
1 change: 0 additions & 1 deletion yapic_io/tiff_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def _assemble_filenames(self, pairs):
self.filenames = [FilePair(Path(img), Path(lbl) if lbl else None)
for img, lbl in pairs]


def _handle_lbl_filenames(self, label_filepath):
return _handle_img_filenames(label_filepath)

Expand Down

0 comments on commit 16196b0

Please sign in to comment.