]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx
e9634ee8169fbe19093cf0279f4ee95048cb31c0
[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                 fd = open ( filename.c_str() ,  O_RDONLY|O_LARGEFILE );
257 #endif // defined(_WIN32)
258                 if (fd < 0)
259                 {
260                         printf("EED ReadMHDPlane::Read64lseek   WARNNING! raw file not exist\n");
261                         fprintf(stderr, "%s\n", strerror(errno));
262                         newImage=CreateDefaultImage();
263 //                      exit(1);
264                 }       
265                 if ((plane=="XY") && (fd>=0)) 
266                 { 
267                         newImage->SetSpacing( spcX,spcY,spcZ );
268                         newImage->SetDimensions(  dimX,dimY,width );
269                         newImage->SetExtent(0,  dimX-1,0,dimY-1,0,width-1 );
270
271
272
273 //EED 2017-01-01 Migration VTK7
274 #if VTK_MAJOR_VERSION <= 5
275                         newImage->SetScalarType( imageType );
276                         newImage->SetWholeExtent(0,  dimX-1,0,dimY-1,0,width-1 );
277                         newImage->SetNumberOfScalarComponents(1);
278                         newImage->AllocateScalars();
279                         newImage->Update();
280 #else
281                 newImage->AllocateScalars(imageType,1);
282 #endif  
283                         
284                         pos = dimX*dimY*(long long)slice*dataSize;
285 #if defined(_WIN32)
286                         if (_lseeki64( fd, pos, SEEK_SET ) < 0)
287 #else
288                         if (lseek64(fd, pos, SEEK_SET) < 0) 
289 #endif // defined(_WIN32)
290                         {
291                                 printf("EED ReadMHDPlane::Read64lseek \n");
292                                 fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno));
293                                 exit(1);
294                         }
295                         if ((ret = read(fd, newImage->GetScalarPointer() , lsize)) < 0) 
296                         {
297                                 fprintf(stderr, "Failed reading: %s\n", strerror(errno));
298                                 exit(1);
299                         }
300                 }  // if PLANE XY
301                 if ((plane=="ZX") && (fd>=0))
302                 { 
303                         newImage->SetSpacing( spcX,spcZ,spcY );
304                         newImage->SetDimensions(  dimX,dimZ,width );
305                         newImage->SetExtent(0,  dimX-1,0,dimZ-1,0,width-1 );
306                         
307
308 //EED 2017-01-01 Migration VTK7
309 #if VTK_MAJOR_VERSION <= 5
310                         newImage->SetScalarType( imageType );
311                         newImage->SetWholeExtent(0,  dimX-1,0,dimZ-1,0,width-1 );
312                         newImage->SetNumberOfScalarComponents(1);
313                         newImage->AllocateScalars();
314                         newImage->Update();
315 #else
316                         newImage->AllocateScalars(imageType,1);
317 #endif  
318
319                         int iWidth;
320                         for (iWidth=0;iWidth<width;iWidth++)
321                         {
322                                 copy_ZX_plane(fd,newImage,slice+iWidth,iWidth,dimX,dimY,dimZ,dataSize);
323                         }
324                 }  // if PLANE XZ
325                 if ((plane=="YZ") && (fd>=0))
326                 { 
327                         newImage->SetSpacing( spcY,spcZ,spcX );
328                         newImage->SetDimensions(  dimY,dimZ,width );
329                         newImage->SetExtent(0,  dimY-1,0,dimZ-1,0,width-1 );
330                         
331 //EED 2017-01-01 Migration VTK7
332 #if VTK_MAJOR_VERSION <= 5
333                         newImage->SetScalarType( imageType );
334                         newImage->SetWholeExtent(0,  dimY-1,0,dimZ-1,0,width-1 );
335                         newImage->SetNumberOfScalarComponents(1);
336                         newImage->AllocateScalars();
337                         newImage->Update();
338 #else
339                         newImage->AllocateScalars(imageType,1);
340 #endif  
341                         
342                         int iWidth;
343                         for (iWidth=0;iWidth<width;iWidth++)
344                         {
345                                 copy_YZ_plane(fd,newImage,slice+iWidth,iWidth,dimX,dimY,dimZ,dataSize);
346                         }
347                 }  // if PLANE YZ       
348 #if defined(_WIN32)
349                 _close (fd);
350 #else
351                 close (fd);
352 #endif // defined(_WIN32)
353         } else {
354                 newImage=CreateDefaultImage();
355         } // if  ffIn
356         bbSetOutputOut( newImage );
357         bbSetOutputOut2( ChangeOrientation(newImage) );
358 }
359
360
361 void ReadMHDPlane::copy_YZ_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize)
362 {
363         long long int j;
364         long long int i;
365         long long       ret;
366         long long       pos;
367         long long sizeBytesPlane = dimX*dimY*dataSize;
368         char *pImage;
369         for (j=0;j<dimZ;j++)
370         {
371                 for (i=0;i<dimY;i++)
372                 {
373                         pos = ((long long int)slice+iWidth + i*dimX + j*dimX*dimY)*dataSize ;
374 #if defined(_WIN32)
375                         if (_lseeki64( fd, pos , SEEK_SET ) < 0)
376 #else
377                         if (lseek64(fd, pos , SEEK_SET) < 0) 
378 #endif // defined(_WIN32)
379                         {
380                                 printf("EED ReadMHDPlane::Read64lseek \n");
381                                 fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno));
382                                 exit(1);
383                         }
384
385                         pImage=(char*)(newImage->GetScalarPointer(i, dimZ-1-j,iWidth ));
386                         if ((ret = read(fd, pImage , dataSize)) < 0) 
387                         {
388                                 fprintf(stderr, "Failed reading: %s\n", strerror(errno));
389                                 exit(1);
390                         }
391                         } // for i
392                 } // for j
393 }
394
395
396 void ReadMHDPlane::copy_ZX_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize)
397 {
398         long long int j;
399         long long       ret;
400         long long       pos;
401         pos = dimX*(long long int)slice*dataSize;
402         long long sizeBytesPlane = dimX*dimY*dataSize;
403         char *pImage = (char*)( newImage->GetScalarPointer(0,0,iWidth) );
404         for (j=dimZ-1;j>=0;j--)
405         {
406 #if defined(_WIN32)
407                 if (_lseeki64( fd, pos + j*sizeBytesPlane , SEEK_SET ) < 0)
408 #else
409                 if (lseek64(fd, pos + j*sizeBytesPlane , SEEK_SET) < 0) 
410 #endif // defined(_WIN32)
411                 {
412                         printf("EED ReadMHDPlane::Read64lseek \n");
413                         fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno));
414                         exit(1);
415                 }
416                 if ((ret = read(fd, pImage , dimX*dataSize)) < 0) 
417                 {
418                         fprintf(stderr, "Failed reading: %s\n", strerror(errno));
419                         exit(1);
420                 }
421                 pImage = pImage+dimX*dataSize;
422         } // for j
423 }
424
425 void ReadMHDPlane::Process()
426 {
427         if (bbGetInputActive()==true)
428         {
429                 if (bbGetInputType()==0)
430                 {
431                         //-- Split FileName
432                         std::string inputfilename;
433                         std::size_t found               =       bbGetInputFileName().find_last_of("/\\");
434                         std::string path                =       bbGetInputFileName().substr(0,found+1);
435                         std::string filename    =       bbGetInputFileName().substr(found+1);
436         #ifdef _WIN32
437                         path=path+"YZ_ZX\\";
438         #else
439                         path=path+"YZ_ZX/";
440         #endif
441                         if (bbGetInputDirectionPlane()=="XY") { inputfilename = bbGetInputFileName();           } // if XY
442                         if (bbGetInputDirectionPlane()=="YZ") { inputfilename = path+filename+"_YZ.mhd";        } // if YZ
443                         if (bbGetInputDirectionPlane()=="ZX") { inputfilename = path+filename+"_ZX.mhd";        } // if XZ
444                         Read64lseek( inputfilename ,"XY");
445                 }       
446                 if (bbGetInputType()==1)
447                 {
448                         Read64lseek( bbGetInputFileName(), bbGetInputDirectionPlane() );
449                 }       
450         } // if active
451 }
452
453 //===== 
454 // 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)
455 //===== 
456 void ReadMHDPlane::bbUserSetDefaultValues()
457 {
458 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
459 //    Here we initialize the input 'In' to 0
460    bbSetInputActive(true);
461    bbSetInputFileName("");
462    bbSetInputSlice(0);
463    bbSetInputType(1);
464    bbSetInputWidth(1);
465    bbSetInputDirectionPlane("XY");
466 }
467
468 //===== 
469 // 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)
470 //===== 
471 void ReadMHDPlane::bbUserInitializeProcessing()
472 {
473 //  THE INITIALIZATION METHOD BODY :
474 //    Here does nothing 
475 //    but this is where you should allocate the internal/output pointers 
476 //    if any 
477 }
478
479 //===== 
480 // 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)
481 //===== 
482 void ReadMHDPlane::bbUserFinalizeProcessing()
483 {
484 //  THE FINALIZATION METHOD BODY :
485 //    Here does nothing 
486 //    but this is where you should desallocate the internal/output pointers 
487 //    if any 
488 }
489
490 } // EO namespace bbcreaVtk
491
492