Continuous Detection of Cerebral Vasodilatation and Vasoconstriction Using Intracranial Pulse Morphological Template Matching