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