Skip to content
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

Fix MakeRaw #293

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 38 additions & 39 deletions dacapo/utils/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,45 +83,44 @@ class MakeRaw(gp.BatchFilter):
process: Generate the raw image from the labels.
"""

class Pipeline:
def __init__(
self,
raw,
labels,
gaussian_noise_args: Iterable = (0.5, 0.1),
gaussian_noise_lim: float = 0.3,
gaussian_blur_args: Iterable = (0.5, 1.5),
membrane_like=True,
membrane_size=3,
inside_value=0.5,
):
"""
Initialize the Pipeline object.

Args:
raw: The raw data.
labels: The labels data.
gaussian_noise_args: Tuple of two floats representing the mean and standard deviation
of the Gaussian noise to be added to the data. Default is (0.5, 0.1).
gaussian_noise_lim: The limit of the Gaussian noise. Default is 0.3.
gaussian_blur_args: Tuple of two floats representing the mean and standard deviation
of the Gaussian blur to be applied to the data. Default is (0.5, 1.5).
membrane_like: Boolean indicating whether to apply membrane-like transformation to the data.
Default is True.
membrane_size: The size of the membrane. Default is 3.
inside_value: The value to be assigned to the inside of the membrane. Default is 0.5.
Examples:
>>> Pipeline(raw="RAW", labels="LABELS", gaussian_noise_args=(0.5, 0.1), gaussian_noise_lim=0.3,
>>> gaussian_blur_args=(0.5, 1.5), membrane_like=True, membrane_size=3, inside_value=0.5)
"""
self.raw = raw
self.labels = labels
self.gaussian_noise_args = gaussian_noise_args
self.gaussian_noise_lim = gaussian_noise_lim
self.gaussian_blur_args = gaussian_blur_args
self.membrane_like = membrane_like
self.membrane_size = membrane_size
self.inside_value = inside_value
def __init__(
self,
raw,
labels,
gaussian_noise_args: Iterable = (0.5, 0.1),
gaussian_noise_lim: float = 0.3,
gaussian_blur_args: Iterable = (0.5, 1.5),
membrane_like=True,
membrane_size=3,
inside_value=0.5,
):
"""
Initialize the Pipeline object.

Args:
raw: The raw data.
labels: The labels data.
gaussian_noise_args: Tuple of two floats representing the mean and standard deviation
of the Gaussian noise to be added to the data. Default is (0.5, 0.1).
gaussian_noise_lim: The limit of the Gaussian noise. Default is 0.3.
gaussian_blur_args: Tuple of two floats representing the mean and standard deviation
of the Gaussian blur to be applied to the data. Default is (0.5, 1.5).
membrane_like: Boolean indicating whether to apply membrane-like transformation to the data.
Default is True.
membrane_size: The size of the membrane. Default is 3.
inside_value: The value to be assigned to the inside of the membrane. Default is 0.5.
Examples:
>>> Pipeline(raw="RAW", labels="LABELS", gaussian_noise_args=(0.5, 0.1), gaussian_noise_lim=0.3,
>>> gaussian_blur_args=(0.5, 1.5), membrane_like=True, membrane_size=3, inside_value=0.5)
"""
self.raw = raw
self.labels = labels
self.gaussian_noise_args = gaussian_noise_args
self.gaussian_noise_lim = gaussian_noise_lim
self.gaussian_blur_args = gaussian_blur_args
self.membrane_like = membrane_like
self.membrane_size = membrane_size
self.inside_value = inside_value

def setup(self):
"""
Expand Down
Loading