//=====
#include "bbvtkTemporalPicker.h"
#include "bbvtkPackage.h"
+
+#include "creaVtk_MACROS.h"
+
namespace bbvtk
{
sizeY=ext[3]-ext[2]+1;
sizeZ=ext[5]-ext[4]+1;
+
if (bbGetInputPoint().size()>=2)
{
int px=bbGetInputPoint()[0];
int py=bbGetInputPoint()[1];
- int pz=bbGetInputPoint()[2];
+//EED Eraseme int pz=bbGetInputPoint()[2];
+
+ int minX,maxX,minY,maxY;
+ minX = px-bbGetInputSizeRegion()-1;
+ maxX = px+bbGetInputSizeRegion()-1;
+ minY = py-bbGetInputSizeRegion()-1;
+ maxY = py+bbGetInputSizeRegion()-1;
- if ((px>=0) && (px<sizeX) && (py>=0) && (py<sizeY) )
+ if ( (minX>=0) &&
+ (maxX<sizeX) &&
+ (minY>=0) &&
+ (maxY<sizeY) )
{
int i,j,k;
- int minX,maxX,minY,maxY;
- int acum,numElem;
- minX=px-bbGetInputSizeRegion()-1;
- maxX=px+bbGetInputSizeRegion()-1;
- minY=py-bbGetInputSizeRegion()-1;
- maxY=py+bbGetInputSizeRegion()-1;
+ int numElem;
+ double acum;
+
+
+ long int index = px+py*sizeX;
+ long int stepIndex = sizeX*sizeY;
+ DEF_POINTER_IMAGE_VTK_CREA(vIn,ssIn,pIn,stIn,bbGetInputIn() )
+
for (k=0;k<sizeZ;k++)
{
- acum=0;
- numElem=0;
+ acum = 0;
+ numElem = 0;
+
+ GETVALUE2_VTK_CREA(vIn,pIn,stIn,index)
+ numElem++;
+ acum = acum + vIn;
+ index = index + stepIndex;
+/*
for(i=minX;i<=maxX;i++)
{
for(j=minY;j<=maxY;j++)
{
- if ((i>=0) && (i<sizeX) && (j>=0) && (j<sizeY) )
- {
+// if ((i>=0) && (i<sizeX) && (j>=0) && (j<sizeY) )
+// {
acum = acum + bbGetInputIn()->GetScalarComponentAsDouble(i, j, k, 0);
numElem++;
- }// i j
+// }// if i j
}// for j
} // for i
+*/
+
+
+
if (numElem>0)
{
result.push_back( acum/numElem );