]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx
3581966d4a7db99c5ac697035c1289a3e408dd59
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkReadMHDPlane.cxx
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #include "bbcreaVtkReadMHDPlane.h"
5 #include "bbcreaVtkPackage.h"
6
7 #include "stdio.h"
8
9
10 #define _LARGEFILE64_SOURCE
11
12 #include <stdio.h>
13 #include <sys/types.h>
14
15 #if defined(_WIN32)
16         #include <share.h> 
17 #else
18         #include <unistd.h>
19 #endif // defined(_WIN32)
20
21 #include <stdlib.h>
22 #include <errno.h>
23 #include <string.h>
24 #include <sys/stat.h>
25 #include <fcntl.h>
26
27 namespace bbcreaVtk
28 {
29
30 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ReadMHDPlane)
31 BBTK_BLACK_BOX_IMPLEMENTATION(ReadMHDPlane,bbtk::AtomicBlackBox);
32 //===== 
33 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
34 //===== 
35
36
37 vtkImageData* ReadMHDPlane::CreateDefaultImage()
38 {
39         vtkImageData *newImage = NULL;
40 /*
41         newImage = vtkImageData::New();
42         int i;
43         int sizeX, sizeY, sizeZ;
44         sizeX = 1;
45         sizeY = sizeX;
46         sizeZ = 1;
47         vtkImageData *newImage = vtkImageData::New();
48         newImage->Initialize();
49         newImage->SetSpacing( 1,1,1 );
50         newImage->SetDimensions(  sizeX,sizeY,sizeZ );
51         newImage->SetExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );  
52 //EED 2017-01-01 Migration VTK7
53 #if VTK_MAJOR_VERSION <= 5
54         newImage->SetWholeExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
55         newImage->SetScalarTypeToUnsignedChar();
56         newImage->SetNumberOfScalarComponents(1);
57         newImage->AllocateScalars();
58         newImage->Update();
59 #else
60 //      newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
61         newImage->AllocateScalars(VTK_SHORT,1);
62 #endif
63 //      memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*sizeZ*sizeof(unsigned char) );
64         memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*sizeof(short) );
65 //      for (i=0; i<sizeX; i++)
66 //      {
67 //              newImage->SetScalarComponentFromDouble(i,i                      ,0, 0, 255 );
68 //              newImage->SetScalarComponentFromDouble(i,sizeY-1-i      ,0, 0, 255 );
69 //      } // for i
70         newImage->Modified();
71 */
72         return newImage;
73
74
75 vtkImageData* ReadMHDPlane::ChangeOrientation(vtkImageData* imgOrg)
76 {
77         vtkImageData *imgDst  = NULL;
78
79         if (imgOrg!=NULL)
80         {
81                 int     width;
82                 int     ext[6];
83                 int     sizeXOrg, sizeYOrg,sizeZOrg;
84                 int     sizeXDst, sizeYDst,sizeZDst;
85         //EED 2017-01-01 Migration VTK7
86         #if VTK_MAJOR_VERSION <= 5
87                 imgOrg->GetWholeExtent(ext);
88         #else
89                 imgOrg->GetExtent(ext);
90         #endif
91                 int     sizeLine;
92                 
93                 sizeXOrg        = ext[1]-ext[0]+1;
94                 sizeYOrg        = ext[3]-ext[2]+1;
95                 sizeZOrg        = ext[5]-ext[4]+1;
96         width=sizeZOrg;
97
98                 if (bbGetInputDirectionPlane()=="XY")
99                 {
100                         sizeXDst        = ext[1]-ext[0]+1;
101                         sizeYDst        = ext[3]-ext[2]+1;
102                         sizeZDst        = width;
103                 } // XY 
104                 if (bbGetInputDirectionPlane()=="YZ") 
105                 {
106                         sizeXDst        = width;
107                         sizeYDst        = ext[1]-ext[0]+1;
108                         sizeZDst        = ext[3]-ext[2]+1;
109                         sizeLine        = sizeYDst;
110                 } // YZ
111                 if (bbGetInputDirectionPlane()=="ZX")
112                 {
113                         sizeXDst        = ext[1]-ext[0]+1;
114                         sizeYDst        = width;
115                         sizeZDst        = ext[3]-ext[2]+1;
116                         sizeLine        = sizeXDst;
117                 } // ZX
118                 imgDst  = vtkImageData::New();
119                 imgDst->Initialize();
120                 imgDst->SetSpacing( imgOrg->GetSpacing() );
121                 imgDst->SetDimensions( sizeXDst,sizeYDst,sizeZDst );
122                 imgDst->SetExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 );
123                 
124         //EED 2017-01-01 Migration VTK7
125         #if VTK_MAJOR_VERSION <= 5
126                 imgDst->SetWholeExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 );
127                 imgDst->SetScalarType( imgOrg->GetScalarType() );
128                 imgDst->SetNumberOfScalarComponents(1);
129                 imgDst->AllocateScalars();
130                 imgDst->Update();
131         #else
132                 imgDst->AllocateScalars(imgOrg->GetScalarType(),1);
133         #endif
134
135                 char *ptrDst,*ptrOrg;
136                 int sizeBytes = imgOrg->GetScalarSize();                
137                 int sizeLineBytes = sizeLine*imgOrg->GetScalarSize();           
138                 int xx,yy,zz;
139
140                 long int sizeXDstBytes          = sizeXDst*sizeBytes;
141                 long int sizeXYDstBytes         = sizeXDst*sizeYDst*sizeBytes;
142                 long int sizeXYDstBytes2        = sizeXDst*sizeYDst*sizeBytes*2;
143                 long int sizeXYZDstBytes        = sizeXDst*sizeYDst*sizeZDst*sizeBytes;
144                 long int sizeXYZDstBytes1       = sizeXDst*sizeYDst*(sizeZDst-1)*sizeBytes;
145
146                 ptrOrg = (char*)( imgOrg->GetScalarPointer() );
147
148                 if (bbGetInputDirectionPlane()=="XY")
149                 {
150                         memcpy ( imgDst->GetScalarPointer(), ptrOrg , sizeXDst*sizeYDst*sizeZDst*(imgOrg->GetScalarSize()) );
151                 } // if XY
152
153                 if (bbGetInputDirectionPlane()=="ZX")
154                 {
155                         ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-00-1) );
156                         for( zz=0 ; zz<sizeZOrg ; zz++)
157                         {
158         //                      ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-00-1) );
159                                 for( yy=0 ; yy<sizeYOrg ; yy++)
160                                 {
161         //                              ptrOrg=(char*)( imgOrg->GetScalarPointer(0,yy,zz) );
162         //                              ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-yy-1) );
163                                         memcpy ( ptrDst, ptrOrg , sizeLineBytes );
164                                         ptrOrg = ptrOrg + sizeLineBytes;
165                                         ptrDst = ptrDst - sizeXYDstBytes;
166                                 } // for yy 
167                                 ptrDst = ptrDst + sizeXDstBytes;
168                                 ptrDst = ptrDst + sizeXYZDstBytes;
169                         } // for zz 
170                 } // ZX
171
172                 if (bbGetInputDirectionPlane()=="YZ")
173                 {
174                         ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-0-1) );
175                         for( zz=0 ; zz<sizeZOrg ; zz++)
176                         {
177                                 ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-0-1) );
178                                 for( yy=0 ; yy<sizeYOrg ; yy++)
179                                 {
180         //                              ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-yy-1) );
181                                         for( xx=0 ; xx<sizeXOrg ; xx++)
182                                         {
183         //                                      ptrOrg=(char*)( imgOrg->GetScalarPointer(xx,yy,zz) );
184         //                                      ptrDst=(char*)( imgDst->GetScalarPointer(zz,xx,sizeYOrg-yy-1) );
185                                                 memcpy ( ptrDst, ptrOrg , sizeBytes );
186                                                 ptrOrg+= sizeBytes;
187                                                 ptrDst+= sizeXDstBytes;
188                                         } /// for xx
189                                         ptrDst = ptrDst - sizeXYDstBytes2;
190                                 } // for yy 
191                                 ptrDst = ptrDst + sizeXYZDstBytes;
192         //                      ptrDst++;
193                         } // for zz 
194                 } // ZX
195         } // if imgOrg
196         return imgDst;
197 }
198
199 void ReadMHDPlane::Read64lseek(std::string fileNameIn, std::string plane)
200 {
201         int             imageType;
202         int             slice;
203         int             width;
204         width = bbGetInputWidth();
205         if (width<=0 ) { width=1; }
206         slice = bbGetInputSlice();
207         if (slice<0 ) { slice=0; }
208         int             dimX=-1,dimY=-1,dimZ=-1;
209         int             dim=-1;
210         std::string formattype("VOID");
211         std::string elementdatafile("VOID");
212         float           spcX=-1,spcY=-1,spcZ=-1;
213         float           ox=-1,oy=-1,oz=-1;
214         long int        headersize=0;
215         vtkImageData *newImage=NULL;
216         char mystring[250];
217         char strTmp[30];
218         char strTmp2[30];
219         FILE *ffIn      = fopen( fileNameIn.c_str() , "r");
220         long long dataSize;
221         if (ffIn!=NULL)
222         {
223                 newImage = vtkImageData::New();
224                 while(!feof(ffIn))
225                 {
226             strcpy(mystring,"\n");
227                         fgets(mystring,250,ffIn);
228                 if (strncmp("NDims",mystring,5)==0)                                                     { sscanf(mystring,"%s %s %d"            ,strTmp, strTmp, &dim);                                                                 }
229                 if (strncmp("DimSize",mystring,6)==0)                                                   { sscanf(mystring,"%s %s %d %d %d"      ,strTmp, strTmp, &dimX, &dimY,&dimZ);                                   } 
230                         if (strncmp("ElementType",mystring,11)==0)                                              { sscanf(mystring,"%s %s %s"            ,strTmp, strTmp, strTmp2); formattype=strTmp2;                  }
231                         if (strncmp("ElementSpacing",mystring,14)==0)                                   { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &spcX,&spcY,&spcZ);                                    }
232                         if (strncmp("ElementSize",mystring,11)==0)                                              { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &spcX,&spcY,&spcZ);                                    }
233                 if (strncmp("Offset",mystring,6)==0)                                                    { sscanf(mystring,"%s %s %f %f %f"      ,strTmp, strTmp, &ox, &oy, &oz);                                                }
234                 if (strncmp("HeaderSize",mystring,10)==0)                                               { sscanf(mystring,"%s %s %ld"           ,strTmp, strTmp, &headersize);                                                  }
235                         if (strncmp("ElementDataFile",mystring,15)==0)                                  { sscanf(mystring,"%s %s %s"            ,strTmp, strTmp, strTmp2); elementdatafile=strTmp2;             }
236                 if (strncmp("ElementType = MET_CHAR",mystring,22)==0)                   { imageType=VTK_CHAR;                   dataSize=sizeof(char);                  }
237                 if (strncmp("ElementType = VTK_CHAR",mystring,22)==0)                   { imageType=VTK_CHAR;                   dataSize=sizeof(char);                  }
238                 if (strncmp("ElementType = MET_UCHAR",mystring,23)==0)                  { imageType=VTK_UNSIGNED_CHAR;  dataSize=sizeof(unsigned char); }
239                 if (strncmp("ElementType = VTK_UNSIGNED_CHAR",mystring,31)==0)  { imageType=VTK_UNSIGNED_CHAR;  dataSize=sizeof(unsigned char); }
240                 if (strncmp("ElementType = MET_USHORT",mystring,24)==0)                 { imageType=VTK_UNSIGNED_SHORT; dataSize=sizeof(unsigned short);}
241                 if (strncmp("ElementType = VTK_UNSIGNED_SHORT",mystring,32)==0) { imageType=VTK_UNSIGNED_SHORT; dataSize=sizeof(unsigned short);}
242                 if (strncmp("ElementType = MET_SHORT",mystring,23)==0)                  { imageType=VTK_SHORT;                  dataSize=sizeof(short);                 }
243                 if (strncmp("ElementType = VTK_SHORT",mystring,23)==0)                  { imageType=VTK_SHORT;                  dataSize=sizeof(short);                 }
244                 if (strncmp("ElementType = MET_UINT",mystring,22)==0)                   { imageType=VTK_UNSIGNED_INT;   dataSize=sizeof(unsigned int);  }
245                 if (strncmp("ElementType = VTK_UNSIGNED_INT",mystring,30)==0)   { imageType=VTK_UNSIGNED_INT;   dataSize=sizeof(unsigned int);  }
246                 if (strncmp("ElementType = MET_INT",mystring,21)==0)                    { imageType=VTK_INT;                    dataSize=sizeof(int);                   }
247                 if (strncmp("ElementType = VTK_INT",mystring,21)==0)                    { imageType=VTK_INT;                    dataSize=sizeof(int);                   }
248                 if (strncmp("ElementType = MET_FLOAT",mystring,23)==0)                  { imageType=VTK_FLOAT;                  dataSize=sizeof(float);                 }
249                 if (strncmp("ElementType = VTK_FLOAT",mystring,23)==0)                  { imageType=VTK_FLOAT;                  dataSize=sizeof(float);                 }
250                 if (strncmp("ElementType = MET_LONG",mystring,22)==0)                   { imageType=VTK_LONG;                   dataSize=sizeof(long);                  }
251                 if (strncmp("ElementType = VTK_LONG",mystring,22)==0)                   { imageType=VTK_LONG;                   dataSize=sizeof(long);                  }
252                 if (strncmp("ElementType = MET_DOUBLE",mystring,24)==0)                 { imageType=VTK_DOUBLE;                 dataSize=sizeof(double);                }
253                 if (strncmp("ElementType = VTK_DOUBLE",mystring,24)==0)                 { imageType=VTK_DOUBLE;                 dataSize=sizeof(double);                }
254         } // while
255                 fclose(ffIn);
256                 newImage->Initialize();
257                 int             fd;
258                 long long       ret;
259                 std::size_t found;
260                 std::string filename;
261                 found                                   = fileNameIn.find_last_of("/\\");
262                 filename                                = fileNameIn.substr(0,found+1) + elementdatafile ;
263                 long long       pos;
264                 long long lsize                 = dimX*dimY*width *dataSize;
265 #if defined(_WIN32)
266                    _sopen_s( &fd, filename.c_str(), _O_RDONLY, _SH_DENYNO, 0 );
267 #else
268                 fd = open ( filename.c_str() ,  O_RDONLY|O_LARGEFILE );
269 #endif // defined(_WIN32)
270                 if (fd < 0)
271                 {
272                         printf("EED ReadMHDPlane::Read64lseek   WARNNING! raw file not exist\n");
273                         fprintf(stderr, "%s\n", strerror(errno));
274                         newImage=CreateDefaultImage();
275 //                      exit(1);
276                 }       
277                 if ((plane=="XY") && (fd>=0)) 
278                 { 
279                         newImage->SetSpacing( spcX,spcY,spcZ );
280                         newImage->SetDimensions(  dimX,dimY,width );
281                         newImage->SetExtent(0,  dimX-1,0,dimY-1,0,width-1 );
282
283
284
285 //EED 2017-01-01 Migration VTK7
286 #if VTK_MAJOR_VERSION <= 5
287                         newImage->SetScalarType( imageType );
288                         newImage->SetWholeExtent(0,  dimX-1,0,dimY-1,0,width-1 );
289                         newImage->SetNumberOfScalarComponents(1);
290                         newImage->AllocateScalars();
291                         newImage->Update();
292 #else
293                 newImage->AllocateScalars(imageType,1);
294 #endif  
295                         
296                         pos = dimX*dimY*(long long)slice*dataSize;
297 #if defined(_WIN32)
298                         if (_lseeki64( fd, pos, SEEK_SET ) < 0)
299 #else
300                         if (lseek64(fd, pos, SEEK_SET) < 0) 
301 #endif // defined(_WIN32)
302                         {
303                                 printf("EED ReadMHDPlane::Read64lseek \n");
304                                 fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno));
305                                 exit(1);
306                         }
307                         if ((ret = read(fd, newImage->GetScalarPointer() , lsize)) < 0) 
308                         {
309                                 fprintf(stderr, "Failed reading: %s\n", strerror(errno));
310                                 exit(1);
311                         }
312                 }  // if PLANE XY
313                 if ((plane=="ZX") && (fd>=0))
314                 { 
315                         newImage->SetSpacing( spcX,spcZ,spcY );
316                         newImage->SetDimensions(  dimX,dimZ,width );
317                         newImage->SetExtent(0,  dimX-1,0,dimZ-1,0,width-1 );
318                         
319
320 //EED 2017-01-01 Migration VTK7
321 #if VTK_MAJOR_VERSION <= 5
322                         newImage->SetScalarType( imageType );
323                         newImage->SetWholeExtent(0,  dimX-1,0,dimZ-1,0,width-1 );
324                         newImage->SetNumberOfScalarComponents(1);
325                         newImage->AllocateScalars();
326                         newImage->Update();
327 #else
328                         newImage->AllocateScalars(imageType,1);
329 #endif  
330
331                         int iWidth;
332                         for (iWidth=0;iWidth<width;iWidth++)
333                         {
334                                 copy_ZX_plane(fd,newImage,slice+iWidth,iWidth,dimX,dimY,dimZ,dataSize);
335                         }
336                 }  // if PLANE XZ
337                 if ((plane=="YZ") && (fd>=0))
338                 { 
339                         newImage->SetSpacing( spcY,spcZ,spcX );
340                         newImage->SetDimensions(  dimY,dimZ,width );
341                         newImage->SetExtent(0,  dimY-1,0,dimZ-1,0,width-1 );
342                         
343 //EED 2017-01-01 Migration VTK7
344 #if VTK_MAJOR_VERSION <= 5
345                         newImage->SetScalarType( imageType );
346                         newImage->SetWholeExtent(0,  dimY-1,0,dimZ-1,0,width-1 );
347                         newImage->SetNumberOfScalarComponents(1);
348                         newImage->AllocateScalars();
349                         newImage->Update();
350 #else
351                         newImage->AllocateScalars(imageType,1);
352 #endif  
353                         
354                         int iWidth;
355                         for (iWidth=0;iWidth<width;iWidth++)
356                         {
357                                 copy_YZ_plane(fd,newImage,slice+iWidth,iWidth,dimX,dimY,dimZ,dataSize);
358                         }
359                 }  // if PLANE YZ       
360 #if defined(_WIN32)
361                 _close (fd);
362 #else
363                 close (fd);
364 #endif // defined(_WIN32)
365         } else {
366                 newImage=CreateDefaultImage();
367         } // if  ffIn
368         bbSetOutputOut( newImage );
369         bbSetOutputOut2( ChangeOrientation(newImage) );
370 }
371
372
373 void ReadMHDPlane::copy_YZ_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize)
374 {
375         long long int j;
376         long long int i;
377         long long       ret;
378         long long       pos;
379         long long sizeBytesPlane = dimX*dimY*dataSize;
380         char *pImage;
381         for (j=0;j<dimZ;j++)
382         {
383                 for (i=0;i<dimY;i++)
384                 {
385                         pos = ((long long int)slice+iWidth + i*dimX + j*dimX*dimY)*dataSize ;
386 #if defined(_WIN32)
387                         if (_lseeki64( fd, pos , SEEK_SET ) < 0)
388 #else
389                         if (lseek64(fd, pos , SEEK_SET) < 0) 
390 #endif // defined(_WIN32)
391                         {
392                                 printf("EED ReadMHDPlane::Read64lseek \n");
393                                 fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno));
394                                 exit(1);
395                         }
396
397                         pImage=(char*)(newImage->GetScalarPointer(i, dimZ-1-j,iWidth ));
398                         if ((ret = read(fd, pImage , dataSize)) < 0) 
399                         {
400                                 fprintf(stderr, "Failed reading: %s\n", strerror(errno));
401                                 exit(1);
402                         }
403                         } // for i
404                 } // for j
405 }
406
407
408 void ReadMHDPlane::copy_ZX_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize)
409 {
410         long long int j;
411         long long       ret;
412         long long       pos;
413         pos = dimX*(long long int)slice*dataSize;
414         long long sizeBytesPlane = dimX*dimY*dataSize;
415         char *pImage = (char*)( newImage->GetScalarPointer(0,0,iWidth) );
416         for (j=dimZ-1;j>=0;j--)
417         {
418 #if defined(_WIN32)
419                 if (_lseeki64( fd, pos + j*sizeBytesPlane , SEEK_SET ) < 0)
420 #else
421                 if (lseek64(fd, pos + j*sizeBytesPlane , SEEK_SET) < 0) 
422 #endif // defined(_WIN32)
423                 {
424                         printf("EED ReadMHDPlane::Read64lseek \n");
425                         fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno));
426                         exit(1);
427                 }
428                 if ((ret = read(fd, pImage , dimX*dataSize)) < 0) 
429                 {
430                         fprintf(stderr, "Failed reading: %s\n", strerror(errno));
431                         exit(1);
432                 }
433                 pImage = pImage+dimX*dataSize;
434         } // for j
435 }
436
437 void ReadMHDPlane::Process()
438 {
439         if (bbGetInputActive()==true)
440         {
441                 if (bbGetInputType()==0)
442                 {
443                         //-- Split FileName
444                         std::string inputfilename;
445                         std::size_t found               =       bbGetInputFileName().find_last_of("/\\");
446                         std::string path                =       bbGetInputFileName().substr(0,found+1);
447                         std::string filename    =       bbGetInputFileName().substr(found+1);
448         #ifdef _WIN32
449                         path=path+"YZ_ZX\\";
450         #else
451                         path=path+"YZ_ZX/";
452         #endif
453                         if (bbGetInputDirectionPlane()=="XY") { inputfilename = bbGetInputFileName();           } // if XY
454                         if (bbGetInputDirectionPlane()=="YZ") { inputfilename = path+filename+"_YZ.mhd";        } // if YZ
455                         if (bbGetInputDirectionPlane()=="ZX") { inputfilename = path+filename+"_ZX.mhd";        } // if XZ
456                         Read64lseek( inputfilename ,"XY");
457                 }       
458                 if (bbGetInputType()==1)
459                 {
460                         Read64lseek( bbGetInputFileName(), bbGetInputDirectionPlane() );
461                 }       
462         } // if active
463 }
464
465 //===== 
466 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
467 //===== 
468 void ReadMHDPlane::bbUserSetDefaultValues()
469 {
470 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
471 //    Here we initialize the input 'In' to 0
472    bbSetInputActive(true);
473    bbSetInputFileName("");
474    bbSetInputSlice(0);
475    bbSetInputType(1);
476    bbSetInputWidth(1);
477    bbSetInputDirectionPlane("XY");
478 }
479
480 //===== 
481 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
482 //===== 
483 void ReadMHDPlane::bbUserInitializeProcessing()
484 {
485 //  THE INITIALIZATION METHOD BODY :
486 //    Here does nothing 
487 //    but this is where you should allocate the internal/output pointers 
488 //    if any 
489 }
490
491 //===== 
492 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
493 //===== 
494 void ReadMHDPlane::bbUserFinalizeProcessing()
495 {
496 //  THE FINALIZATION METHOD BODY :
497 //    Here does nothing 
498 //    but this is where you should desallocate the internal/output pointers 
499 //    if any 
500 }
501
502 } // EO namespace bbcreaVtk
503
504