Crop Region by curve

Maybe you can try to follow this example: