From 8eabea73801eaefdfd58f678bc22c64b385a42f5 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 16 Apr 2020 11:04:17 +0200 Subject: [PATCH] #3389 creaVtk Feature New Normal - new box save_YZ_XZ_volume --- .../bbs/appli/save_YZ_XZ_volume.bbg | 34 +++ .../bbs/appli/save_YZ_XZ_volume.bbs | 27 ++ bbtk_creaVtk_PKG/src/bbcreaVtkMHDFileInfo.cxx | 1 + .../src/bbcreaVtkReadMHDPlane.cxx | 232 +++++++++--------- bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h | 2 +- .../src/bbcreaVtksave_YZ_XZ_volume.cxx | 193 +++++++++++++++ .../src/bbcreaVtksave_YZ_XZ_volume.h | 51 ++++ 7 files changed, 429 insertions(+), 111 deletions(-) create mode 100644 bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbg create mode 100644 bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbs create mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtksave_YZ_XZ_volume.cxx create mode 100644 bbtk_creaVtk_PKG/src/bbcreaVtksave_YZ_XZ_volume.h diff --git a/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbg b/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbg new file mode 100644 index 0000000..3ef22ce --- /dev/null +++ b/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbg @@ -0,0 +1,34 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /home/davila/Creatis/C10/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbg +# ---------------------------------- + +APP_START +CATEGORY: +DESCRIPTION:Description ?? +AUTHOR:Author ?? +COMPLEXBOX:FALSE +COMPLEXINPUTS:2 +COMPLEX_PORT +filename +10.332827:23.665507:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +compression +-17.999118:23.665507:-900.000000 +FIN_COMPLEX_PORT +BOXES:1 +BOX +creaVtk:save_YZ_XZ_volume:Box00 +ISEXEC:TRUE +-15.332582:-5.666389:-900.000000 +30.417418:-15.666389:-900.000000 +FIN_BOX +CONNECTIONS:2 +CONNECTION +compression:compression:Box00:Compression +NumberOfControlPoints:0 +CONNECTION +filename:filename:Box00:FileName +NumberOfControlPoints:0 +APP_END diff --git a/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbs b/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbs new file mode 100644 index 0000000..3562cb2 --- /dev/null +++ b/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbs @@ -0,0 +1,27 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script +# - /home/davila/Creatis/C10/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/save_YZ_XZ_volume.bbs +# ---------------------------------- + +# BBTK GEditor Script +# ---------------------- + +include std +include itkvtk +include creaVtk + +author "Author ??" +description "Description ??" +category "" + +new creaVtk:save_YZ_XZ_volume Box00 + + + + + + +# Complex input ports +input compression Box00.Compression " " +input filename Box00.FileName " " +exec Box00 diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkMHDFileInfo.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkMHDFileInfo.cxx index 4154990..9280727 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkMHDFileInfo.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkMHDFileInfo.cxx @@ -29,6 +29,7 @@ void MHDFileInfo::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " <AllocateScalars(); newImage->Update(); #else - newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1); +// newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1); + newImage->AllocateScalars(VTK_SHORT,1); #endif - memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*1 ); - for (i=0; iSetScalarComponentFromDouble(i,i,0, 0, 255 ); - newImage->SetScalarComponentFromDouble(i,sizeY-1-i,0, 0, 255 ); - } // for i +// memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*sizeZ*sizeof(unsigned char) ); + memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*sizeof(short) ); +// for (i=0; iSetScalarComponentFromDouble(i,i ,0, 0, 255 ); +// newImage->SetScalarComponentFromDouble(i,sizeY-1-i ,0, 0, 255 ); +// } // for i + newImage->Modified(); +*/ return newImage; } vtkImageData* ReadMHDPlane::ChangeOrientation(vtkImageData* imgOrg) { - int width = bbGetInputWidth(); - int ext[6]; - int sizeXOrg, sizeYOrg,sizeZOrg; - int sizeXDst, sizeYDst,sizeZDst; -//EED 2017-01-01 Migration VTK7 -#if VTK_MAJOR_VERSION <= 5 - imgOrg->GetWholeExtent(ext); -#else - imgOrg->GetExtent(ext); -#endif - int sizeLine; - - sizeXOrg = ext[1]-ext[0]+1; - sizeYOrg = ext[3]-ext[2]+1; - sizeZOrg = ext[5]-ext[4]+1; + vtkImageData *imgDst = NULL; - if (bbGetInputDirectionPlane()=="XY") - { - sizeXDst = ext[1]-ext[0]+1; - sizeYDst = ext[3]-ext[2]+1; - sizeZDst = width; - } // XY - if (bbGetInputDirectionPlane()=="YZ") - { - sizeXDst = width; - sizeYDst = ext[1]-ext[0]+1; - sizeZDst = ext[3]-ext[2]+1; - sizeLine = sizeYDst; - } // YZ - if (bbGetInputDirectionPlane()=="ZX") + if (imgOrg!=NULL) { - sizeXDst = ext[1]-ext[0]+1; - sizeYDst = width; - sizeZDst = ext[3]-ext[2]+1; - sizeLine = sizeXDst; - } // ZX - vtkImageData *imgDst = vtkImageData::New(); - imgDst->Initialize(); - imgDst->SetSpacing( imgOrg->GetSpacing() ); - imgDst->SetDimensions( sizeXDst,sizeYDst,sizeZDst ); - imgDst->SetExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 ); - -//EED 2017-01-01 Migration VTK7 -#if VTK_MAJOR_VERSION <= 5 - imgDst->SetWholeExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 ); - imgDst->SetScalarType( imgOrg->GetScalarType() ); - imgDst->SetNumberOfScalarComponents(1); - imgDst->AllocateScalars(); - imgDst->Update(); -#else - imgDst->AllocateScalars(imgOrg->GetScalarType(),1); -#endif + int width; + int ext[6]; + int sizeXOrg, sizeYOrg,sizeZOrg; + int sizeXDst, sizeYDst,sizeZDst; + //EED 2017-01-01 Migration VTK7 + #if VTK_MAJOR_VERSION <= 5 + imgOrg->GetWholeExtent(ext); + #else + imgOrg->GetExtent(ext); + #endif + int sizeLine; + + sizeXOrg = ext[1]-ext[0]+1; + sizeYOrg = ext[3]-ext[2]+1; + sizeZOrg = ext[5]-ext[4]+1; + width=sizeZOrg; + + if (bbGetInputDirectionPlane()=="XY") + { + sizeXDst = ext[1]-ext[0]+1; + sizeYDst = ext[3]-ext[2]+1; + sizeZDst = width; + } // XY + if (bbGetInputDirectionPlane()=="YZ") + { + sizeXDst = width; + sizeYDst = ext[1]-ext[0]+1; + sizeZDst = ext[3]-ext[2]+1; + sizeLine = sizeYDst; + } // YZ + if (bbGetInputDirectionPlane()=="ZX") + { + sizeXDst = ext[1]-ext[0]+1; + sizeYDst = width; + sizeZDst = ext[3]-ext[2]+1; + sizeLine = sizeXDst; + } // ZX + imgDst = vtkImageData::New(); + imgDst->Initialize(); + imgDst->SetSpacing( imgOrg->GetSpacing() ); + imgDst->SetDimensions( sizeXDst,sizeYDst,sizeZDst ); + imgDst->SetExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 ); + + //EED 2017-01-01 Migration VTK7 + #if VTK_MAJOR_VERSION <= 5 + imgDst->SetWholeExtent(0,sizeXDst-1,0,sizeYDst-1,0,sizeZDst-1 ); + imgDst->SetScalarType( imgOrg->GetScalarType() ); + imgDst->SetNumberOfScalarComponents(1); + imgDst->AllocateScalars(); + imgDst->Update(); + #else + imgDst->AllocateScalars(imgOrg->GetScalarType(),1); + #endif - char *ptrDst,*ptrOrg; - int sizeBytes = imgOrg->GetScalarSize(); - int sizeLineBytes = sizeLine*imgOrg->GetScalarSize(); - int xx,yy,zz; + char *ptrDst,*ptrOrg; + int sizeBytes = imgOrg->GetScalarSize(); + int sizeLineBytes = sizeLine*imgOrg->GetScalarSize(); + int xx,yy,zz; - long int sizeXDstBytes = sizeXDst*sizeBytes; - long int sizeXYDstBytes = sizeXDst*sizeYDst*sizeBytes; - long int sizeXYDstBytes2 = sizeXDst*sizeYDst*sizeBytes*2; - long int sizeXYZDstBytes = sizeXDst*sizeYDst*sizeZDst*sizeBytes; - long int sizeXYZDstBytes1 = sizeXDst*sizeYDst*(sizeZDst-1)*sizeBytes; + long int sizeXDstBytes = sizeXDst*sizeBytes; + long int sizeXYDstBytes = sizeXDst*sizeYDst*sizeBytes; + long int sizeXYDstBytes2 = sizeXDst*sizeYDst*sizeBytes*2; + long int sizeXYZDstBytes = sizeXDst*sizeYDst*sizeZDst*sizeBytes; + long int sizeXYZDstBytes1 = sizeXDst*sizeYDst*(sizeZDst-1)*sizeBytes; - ptrOrg = (char*)( imgOrg->GetScalarPointer() ); + ptrOrg = (char*)( imgOrg->GetScalarPointer() ); - if (bbGetInputDirectionPlane()=="XY") - { - memcpy ( imgDst->GetScalarPointer(), ptrOrg , sizeXDst*sizeYDst*sizeZDst*(imgOrg->GetScalarSize()) ); - } // if XY + if (bbGetInputDirectionPlane()=="XY") + { + memcpy ( imgDst->GetScalarPointer(), ptrOrg , sizeXDst*sizeYDst*sizeZDst*(imgOrg->GetScalarSize()) ); + } // if XY - if (bbGetInputDirectionPlane()=="ZX") - { - ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-00-1) ); - for( zz=0 ; zzGetScalarPointer(0,zz,sizeYOrg-00-1) ); - for( yy=0 ; yyGetScalarPointer(0,0,sizeYOrg-00-1) ); + for( zz=0 ; zzGetScalarPointer(0,yy,zz) ); -// ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-yy-1) ); - memcpy ( ptrDst, ptrOrg , sizeLineBytes ); - ptrOrg = ptrOrg + sizeLineBytes; - ptrDst = ptrDst - sizeXYDstBytes; - } // for yy - ptrDst = ptrDst + sizeXDstBytes; - ptrDst = ptrDst + sizeXYZDstBytes; - } // for zz - } // ZX - - if (bbGetInputDirectionPlane()=="YZ") - { - ptrDst = (char*)( imgDst->GetScalarPointer(0,0,sizeYOrg-0-1) ); - for( zz=0 ; zzGetScalarPointer(0,zz,sizeYOrg-00-1) ); + for( yy=0 ; yyGetScalarPointer(0,yy,zz) ); + // ptrDst=(char*)( imgDst->GetScalarPointer(0,zz,sizeYOrg-yy-1) ); + memcpy ( ptrDst, ptrOrg , sizeLineBytes ); + ptrOrg = ptrOrg + sizeLineBytes; + ptrDst = ptrDst - sizeXYDstBytes; + } // for yy + ptrDst = ptrDst + sizeXDstBytes; + ptrDst = ptrDst + sizeXYZDstBytes; + } // for zz + } // ZX + + if (bbGetInputDirectionPlane()=="YZ") { - ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-0-1) ); - for( yy=0 ; yyGetScalarPointer(0,0,sizeYOrg-0-1) ); + for( zz=0 ; zzGetScalarPointer(zz,0,sizeYOrg-yy-1) ); - for( xx=0 ; xxGetScalarPointer(zz,0,sizeYOrg-0-1) ); + for( yy=0 ; yyGetScalarPointer(xx,yy,zz) ); -// ptrDst=(char*)( imgDst->GetScalarPointer(zz,xx,sizeYOrg-yy-1) ); - memcpy ( ptrDst, ptrOrg , sizeBytes ); - ptrOrg+= sizeBytes; - ptrDst+= sizeXDstBytes; - } /// for xx - ptrDst = ptrDst - sizeXYDstBytes2; - } // for yy - ptrDst = ptrDst + sizeXYZDstBytes; -// ptrDst++; - } // for zz - } // ZX - + // ptrDst=(char*)( imgDst->GetScalarPointer(zz,0,sizeYOrg-yy-1) ); + for( xx=0 ; xxGetScalarPointer(xx,yy,zz) ); + // ptrDst=(char*)( imgDst->GetScalarPointer(zz,xx,sizeYOrg-yy-1) ); + memcpy ( ptrDst, ptrOrg , sizeBytes ); + ptrOrg+= sizeBytes; + ptrDst+= sizeXDstBytes; + } /// for xx + ptrDst = ptrDst - sizeXYDstBytes2; + } // for yy + ptrDst = ptrDst + sizeXYZDstBytes; + // ptrDst++; + } // for zz + } // ZX + } // if imgOrg return imgDst; } diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h b/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h index bd80f4b..4cc2e46 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h @@ -57,7 +57,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ReadMHDPlane,bbtk::AtomicBlackBox); BBTK_INPUT(ReadMHDPlane,FileName,"Image file name",std::string,""); BBTK_INPUT(ReadMHDPlane,Slice,"Slice number",int,""); BBTK_INPUT(ReadMHDPlane,Width,"(1 default) Number of slices to be read",int,""); - BBTK_INPUT(ReadMHDPlane,DirectionPlane,"Direction plane: XY (default), YZ , XZ",std::string,""); + BBTK_INPUT(ReadMHDPlane,DirectionPlane,"Direction plane: XY (default), YZ , ZX",std::string,""); BBTK_INPUT(ReadMHDPlane,Type,"(1 default) 0 = Normal mhd, 1 = lseek64",int,""); BBTK_OUTPUT(ReadMHDPlane,Out,"Image 2D",vtkImageData*,""); BBTK_OUTPUT(ReadMHDPlane,Out2,"Image 2D in the good orientation",vtkImageData*,""); diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtksave_YZ_XZ_volume.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtksave_YZ_XZ_volume.cxx new file mode 100644 index 0000000..8fcdaa5 --- /dev/null +++ b/bbtk_creaVtk_PKG/src/bbcreaVtksave_YZ_XZ_volume.cxx @@ -0,0 +1,193 @@ +//===== +// 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) +//===== +#include "bbcreaVtksave_YZ_XZ_volume.h" +#include "bbcreaVtkPackage.h" + +#include "vtkMetaImageReader.h" +#include "vtkMetaImageWriter.h" +#include "vtkImageData.h" +#include "creaVtk_MACROS.h" + +namespace bbcreaVtk +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,save_YZ_XZ_volume) +BBTK_BLACK_BOX_IMPLEMENTATION(save_YZ_XZ_volume,bbtk::AtomicBlackBox); +//===== +// 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) +//===== +void save_YZ_XZ_volume::Process() +{ + +// THE MAIN PROCESSING METHOD BODY +// Here we simply set the input 'In' value to the output 'Out' +// And print out the output value +// INPUT/OUTPUT ACCESSORS ARE OF THE FORM : +// void bbSet{Input|Output}NAME(const TYPE&) +// const TYPE& bbGet{Input|Output}NAME() const +// Where : +// * NAME is the name of the input/output +// (the one provided in the attribute 'name' of the tag 'input') +// * TYPE is the C++ type of the input/output +// (the one provided in the attribute 'type' of the tag 'input') + FILE *ff = fopen(bbGetInputFileName().c_str(),"r"); + if (ff!=NULL) + { + fclose(ff); + vtkMetaImageReader *reader=vtkMetaImageReader::New(); + reader->SetFileName(bbGetInputFileName().c_str()); + reader->Update(); + vtkImageData *image = reader->GetOutput(); + int dim[3]; + int ext[6]; + image->GetExtent(ext); + dim[0] = ext[1]-ext[0]+1; + dim[1] = ext[3]-ext[2]+1; + dim[2] = ext[5]-ext[4]+1; + double spc[3]; + image->GetSpacing(spc); + + vtkImageData *newImageYZ = vtkImageData::New(); + newImageYZ->Initialize(); + newImageYZ->SetSpacing( spc[1],spc[2],spc[0] ); + newImageYZ->SetDimensions( dim[1],dim[2], dim[0] ); + +//EED 2017-01-01 Migration VTK7 +#if (VTK_MAJOR_VERSION <= 5) + newImageYZ->SetScalarType( image->GetScalarType() ); + newImageYZ->SetNumberOfScalarComponents(1); + newImageYZ->AllocateScalars(); +#endif +#if (VTK_MAJOR_VERSION >= 6) + newImageYZ->AllocateScalars( image->GetScalarType(),1 ); +#endif + + vtkImageData *newImageZX = vtkImageData::New(); + newImageZX->Initialize(); + newImageZX->SetSpacing( spc[0],spc[2],spc[1] ); + newImageZX->SetDimensions( dim[0],dim[2], dim[1] ); + +//EED 2017-01-01 Migration VTK7 +#if (VTK_MAJOR_VERSION <= 5) + newImageZX->SetScalarType( image->GetScalarType() ); + newImageZX->SetNumberOfScalarComponents(1); + newImageZX->AllocateScalars(); +#endif +#if (VTK_MAJOR_VERSION >= 6) + newImageZX->AllocateScalars( image->GetScalarType(),1 ); +#endif + + DEF_POINTER_IMAGE_VTK_CREA(imageV,imageSS,imageP,imageST,image) + DEF_POINTER_IMAGE_VTK_CREA(newImageYZ_V,newImageYZ_SS,newImageYZ_P,newImageYZ_ST,newImageYZ) + DEF_POINTER_IMAGE_VTK_CREA(newImageZX_V,newImageZX_SS,newImageZX_P,newImageZX_ST,newImageZX) + long int newImageYZ_index; + long int newImageZX_index; + + int i,j,k; +// double value; + for (k=0;kGetScalarComponentAsDouble (i,j,k,0); + GETVALUE_VTK_CREA(imageV,imageP,imageST) + imageP=imageP+imageSS; + +// newImageYZ->SetScalarComponentFromDouble( j , dim[2]-k-1 , i , 0 , value ); + newImageYZ_index=j + (dim[2]-k-1)*dim[1] + i*dim[1]*dim[2]; + SETVALUE2_VTK_CREA(imageV,newImageYZ_P,newImageYZ_ST,newImageYZ_index) + +// newImageZX->SetScalarComponentFromDouble( i , dim[2]-k-1 , j , 0 ,value ); + newImageZX_index=i + (dim[2]-k-1)*dim[0] + j*dim[0]*dim[2]; + SETVALUE2_VTK_CREA(imageV,newImageZX_P,newImageZX_ST,newImageZX_index) + } // for i + } // for j + } // for k + + //-- Split FileName + std::size_t found = bbGetInputFileName().find_last_of("/\\"); + std::string path = bbGetInputFileName().substr(0,found+1); + std::string filename = bbGetInputFileName().substr(found+1); +#ifdef _WIN32 + path=path+"YZ_ZX\\"; +#else + path=path+"YZ_ZX/"; +#endif + std::string command_mkdir = "mkdir "+path; + system(command_mkdir.c_str()); + std::string newFileNameYZ = path+filename+"_YZ.mhd"; + std::string newFileNameZX = path+filename+"_ZX.mhd"; + + //-- Save _YZ + vtkMetaImageWriter * writerYZ = vtkMetaImageWriter::New(); +//EED 2017-01-01 Migration VTK7 +#if (VTK_MAJOR_VERSION <= 5) + writerYZ->SetInput(newImageYZ); +#endif +#if (VTK_MAJOR_VERSION >= 6) + writerYZ->SetInputData(newImageYZ); +#endif + writerYZ->SetFileName(newFileNameYZ.c_str()); + writerYZ->SetCompression( bbGetInputCompression() ); + writerYZ->Write(); + + //-- Save _ZX + vtkMetaImageWriter * writerZX = vtkMetaImageWriter::New(); +//EED 2017-01-01 Migration VTK7 +#if (VTK_MAJOR_VERSION <= 5) + writerZX->SetInput(newImageZX); +#endif +#if (VTK_MAJOR_VERSION >= 6) + writerZX->SetInputData(newImageZX); +#endif + writerZX->SetFileName(newFileNameZX.c_str()); + writerZX->SetCompression( bbGetInputCompression() ); + writerZX->Write(); + + } else { + printf("EED Save-YZ-XZ-planes::Process %s Not Exist!\n", bbGetInputFileName().c_str() ); + } +} +//===== +// 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) +//===== +void save_YZ_XZ_volume::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + bbSetInputFileName(""); + bbSetInputCompression( false ); +} +//===== +// 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) +//===== +void save_YZ_XZ_volume::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + + +} +//===== +// 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) +//===== +void save_YZ_XZ_volume::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbcreaVtk + + diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtksave_YZ_XZ_volume.h b/bbtk_creaVtk_PKG/src/bbcreaVtksave_YZ_XZ_volume.h new file mode 100644 index 0000000..c34b9db --- /dev/null +++ b/bbtk_creaVtk_PKG/src/bbcreaVtksave_YZ_XZ_volume.h @@ -0,0 +1,51 @@ +//===== +// 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) +//===== +#ifndef __bbcreaVtksave_YZ_XZ_volume_h_INCLUDED__ +#define __bbcreaVtksave_YZ_XZ_volume_h_INCLUDED__ + +#include "bbcreaVtk_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +namespace bbcreaVtk +{ + +class bbcreaVtk_EXPORT save_YZ_XZ_volume + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(save_YZ_XZ_volume,bbtk::AtomicBlackBox); +//===== +// 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) +//===== + BBTK_DECLARE_INPUT(FileName,std::string); + BBTK_DECLARE_INPUT(Compression,bool); +// BBTK_DECLARE_OUTPUT(Out,double); + BBTK_PROCESS(Process); + void Process(); +//===== +// 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) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(save_YZ_XZ_volume,bbtk::AtomicBlackBox); + BBTK_NAME("save_YZ_XZ_volume"); + BBTK_AUTHOR("InfoDev"); + BBTK_DESCRIPTION("No Description."); + BBTK_CATEGORY("empty"); + + BBTK_INPUT(save_YZ_XZ_volume,FileName,"File name",std::string,""); + BBTK_INPUT(save_YZ_XZ_volume,Compression,"(default false) Compression true/false",bool,""); + +//BBTK_OUTPUT(save_YZ_XZ_volume,Out,"First output",double,""); + +BBTK_END_DESCRIBE_BLACK_BOX(save_YZ_XZ_volume); +//===== +// 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) +//===== +} +// EO namespace bbcreaVtk + +#endif // __bbcreaVtksave_YZ_XZ_volume_h_INCLUDED__ + -- 2.45.1