}
numberOfLines++;
}
+
+ std::cout<<"18-04-2012 RaC ReadAxisTree3D::Process Erase last element in vectors."<<std::endl;
+ // TOFIX If it is not erased, the last element in every vector is a copy of the last column value
+ for( i=0 ; i<bbGetInputDimension() ; i++)
+ {
+ vecData=tlst[i];
+ vecData->pop_back();
+ }
+ /* vecData=tlst[0];
+ std::cout<<"RaC last element 1:"<<vecData->at(numberOfLines-2)<<std::endl;
+ std::cout<<"RaC last element 1:"<<vecData->at(numberOfLines-1)<<std::endl;
+ vecData=tlst[1];
+ std::cout<<"RaC last element 2:"<<vecData->at(numberOfLines-2)<<std::endl;
+ std::cout<<"RaC last element 2:"<<vecData->at(numberOfLines-1)<<std::endl;
+ vecData=tlst[2];
+ std::cout<<"RaC last element 3:"<<vecData->at(numberOfLines-2)<<std::endl;
+ std::cout<<"RaC last element 3:"<<vecData->at(numberOfLines-1)<<std::endl; */
fclose(ff1);
} else { // else ff1
printf("bbcreaMaracasVisuReadAxisTree3D::Process ...Error... reading file InputFileName_Points>%s", bbGetInputFileName().c_str() );
} //ff1
+
i=1; if (i<=bbGetInputDimension()) { bbSetOutputlstData1( *(tlst[i-1]) ); }
i=2; if (i<=bbGetInputDimension()) { bbSetOutputlstData2( *(tlst[i-1]) ); }
i=3; if (i<=bbGetInputDimension()) { bbSetOutputlstData3( *(tlst[i-1]) ); }
int ext[6];
bbGetInputIn()->GetExtent(ext);
- int sizeX=ext[1]-ext[0];
- int sizeY=ext[3]-ext[2];
- int sizeZ=ext[5]-ext[4];
+ int sizeX=ext[1]-ext[0]+1;
+ int sizeY=ext[3]-ext[2]+1;
+ int sizeZ=ext[5]-ext[4]+1;
double spc[3];
bbGetInputIn()->GetSpacing(spc);
invSpc[2] = 1/spc[2];
mimage = vtkImageData::New();
- mimage->SetDimensions(sizeX,sizeY,sizeZ);
- mimage->SetOrigin(0,0,0);
- mimage->SetExtent( 0 , sizeX-1 , 0 , sizeY-1 , 0, sizeZ-1 );
- mimage->SetWholeExtent( 0 , sizeX-1 , 0 , sizeY-1 , 0, sizeZ-1 );
+ mimage->SetSpacing(bbGetInputIn()->GetSpacing());
+ mimage->SetDimensions(bbGetInputIn()->GetDimensions());
+ mimage->SetExtent(bbGetInputIn()->GetExtent());
+ mimage->SetOrigin(bbGetInputIn()->GetOrigin());
+ //mimage->SetDimensions(sizeX,sizeY,sizeZ);
+ //mimage->SetOrigin(0,0,0);
+ //mimage->SetExtent( 0 , sizeX-1 , 0 , sizeY-1 , 0, sizeZ-1 );
+ //mimage->SetWholeExtent( 0 , sizeX-1 , 0 , sizeY-1 , 0, sizeZ-1 );
mimage->SetScalarTypeToUnsignedShort();
- mimage->SetSpacing(spc);
+ //mimage->SetSpacing(spc);
mimage->AllocateScalars();
+
int i,j,k;
int sizeLstPointR = bbGetInputlstPointR().size();
int iAxe,sizeAxe=bbGetInputlstPointX().size();
p++;
}
- for (iAxe=0 ; iAxe<sizeAxe; iAxe++)
+ for (iAxe=0 ; iAxe<sizeAxe-1; iAxe++)
{
if (sizeLstPointR<iAxe)
{