As far as I know, the only difference between a confocal and conventional fluorescent microscope is a pinhole added between the detector and dichronic mirror.And also for the two-photon microscope what we need is just an augmented light source.
well, it's more complicated than that. Let's start with a confocal microscope:
what you would need is:
- A light source focusing in a very small point in the sample. This is generally a single mode laser. Moreover, the diameter of the laser beam would need to be at least as wide as the back aperture of the objective you are using, so an additional beam expander would be necessary. You can't focus a lamp in a microscopically thigh point without reducing its light intensity to the point of being practically unusable in a confocal microscope. It's a physical rule of optics called rule of etendue, if you want to look it up (it's explained in a very fun way here: https://what-if.xkcd.com/145/).
- a pinhole in the detection path, precisely positioned in the point where an image of the focused source is formed. This would require mounting the pinhole on a quite accurate 3d translation platform, and would require some skill in aligning it correctly.
- a quite sensitive light detector, with an appropriate data acquisition board for digitization of the signal. Confocal microscopes do not use a camera, but a single pixel photodetector, which acquires the intensity of one pixel at a time.
- a mean to move your very small excitation point across the sample very precisely, while keeping its image aligned with the pinhole. Modern confocal microscopes use galvanometric scanners in a path shared by excitation and emission, but this would be nearly impossible to achieve when modifying an existing microscope. Instead, you can mount the sample on a very accurate 3d stage, and move the sample around the fixed focal point instead. However, this would create images very slowly.
- Software to control the whole thing. No physical image of the sample is formed anywhere, the image is formed in a computer by "filling in" the intensity of one pixel at a time.
Useless to say, once you count in the cost of all these components, plus the salary of the person who would inevitably have to work months to make it work correctly, you are probably better off buying an actual confocal microscope. To that effect, the basic confocal systems offered by Thorlabs are not completely unreasonably priced, but i never used one, so i can't vouch for the final product quality.
As for multiphoton, the problem gets worse. On the one side, not needing a pinhole makes the alignment of the whole system easier, but on the other side, all the optics (including the objective) would need to be optimized for infrared wavelengths, and most common use microscopes are not, so the whole performance of the system would be impaired. Plus, if you can afford the necessary light source (and its maintenance!) you can probably afford the microscope too.
The laser is the main difference. Two photon excitation is a low probability event, so a high powered, pulsed, tunable laser is required as opposed to standard visible continuous wave lasers for confocal. These 2P lasers are very expensive. Second, because 2P excitation is inherently limited to the focal plane, no pinhole is required for optical sectioning, as you point out. Therefore, the emission is collected directly and not descanned off the galvos through the pinhole as it is in confocal. "Non-descanned detectors" (NDDs) are used for 2P.
At the moment I am working on new laser specifically for 2P excitation and yes, they are not cheap, but they are getting much better spec and price-wise. Previously Ti:Saph lasers was basically one option, now there are fiber lasers, much more robust and more lab friendly if you are not optics expert for a fraction of price.