EEG segmentation and denoising which one should done first? Because of EEG nature, in EEG analysis often researcher use Windowing/segmentation method.    

As i currently work on sleep study, and in my study i need to analysis EEG data, i came to a problem.  

My problem: should i filter and Denise my EEG signal and then segment it or no i should firstly segment my EEG and then filter and denoise each epoch separately?    

And as extra question, is there any difference between these two in signal processing view?
Depending on whom you ask, you get both answers. That's mostly dependent on the denoising algorithm. If you're using an adaption of GST, you are segmenting first with an n-1 overlap.

If you're using S3P I'd recommend not segmenting, since (in my experience) there is a slight difference, with unsegmented data having slightly closer results to Fernandez and Li, 2003 and Frangakis and Hegerl, 2001.