RippleImage#
- class ripplemapper.classes.RippleImage(*args, roi_x: list[int] = False, roi_y: list[int] = False)[source]#
Bases:
objectClass for ripple images.
Initialize a RippleImage instance.
- Parameters:
- Raises:
ValueError – If the input is not a valid file path or a file name and image data pair.
Methods Summary
add_contour(*args)Add a contour to the RippleImage object.
get_contour(contour)Return a given contour for the image.
plot([include_contours])Plot the image with optional contours.
save([fname, save_image_data])Save the image and contours to a file.
smooth_contours(**kwargs)Smooth all the contours in the image.
Methods Documentation
- add_contour(*args)[source]#
Add a contour to the RippleImage object.
- Parameters:
*args (tuple) – Arguments to initialize the contour. Can be a file path to a contour file, or a numpy array of contour values and a method string.
- get_contour(contour: str | int)[source]#
Return a given contour for the image.
- Parameters:
contour (str | int) – Contour identifier. Can be an integer index or a method string.
- Returns:
The corresponding RippleContour object.
- Return type:
- Raises:
ValueError – If the input is not a valid integer or method string.
- plot(include_contours: bool = True, *args, **kwargs)[source]#
Plot the image with optional contours.