We investigate the structure and relationship of an H $\alpha$ filament and an X-ray sigmoid observed in active region NOAA 8151. We first examine the presence of such structures in the reconstructed 3D coronal magnetic field obtained from the non-constant- $\alpha$ force-free field hypothesis using a photospheric vector magnetogram (IVM, Mees Solar Observatory). This method allows us to identify several flux systems: a filament (height 30 Mm, aligned with the polarity inversion line (PIL), magnetic field strength at the apex 49 G, number of turns 0.5-0.6), a sigmoid (height 45 Mm, aligned with the PIL, magnetic field strength at the apex 56 G, number of turns 0.5-0.6) and a highly twisted flux tube (height 60 Mm, magnetic field strength at the apex 36 G, number of turns 1.1-1.2). By searching for magnetic dips in the configuration, we identify a filament structure which is in good agreement with the H $\alpha$ observations. We find that both filament and sigmoidal structures can be described by a long twisted flux tube with a number of turns less than 1 which means that these structures are stable against kinking. The filament and the sigmoid have similar absolute values of $\alpha$ and Jz in the photosphere. However, the electric current density is positive in the filament and negative in the sigmoid: the filament is right-handed whereas the sigmoid is left-handed. This fact can explain the discrepancies between the handedness of magnetic clouds (twisted flux tubes ejected from the Sun) and the handedness of their solar progenitors (twisted flux bundles in the low corona). The mechanism of eruption in AR 8151 is more likely not related to the development of instability in the filament and/or the sigmoid but is associated with the existence of the highly twisted flux tube (~1.1-1.2 turns).