Image segmentation quality depends heavily on the quality of the image. Formany medical imaging modalities, image reconstruction is required to convertacquired raw data to images before any analysis. However, imperfectreconstruction with artifacts and loss of information is almost inevitable,which compromises the final performance of segmentation. In this study, wepresent a novel end-to-end deep learning framework that performs magneticresonance brain image segmentation directly from the raw data. The end-to-endframework consists a unique task-driven attention module that recurrentlyutilizes intermediate segmentation result to facilitate image-domain featureextraction from the raw data for segmentation, thus closely bridging thereconstruction and the segmentation tasks. In addition, we introduce a novelworkflow to generate labeled training data for segmentation by exploitingimaging modality simulators and digital phantoms. Extensive experiment resultsshow that the proposed method outperforms the state-of-the-art methods.