There is an important question here - Why hadn't he seen you?
Was he distracted by something in the car ie. paperwork, laptop, satnav or the old favourite the mobile phone? Unlikely, people who are caught out tend to be agressive, rude and defensive. As he was none of these things we need to look elsewhere.
The commonest reason for cyclists being invisible is their positioning on the road. If you are too far to the left you run the risk of being lost in the 'visual clutter' by the side of the road and also you are outside of the drivers field of attention (ie. you are not a 'threat').
To explain this further; a pedestrian is stood by the side of the road wishing to cross. He sees the car 100yrds away and decides it's safe to cross. He starts to cross and is struck by the cyclist who was 5yrds away when he stepped into the road. His brain prioritised the car as the greater threat and so ignored the cyclist. Our caveman brain does this all the time.
You need to put yourself into the drivers field of attention, you have to become a 'threat' (something he needs to notice - I don't mean you have to put him in fear of you mangling him!). So how do you do this?
Imagine the the kerb and the centre of the road as the banks of a river. Now imagine a car wide current flowing down the river, sweeping round parked cars, chicanes and ostructions; through pinch points and traffic throttles - this is the moving traffic lane (MTL). Your position relative to the MTL is decided by what you need others to do.
Where you don't want cars to be alongside you (passing parked cars, going through a throttle or just where you feel there is not enough room for a car to be alongside you) then sit in the middle of the MTL - This is the primary riding position.
The rest of the time you can adopt the secondary riding position. This is just to the left of the MTL. This means that although you are not a direct 'threat' to an following car you are close enough for a car driver's hind-brain to notice of you. You are visible!
Positioning and eye-contact are the biggest ways that you can influence the behaviour of other road users. You don't even need to dress as your favourite tropical amphibian to be noticed.
I've probably explained this very badly but I hope it is of use. For further reading see John Franklin's Cyclecraft chapter 7 [other cycling guides are available].
I know it looks like I'm putting all the onus on you but there is a good reason. I am!
As the Vulnerable Road User the person with the greatest responsibility for your safety is YOU!
Stay safe and happy cycling.