There's a long-standing TODO (https://github.com/Islandora/islandora/blob/ab520433c72365b69cfd1804a749e64d27adc853/islandora.api.php#L261) in the Islandora API to pass datastream modified information through to the hook. This information could be further passed through to the derivative generation/alter hooks so they're aware of what parts of a datastream are being modified.
We should do 'er.
*Use case examples*
- Different actions could be taken in a datastream_modified hook based on how the datastream was modified.
- A different derivative generation callback could be applied to a datastream based on, perhaps, a change in mimetype.
- Derivative generation could be shut off in cases where only a label or status or such is being modified.