if (bbGetInputTypeOrientation()==2)
{
- imageReslice->SetResliceAxesDirectionCosines(0,0,1, 1,0,0 ,0,1,0); // 2=YZ
+ imageReslice->SetResliceAxesDirectionCosines(0,0,-1, 1,0,0 ,0,-1,0); // 2=YZ
+ imageReslice->SetResliceAxesOrigin( bbGetInputZ()*bbGetInputIn()->GetSpacing()[0] ,0 ,0);
} else if (bbGetInputTypeOrientation()==1) {
imageReslice->SetResliceAxesDirectionCosines(1,0,0, 0,0,-1 ,0,1,0); // 1=XZ
+ imageReslice->SetResliceAxesOrigin(0, bbGetInputZ()*bbGetInputIn()->GetSpacing()[1],0 );
} else
{
imageReslice->SetResliceAxesDirectionCosines(1,0,0, 0,1,0 ,0,0,1); // 0=XY
+ imageReslice->SetResliceAxesOrigin(0,0, bbGetInputZ()*bbGetInputIn()->GetSpacing()[2] );
}
-
-
-
- imageReslice->SetResliceAxesOrigin(0,0, bbGetInputZ()*bbGetInputIn()->GetSpacing()[2] );
imageReslice->SetOutputDimensionality(2);
imageReslice->SetInterpolationModeToLinear();
imagedata = imageReslice->GetOutput();