In a large mixing bowl, whisk together the flour, salt, and granulated sugar.
Add the cold butter and cut it into the flour mixture using a pastry cutter or your fingertips. Continue until the mixture resembles coarse crumbs with a few pea-sized pieces of butter remaining.
Add the ice water one tablespoon at a time, gently mixing until the dough comes together. Avoid overmixing.
Divide the dough into two equal portions and shape each portion into a disk. Wrap the disks and refrigerate for at least 30 minutes.
Preheat the oven to 400°F (200°C).
Place the cherries, sugar, cornstarch, lemon juice, almond extract, vanilla extract, and salt in a saucepan.
Cook the cherry mixture over medium heat for several minutes, stirring gently, until the cherries release their juices and the mixture begins to thicken.
Remove the cherry filling from the heat and let it cool slightly.
Roll out one disk of dough on a lightly floured surface until it is slightly larger than a 9-inch pie dish.
Transfer the dough to the pie dish and gently press it into the bottom and sides.
Pour the slightly cooled cherry filling into the crust and spread it evenly.
Roll out the second disk of dough and cut it into strips. Arrange the strips over the filling to create a lattice crust. Alternatively, place the dough over the filling and cut several vents in the top.
Press the edges of the top and bottom crusts together. Trim away excess dough and crimp the edges with your fingers or a fork.
Whisk together the egg and water. Brush the egg wash over the top crust and sprinkle with coarse sugar, if desired.
Place the pie on a baking sheet and bake at 400°F (200°C) for 20 minutes.
Reduce the oven temperature to 375°F (190°C) and continue baking for 35–45 minutes, or until the crust is golden brown and the filling is bubbling.
If the crust edges brown too quickly, cover them loosely with aluminum foil.
Transfer the pie to a wire rack and allow it to cool for 2–3 hours before slicing.
Serve the cherry pie warm or at room temperature with vanilla ice cream or whipped cream.