The quantity of gas in a given volume can be determined by two important gas equations. PV=nrT relates pressure and volume to the Ideal Gas Law constant, the amount of moles of gas and the system temperature. Once the system of the pressure (in atms), temperature (degrees Kelvin), gas constant (.0821 L*atm*K^-1*mol*-1), and volume (L) are known gas quantity in moles can be calculated.
To answer the question, the density of the material of this quantity should be known!!!!!!
If you cannot estimate the height then, unless it is a very specific shape, you cannot calculate the volume.
If you know the density and the volume, you can calculate the mass. This is becausedensity = mass/volume.
mass and volume
density
If the density of the substance is known, then you can calculate it. Density = Mass/Volume, so Mass = Density x Volume
mass and volume
The mass of a substance can be derived from its density. Density is equal to mass per volume, so if volume is known, divide volume by density to get mass.
Both volume (V) and quantity (n) of the gas have to be known to calculate, not only the pressure by Gas Law: p . V = n . T . (R) in which (R) is the general 'gas constante': 8.3145 (J/mol.K)
The volume of an irregularly shaped solid can be measured by placing the solid in a known quantity of water in a container with measurement markings. Take the new volume and find the difference between this and the old volume. This is the volume of your irregularly shaped solid.
Usually you can use one of the well-known formulae, for example the volume of a sphere, of a pyramid, etc.
You need more information. There are many shapes which could hold the same volume, but have different (is it perimeter of the base, maybe?).