{
dimMoveZ = ext[5]-ext[4]+1;
}
-
-
printf("EED InversCrop::Process 3 %d %d %d \n",dimMoveX,dimMoveY,dimMoveZ );
+
+ double org[3];
+ org[0]=0;
+ org[1]=0;
+ org[2]=0;
+ if (bbGetInputOrigin().size()==3)
+ {
+ org[0]=bbGetInputOrigin()[0];
+ org[1]=bbGetInputOrigin()[1];
+ org[2]=bbGetInputOrigin()[2];
+ }
+
+ if (bbGetInputOrigin().size()==2)
+ {
+ org[0]=bbGetInputOrigin()[0];
+ org[1]=bbGetInputOrigin()[1];
+ }
+
+ if (bbGetInputOrigin().size()==1)
+ {
+ org[0]=bbGetInputOrigin()[0];
+ }
+
int spxM = 0; // start px MoveImage
int sizeXM = 0; // sizeX MoveImage
printf("EED InversCrop::Process 3.1 sizeOrigin %d \n", bbGetInputOrigin().size() );
-printf("EED InversCrop::Process 3.1 Origin %d %d %d\n", bbGetInputOrigin()[0],bbGetInputOrigin()[1],bbGetInputOrigin()[2] );
+printf("EED InversCrop::Process 3.1 Origin %f %f %f\n", org[0],org[1],org[2] );
- px = bbGetInputOrigin()[0];
+ px = org[0];
spxM = 0;
if (px<0)
{
sizeXM = dimMoveX-spxM;
if (px+sizeXM>=dim[0]) { sizeXM=dim[0]-px; }
sizeXM = sizeXM * bbGetInputImageFix()->GetScalarSize();
+printf("4. \n");
for (k=0; k<dimMoveZ; k++)
{
for (j=0; j<dimMoveY; j++)
{
- py = j+bbGetInputOrigin()[1];
+ py = j+org[1];
if (bbGetInputImageMove()->GetDataDimension()==3)
{
- pz = k+bbGetInputOrigin()[2];
+ pz = k+org[2];
} else {
pz = k;
}// Dimension 3
(py>=0) && (pz>=0) &&
(sizeXM>0) )
{
+printf("5. \n");
+
memcpy( _imageoutput->GetScalarPointer(px,py,pz) , bbGetInputImageMove()->GetScalarPointer(spxM,j,k) , sizeXM );
+printf("6. \n");
+
}
} // for j
} // for k
-printf("EED InversCrop::Process 4 %d %d %d \n",px,py,pz );
+printf("EED InversCrop::Process 7 %d %d %d \n",px,py,pz );
_imageoutput->Modified();
} else { // If Image Fixe Move the same GetScalarType