17 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
21 #include <vtkImageData.h>
28 class axlVolumeDiscreteProcessCreatorPrivate
62 if(process->output()){
87 if(dynamic_cast<axlAbstractSurfaceImplicit *>(newData)){
96 }
else if(channel == 1){
98 }
else if(channel == 2){
112 d->output->setDimensions(d->x, d->y, d->z);
114 vtkImageData *grid =
static_cast<vtkImageData *
>(d->output->data());
116 int nx = d->output->xDimension();
117 int ny = d->output->yDimension();
118 int nz = d->output->zDimension();
121 double *coordinates =
new double[3];
124 for(
int i = 0; i < nx ;i++){
125 for(
int j = 0; j < ny ;j++){
126 for(
int k = 0; k < nz ;k++){
128 indice = k*nx*ny+j*nx+i;
129 grid->GetPoint(indice, coordinates);
131 value = d->input->eval(coordinates);
133 d->output->setValue(value, i, j,k);
143 return "creates an axlVolume";
148 return "axlVolumeDiscreteProcessCreator";
static bool registered(void)
virtual void setParameter(int value, int channel)
virtual QString description(void) const
virtual dtkAbstractData * output(void)
~axlVolumeDiscreteProcessCreator(void)
virtual void setInput(dtkAbstractData *newData, int channel)
axlVolumeDiscreteProcessCreator(void)
void copyProcess(axlAbstractProcess *process)
virtual QString identifier(void) const
dtkAbstractProcess * createaxlVolumeDiscreteProcessCreator(void)
static dtkAbstractProcessFactory * processFactSingleton