  Observations and numerical simulations of galaxy clusters strongly indicate
that the hot intracluster x-ray emitting gas is not spherically symmetric. In
many earlier studies spherical symmetry has been assumed partly because of
limited data quality, however new deep observations and instrumental designs
will make it possible to go beyond that assumption. Measuring the temperature
and density profiles are of interest when observing the x-ray gas, however the
spatial shape of the gas itself also carries very useful information. For
example, it is believed that the x-ray gas shape in the inner parts of galaxy
clusters is greatly affected by feedback mechanisms, cooling and rotation, and
measuring this shape can therefore indirectly provide information on these
mechanisms. In this paper we present a novel method to measure the
three-dimensional shape of the intracluster x-ray emitting gas. We can measure
the shape from the x-ray observations only, i.e. the method does not require
combination with independent measurements of e.g. the cluster mass or density
profile. This is possible when one uses the full spectral information contained
in the observed spectra. We demonstrate the method by measuring radial
dependent shapes along the line of sight for CHANDRA mock data. We find that at
least 10^6 photons are required to get a 5-{\sigma} detection of shape for an
x-ray gas having realistic features such as a cool core and a double powerlaw
for the density profile. We illustrate how Bayes' theorem is used to find the
best fitting model of the x-ray gas, an analysis that is very important in a
real observational scenario where the true spatial shape is unknown. Not
including a shape in the fit may propagate to a mass bias if the x-ray is used
to estimate the total cluster mass. We discuss this mass bias for a class of
spacial shapes.
