An electromagnetic heater for heating an irregularly shaped object, including:a cavity within which an object is to be placed;at least one feed which feeds UHF or microwave energy into the cavity; anda controller that controls one or more characteristics of the cavity or energy to assure that the UHF or microwave energy is deposited uniformly in the object within ±30% over at least 80% of the volume of the object.