PROBLEM TO BE SOLVED: To automatically set a slice position in relation to a magnetic resonance imaging apparatus which, based on an image data of a prescribed area of a subject, sets the slice position of the prescribed area, a method of setting the slice position and a program.SOLUTION: Starting pixel A (xu, yu) which are starting points for tracking an edge of a liver are decided on an upper end of the liver. Subsequently, while the edge pixel located on the liver edge are selected among a plurality of candidate pixel which are likely to be located on the liver edge on the basis of the starting pixel A (xu, yu) as base points, the liver edge is tracked to reach a lower end of the liver. When pixel A (xe, ye) located on the lower end of the liver are detected, the slice position is set on the basis of the starting pixel A (xu, yu) and the pixel A (xe, ye) located on the lower end of the liver.COPYRIGHT: (C)2012,JPO&INPIT【課題】スライス位置を自動で設定する。【解決手段】肝臓の上端に、肝臓のエッジを追跡するための開始点となる開始ピクセルA(xu,yu)を決定する。そして、開始ピクセルA(xu,yu)を基点にして、肝臓のエッジに位置する可能性の高い複数の候補ピクセルの中から、肝臓のエッジに位置するエッジピクセルを選択しながら、肝臓の下端に到達するまで、肝臓のエッジを追跡する。肝臓の下端に位置するピクセルA(xe,ye)を検出したら、開始ピクセルA(xu,yu)と、肝臓の下端に位置するピクセルA(xe,ye)とに基づいて、スライス位置を設定する。【選択図】図18