A method of determining parameters associated with a sample, comprising: applying an external magnetic field and a radio-frequency pulse sequence to the sample; measuring at least a component of a magnetization associated with the sample, wherein the measuring comprises a type of magnetic-resonance measurement; calculating at least a predicted component of the magnetization for voxels that represent the sample based on the measured component of the magnetization, a forward model, the external magnetic field, the radio-frequency pulse sequence, and the parameters for the voxels, wherein the forward model comprises one of: Bloch equations, or Liouvillian computations, and wherein the parameters include a density of a type of nuclei, a longitudinal relaxation time along a direction parallel to the external magnetic field and a transverse relaxation time along a direction perpendicular to the external magnetic field; computing a difference between the predicted component of the magnetization and the measured component of the magnetization; and solving instances of an inverse problem by iteratively modifying the parameters associated with the voxels in the forward model until the difference between the predicted component of the magnetization and the measured component of the magnetization is less than a predefined value, wherein the modifying is relative to a previous instance of the parameters, wherein the solving comprises repeating the applying, the measuring and the calculating and the computing for one or more different external magnetic fields, one or more different radio-frequency pulse sequences, or both until the difference is less than the predefined value, wherein a given instance of an external magnetic field, a radio-frequency pulse sequence, or both are changed after a prior instance of solving the inverse problem, wherein a size of the voxels is decreased in a sequence of instances of solving the inverse problem, wherein, during one or more of the instances of solving the inverse problem, the measuring is repeated before the sample has completely relaxed following a previous instance of the measuring or without resetting a state of the sample between instances of the measuring, and wherein the forward model corresponds to a magnetic-resonance scanner that performs the instances of the measuring. applying an external magnetic field and a radio-frequency pulse sequence to the sample; measuring at least a component of a magnetization associated with the sample, wherein the measuring comprises a type of magnetic-resonance measurement; calculating at least a predicted component of the magnetization for voxels that represent the sample based on the measured component of the magnetization, a forward model, the external magnetic field, the radio-frequency pulse sequence, and the parameters for the voxels, wherein the forward model comprises one of: Bloch equations, or Liouvillian computations, and wherein the parameters include a density of a type of nuclei, a longitudinal relaxation time along a direction parallel to the external magnetic field and a transverse relaxation time along a direction perpendicular to the external magnetic field; computing a difference between the predicted component of the magnetization and the measured component of the magnetization; and solving instances of an inverse problem by iteratively modifying the parameters associated with the voxels in the forward model until the difference between the predicted component of the magnetization and the measured component of the magnetization is less than a predefined value, wherein the modifying is relative to a previous instance of the parameters, wherein the solving comprises repeating the applying, the measuring and the calculating and the computing for one or more different external magnetic fields, one or more different radio-frequency pulse sequences, or both until the difference is less than the predefined value, wherein a given instance of an external magnetic field, a radio-frequency pulse sequence, or both are changed after a prior instance of solving the inverse problem, wherein a size of the voxels is decreased in a sequence of instances of solving the inverse problem, wherein, during one or more of the instances of solving the inverse problem, the measuring is repeated before the sample has completely relaxed following a previous instance of the measuring or without resetting a state of the sample between instances of the measuring, and wherein the forward model corresponds to a magnetic-resonance scanner that performs the instances of the measuring.