In oncology, Positron Emission Tomography (PET) is frequently performed for cancer staging and treatment monitoring. Metabolic active tumor volume (MATV) as well as total MATV (TMATV - including primary tumor, lymph nodes and metastasis) derived from PET images have been identified as prognostic factor or for evaluating treatment efficacy in cancer patients. To this end a segmentation approach with high precision and repeatability is important. Moreover, to derive TMATV, a reliable segmentation of the primary tumor as well as all metastasis is essential. However, the implementation of a repeatable and accurate segmentation algorithm remains a challenge. In this work, we propose an artificial intelligence based segmentation method based on textural features (TF) extracted from the PET image. From a large number of textural features, the most important features for the segmentation task were selected. The selected features are used for training a random forest classifier to identify voxels as tumor or background. The algorithm is trained, validated and tested using a lung cancer PET/CT dataset and, additionally, applied on a fully independent test-retest dataset. The approach is especially designed for accurate and repeatable segmentation of primary tumors and metastasis in order to derive TMATV. The segmentation results are compared with conventional segmentation approaches in terms of accuracy and repeatability. In summary, the TF segmentation proposed in this study provided better repeatability and accuracy than conventional segmentation approaches. Moreover, segmentations were accurate for both primary tumors and metastasis and the proposed algorithm is therefore a good candidate for PET tumor segmentation.