A family of triaxial Stackel potential-density pairs is introduced. With the help of a Quadratic Programming method, a linear combination of potential-density pairs of this family which fits a given projected density distribution can be built. This deprojection strategy can be used to model the potentials of triaxial elliptical galaxies with or without dark halos. Besides, we show that the expressions for the Stackel triaxial density and potential are considerably simplified when expressed in terms of divided differences, which are convenient numerically. We present an example of triaxial deprojection for the galaxy NGC~5128 whose photometry follows the de Vaucouleurs law.