The article presents one of the possible approaches to modeling objects with anisotropic properties based on images of the study area. Data from such images are taken into account when building a numerical model. In this case, material inhomogeneity can be included by integrating the local stiffness matrix of each finite element with a certain weight function. The purpose of the presented work is to develop a finite element for the formation of a computational ensemble and simulation of mechanical behavior taking into account the data of two-dimensional medical images. To implement the proposed approach, we used the assumption that there is a correlation between the values in the image pixels and the elastic properties of the material. Meshing was based on a four-node plane finite element. This approach allows using the quantitative phase or scanning electronic images, as well as computed tomography data. A number of test problems for compression of elementary geometry samples were calculated. The distal part of the rat femur was considered as a model problem. A computed tomography scan of the sample was used to construct a numerical model taking into account the inhomogeneity of the material distribution inside the organ. The distribution field of the nodal displacements based on data obtained from the images of the study area is presented. Within the framework of a model problem, we considered how a computer tomograph resolution influences the quality of the obtained results. For this purpose, calculations were carried out based on compressed input medical images.