Hi,
I'm rotating a volume (Using the Euler3DTransform) and the final set of slices are half black or empty.
here's an example when rotating a volume of 10 slices:
Am I missing something such as changing the origin or maybe computing the center incorrectly? (The center is passed as parameter from another program)
<img src="http://itk-users.7.n7.nabble.com/file/n38081/capture.jpg" border="0"/>
And here's the code I'm using:
typedef itk::ResampleImageFilter<ImageType, ImageType> FilterType;
FilterType::Pointer FiltroResample = FilterType::New();
FiltroResample->SetInput(reader->GetOutput());
typedef itk::LinearInterpolateImageFunction<ImageType, double > InterpolatorType;
InterpolatorType::Pointer interpolator = InterpolatorType::New();
FiltroResample->SetInterpolator(interpolator);
FiltroResample->SetOutputDirection(inputImage->GetDirection());
FiltroResample->SetOutputOrigin(inputImage->GetOrigin());
ImageType::SizeType inputSize = inputImage->GetLargestPossibleRegion().GetSize();
FiltroResample->SetSize(inputSize);
const ImageType::SpacingType& inputSpacing = inputImage->GetSpacing();
FiltroResample->SetOutputSpacing(inputSpacing);
FiltroResample->SetDefaultPixelValue(-1000);
typedef itk::Euler3DTransform< double > TransformType; //Transform
TransformType::Pointer transform = TransformType::New();
double alfa, beta, gamma, centro_rotacion_X, centro_rotacion_Y, centro_rotacion_Z, origenX,origenY;
gamma = atof(argv[2]);
beta = atof(argv[3]);
alfa = atof(argv[4]);
centro_rotacion_X = atof(argv[5]);
centro_rotacion_Y = atof(argv[6]);
centro_rotacion_Z = atof(argv[7]);
origenX = atof(argv[8]);
origenY = atof(argv[9]);
transform->SetRotation(gamma, beta, alfa);
double centro[3] = { centro_rotacion_X, centro_rotacion_Y, centro_rotacion_Z };
transform->SetCenter(centro);
FiltroResample->SetTransform(transform);
FiltroResample->Update();
<br/><hr align="left" width="300" />
View this message in context: <a href="http://itk-users.7.n7.nabble.com/Rotating-image-results-in-last-slices-being-half-empty-tp38081.html">Rotating image results in last slices being half empty</a><br/>
Sent from the <a href="http://itk-users.7.n7.nabble.com/">ITK - Users mailing list archive</a> at Nabble.com.<br/>