Program: bbtk
Module: $RCSfile: bbvtkFlip.cxx,v $
Language: C++
- Date: $Date: 2012/04/11 16:27:00 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2012/07/09 13:03:17 $
+ Version: $Revision: 1.3 $
=========================================================================*/
/* ---------------------------------------------------------------------
int lineSize = inputdims[0]*scalarSize*nbScalComp;
int planeSize = inputdims[1]*lineSize;
char *pixelsIn = (char *)imageIn->GetScalarPointer();
-
-/*
- outputdims[0] = inputdims[1];
- outputdims[1] = inputdims[0];
- outputdims[2] = inputdims[2];
- std::cout << " inputdims[0] " << inputdims[0] <<" inputdims[1] " <<inputdims[1] << " inputdims[2] "
- << inputdims[2] << std::endl;
-*/
-
- /*
- vtkImageData *vtkImageOut;
- vtkImageOut = vtkImageData::New();
- vtkImageOut->SetDimensions( outputdims );
- vtkImageOut->SetExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
- vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
- int nbScalComp = imageIn->GetNumberOfScalarComponents();
- vtkImageOut->SetNumberOfScalarComponents(nbScalComp);
- vtkImageOut->SetSpacing( imageIn->GetSpacing() );
- vtkImageOut->SetScalarType(imageIn->GetScalarType() );
- vtkImageOut->AllocateScalars();
- vtkImageOut->Update();
- char *pixelsOut = (char *)vtkImageOut->GetScalarPointer();
- unsigned short *output =(unsigned short *)(vtkImageOut->GetScalarPointer());
- */
-
+
char *temp = (char *)malloc(lineSize);
char *line1;
char *line2;
}
}
-// This was to transpose the image ...
-/*
- for(int k=0; k<inputdims[2]; k++) { // iterate on planes
- for(int j=0; j<inputdims[1]; j++) { // iterates on rows
- for(int i=0; i<inputdims[0]; i++) { // iterates on columns
- for(int l=0; l<nbScalComp; l++) { // iterates on scalar components
- vtkImageOut->SetScalarComponentFromDouble(j,i,k,l,imageIn->GetScalarComponentAsDouble(i,j,k,l));
- }
- }
-
- }
- }
- return vtkImageOut;
-*/
free (temp);
return imageIn;
}
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ printf("EED RescaleSlopeIntercept::Process start\n");
+
double range[2];
double spc[3];
mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
mchange->SetOutputSpacing (spc);
mchange->Update(); //important
-
bbSetOutputOut( mchange->GetOutput() );
- } // if
+ } else {
+ bbSetOutputOut( NULL );
+ } // if bbGetInputIn
+
+ printf("EED RescaleSlopeIntercept::Process end\n");
+
}
//=====