BBTK_BLACK_BOX_IMPLEMENTATION(ReSlicerBox,bbtk::AtomicBlackBox);
void ReSlicerBox::Process()
{
- std::cout << "NTU ReSlicerBox : entered 1" << std::endl;
-
if(!bbGetInputOrigin().empty() && bbGetInputTransform() != NULL)
{
- std::cout << "NTU ReSlicerBox : entered 2" << std::endl;
-
- image = vtkImageChangeInformation::New();
+ //image = vtkImageChangeInformation::New();
image->SetInput( bbGetInputIn() );
image->SetOutputSpacing( 1,1,1 );
- std::cout << "NTU ReSlicerBox : entered 3" << std::endl;
-
if(bbGetInputCentered())
{
image->CenterImageOn();
}
- std::cout << "NTU ReSlicerBox : entered 4" << std::endl;
-
- slicer =vtkImageReslice::New();
+ //slicer =vtkImageReslice::New();
slicer->SetInput( image->GetOutput() );
slicer->SetInformationInput( image->GetOutput() );
slicer->SetResliceTransform(bbGetInputTransform());
}
slicer->Update();
- std::cout << "NTU ReSlicerBox : entered 5" << std::endl;
-
- imageResult = vtkImageChangeInformation::New();
+ //imageResult = vtkImageChangeInformation::New();
imageResult->SetInput( slicer->GetOutput() );
double spc[3];
bbGetInputIn()->GetSpacing(spc);
imageResult->SetOutputSpacing( spc );
imageResult->SetOutputOrigin( 0,0,0 );
- bbSetOutputOut( imageResult->GetOutput() );
+ bbSetOutputOut( imageResult->GetOutput() );
}
else
{
- bbSetOutputOut( bbGetInputIn() );
- }
-
- std::cout << "NTU ReSlicerBox : out" << std::endl;
-
+ bbSetOutputOut( NULL );
+ }
}
void ReSlicerBox::bbUserSetDefaultValues()
{