trimregion can now read piped input