1. A method comprising: acquiring color Doppler data; detecting one or more transitions of the color Doppler data, each of the one or more transitions being between a first area representing flow velocity in a first direction and a second area representing flow velocity not in the first direction; applying a first set of aliasing corrections to the color Doppler data to generate second color Doppler data; for each of the one or more transitions, determining one or more pairs of color Doppler values in the second color Doppler data which are located on opposite sides of the transition; for each of the one or more transitions, calculating a first energy function based on the one or more pairs of color Doppler values in the second color Doppler data which are located on opposite sides of the transition; determining a first total energy function associated with the first set of aliasing corrections based on the calculated first energy functions; applying a second set of aliasing corrections to the color Doppler data to generate third color Doppler data; for each of the one or more transitions, determining one or more pairs of color Doppler values in the third color Doppler data which are located on opposite sides of the transition; for each of the one or more transitions, calculating a second energy function based on the one or more pairs of color Doppler values in the third color Doppler data which are located on opposite sides of the transition; and determining a second total energy function associated with the second set of aliasing corrections based on the calculated second energy functions.