For filtering gammas, and X-rays you have to consider the L, and K-edge lines of the absorber. If for example say that you only want to harden a 100-150KV X-ray beam: Aluminum is to low in atomic number to do the job efficiently, now how about Cu? If you only use a 1-2mm copper sheet, then the output beam will harden, but it will also be full of Cu K edge soft X-rays. Now if you add an additional thin 1-2mm Al layer after the copper, then then the Cu K line gets absorbed, and the final beam quality is much harder than with just the Cu. At 250-400KV for more superficial therapy they use a 3 layer filter called a Thorius filter , it had the following filter material sequence Sn:Cu:Al , it worked very well, unless some idiot put it in the wrong way with the Sn side facing the patient, in which case the result was very nasty skin burns.
Filtering a photon beam can be handy for many other applications like spectroscopy, if properly done filters can enhance the spectral region that you are interested in, and attenuate the rest. At under 100KV energy this works really great, simply via the selection of the proper element filter combination. You can also for example use the same element as a filter, that is used as the anode material of the X-ray source. Here you will single out the K lines of that element. In real life this is done with mammography, where the ideal beam would be monochromatic at about 20KV. Since even a pure Mo anode generates a broad spectrum, a thin Mo filter will selectively attenuate all wavelengths except for the Mo K lines, so with this filter, 90% of the x-rays will be at about 17.5KV, and some at the 19.5KV line. For higher energy they just switch to Rhodium. Yes to answer the next question I do indeed have requests out already for old Rhodium anodes.
These concepts have many applications in imaging, spectroscopy, etc. Once you have the basic idea, the rest is just a simple matter of looking up the K lines in question, and then making the appropriate filter. In an acellerator / fusor for example: Say you had an X-ray leak, and you could not figure out where inside it was originating from, or that you just wanted to know where the electrons were ending up? By making some filters from the known elements found inside, then you could quickly narrow it down to the actual source with a detector. Alloys make things a little harder, but the lines of the elements in them, will still be detectable with filters.