Skip to content

Commit

Permalink
Missing reference handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ngergihun committed Oct 1, 2024
1 parent bf4d520 commit 4339f45
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions orangecontrib/snom/widgets/preprocessors/self_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@

class SelfRef(PreprocessImageOpts2DOnlyWhole):
def __init__(self, reference):
self.reference = reference.X
self.reference = reference

def transform_image(self, image):
ref = (np.reshape(self.reference,np.shape(image)))
d = SelfReference(referencedata=ref).transform(
image
)
return d
try:
ref = (np.reshape(self.reference.X,np.shape(image)))
d = SelfReference(referencedata=ref).transform(
image
)
return d
except:
return image


class SelfRefEditor(BaseEditorOrange):
Expand Down

0 comments on commit 4339f45

Please sign in to comment.