-FILE(GLOB_RECURSE ALL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.*")
+FILE(GLOB_RECURSE ALL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*")
# TO DO : REMOVE CMakeLists.txt FROM LIST !!!
*/
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+
//===========================================================================
/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input
-#define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE) \
- public: \
- TYPE bbGetInput##NAME () \
- { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
- void bbSetInput##NAME (TYPE d) \
- { if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+ #define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE) \
+ public: \
+ TYPE bbGetInput##NAME () \
+ { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
+ void bbSetInput##NAME (TYPE d) \
+ { if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+#else
+//===========================================================================
+/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input
+ #define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE) \
+ public: \
+ TYPE bbGetInput##NAME () \
+ { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
+ void bbSetInput##NAME (TYPE d) \
+ { if (mVtkObject) mVtkObject->SetInputData( (vtkDataObject*) d); }
+
+#endif
+
//===========================================================================
//===========================================================================
//===========================================================================
+
+//EED 2017-01-01 Migration VTK7
+
+#if (VTK_MAJOR_VERSION <= 5)
+
/// Declares a vtkAlgorithm-inherited AtomicBlackBox input
#define BBTK_DECLARE_VTK_INPUT(NAME,TYPE) \
public: \
void bbSetInput##NAME (TYPE d) \
{ if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+#endif
+
+
+
+#if (VTK_MAJOR_VERSION >= 6)
+
+/// Declares a vtkAlgorithm-inherited AtomicBlackBox input
+#define BBTK_DECLARE_VTK_INPUT(NAME,TYPE) \
+ public: \
+ TYPE bbGetInput##NAME () \
+ { if (mVtkObject) return dynamic_cast<TYPE>(mVtkObject->GetInput()); \
+ return 0;} \
+ void bbSetInput##NAME (TYPE d) \
+ { if (mVtkObject) mVtkObject->SetInputData( (vtkDataObject*) d); }
+
+#endif
+
+
//===========================================================================
//===========================================================================
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/gdcmvtk/bbs/appli/exampleGetInfoGdcmReader.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:11
+BOX
+wx:FileSelector:openFileDialog
+ISEXEC:FALSE
+-66.428291:81.722640:-900.000000
+-20.328291:71.722640:-900.000000
+FIN_BOX
+BOX
+gdcmvtk:GetInfoGdcmReader:readerginf
+ISEXEC:FALSE
+-70.412484:36.879021:-900.000000
+-19.512484:26.879021:-900.000000
+FIN_BOX
+BOX
+std:Configuration:Box02
+ISEXEC:FALSE
+-1.653193:82.659639:-900.000000
+37.771807:72.659639:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box03
+ISEXEC:FALSE
+-5.861320:59.815520:-900.000000
+33.863680:49.815520:-900.000000
+PORT
+In2:"/gdcmvtk/dicom01/466"
+FIN_BOX
+BOX
+wx:OutputText:Box04
+ISEXEC:FALSE
+-98.965429:-34.997965:-900.000000
+-62.190429:-44.997965:-900.000000
+PORT
+Title:"IOP"
+FIN_BOX
+BOX
+wx:LayoutLine:Box05
+ISEXEC:FALSE
+-52.597120:-59.500261:-900.000000
+4.962880:-69.500261:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box06
+ISEXEC:FALSE
+-81.670654:-19.843773:-900.000000
+-44.895654:-29.843773:-900.000000
+PORT
+Title:"IPP"
+FIN_BOX
+BOX
+wx:OutputText:Box07
+ISEXEC:FALSE
+-62.533069:-3.150159:-900.000000
+-25.758069:-13.150159:-900.000000
+PORT
+Title:"InterSlice"
+FIN_BOX
+BOX
+wx:OutputText:Box08
+ISEXEC:FALSE
+-40.819498:13.505161:-900.000000
+-4.044498:3.505161:-900.000000
+PORT
+Title:"PixelSpacing"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box09
+ISEXEC:FALSE
+13.959072:-59.021307:-900.000000
+77.679072:-69.021307:-900.000000
+PORT
+nTypeView:"0"
+FIN_BOX
+BOX
+wx:LayoutSplit:Box11
+ISEXEC:TRUE
+-13.676413:-79.653834:-900.000000
+25.403587:-89.653834:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:13
+CONNECTION
+Box02:DataPath:Box03:In1
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:readerginf:In
+NumberOfControlPoints:0
+CONNECTION
+readerginf:IOP:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+readerginf:IPP:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box05:Widget2
+NumberOfControlPoints:0
+CONNECTION
+readerginf:InterSlice:Box07:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Widget:Box05:Widget3
+NumberOfControlPoints:0
+CONNECTION
+readerginf:PixelSpacing:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box05:Widget4
+NumberOfControlPoints:0
+CONNECTION
+readerginf:Out:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box11:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:Box11:Widget2
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/gdcmvtk/bbs/appli/exampleGetInfoGdcmReader.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wx
+include gdcmvtk
+include std
+include creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
category "example"
+new wx:FileSelector openFileDialog
+
+new gdcmvtk:GetInfoGdcmReader readerginf
+
+new std:Configuration Box02
+
+new std:ConcatStrings Box03
+ set Box03.In2 "/gdcmvtk/dicom01/466"
+
+new wx:OutputText Box04
+ set Box04.Title "IOP"
+
+new wx:LayoutLine Box05
+
+new wx:OutputText Box06
+ set Box06.Title "IPP"
+
+new wx:OutputText Box07
+ set Box07.Title "InterSlice"
+
+new wx:OutputText Box08
+ set Box08.Title "PixelSpacing"
+
+new creaMaracasVisu:ViewerNV Box09
+ set Box09.nTypeView "0"
+
+new wx:LayoutSplit Box11
+ set Box11.Orientation "H"
+
+
+connect Box02.DataPath Box03.In1
+
+connect Box03.Out readerginf.In
+
+connect readerginf.IOP Box04.In
+
+connect Box04.Widget Box05.Widget1
+
+connect readerginf.IPP Box06.In
+
+connect Box06.Widget Box05.Widget2
-load gdcmvtk
-load std
-load wx
+connect readerginf.InterSlice Box07.In
+connect Box07.Widget Box05.Widget3
-//message all 9
+connect readerginf.PixelSpacing Box08.In
-new FileSelector openFileDialog
-new GetInfoGdcmReader readerginf
- connect openFileDialog.Out readerginf.In
-exec readerginf
-
-// No adaptor
-//print $readerginf.Out$
+connect Box08.Widget Box05.Widget4
-print IOP
-print $readerginf.IOP$
+connect readerginf.Out Box09.In
-print IPP
-print $readerginf.IPP$
+connect Box05.Widget Box11.Widget1
-print PixelSpacing
-print $readerginf.PixelSpacing$
+connect Box09.Widget Box11.Widget2
-print InterSlice
-print $readerginf.InterSlice$
+# Complex input ports
+exec Box11
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/gdcmvtk/bbs/appli/exampleGetXCoherentInfoGdcmReader.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:11
+BOX
+std:Configuration:Box02
+ISEXEC:FALSE
+-38.753415:87.335854:-900.000000
+0.671585:77.335854:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box03
+ISEXEC:FALSE
+-52.654242:69.240631:-900.000000
+-12.929242:59.240631:-900.000000
+PORT
+In2:"/gdcmvtk/dicom01"
+FIN_BOX
+BOX
+wx:OutputText:Box04
+ISEXEC:FALSE
+-98.965429:-34.997965:-900.000000
+-62.190429:-44.997965:-900.000000
+PORT
+Title:"IOP"
+FIN_BOX
+BOX
+wx:LayoutLine:Box05
+ISEXEC:FALSE
+-65.243633:-57.360082:-900.000000
+-7.683633:-67.360082:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box06
+ISEXEC:FALSE
+-81.670654:-19.843773:-900.000000
+-44.895654:-29.843773:-900.000000
+PORT
+Title:"IPP"
+FIN_BOX
+BOX
+wx:OutputText:Box08
+ISEXEC:FALSE
+-63.079632:-1.609744:-900.000000
+-26.304632:-11.609744:-900.000000
+PORT
+Title:"PixelSpacing"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box09
+ISEXEC:FALSE
+8.622122:-57.999232:-900.000000
+72.342122:-67.999232:-900.000000
+FIN_BOX
+BOX
+gdcmvtk:GetXCoherentInfoGdcmReader:Box11
+ISEXEC:FALSE
+-76.899274:28.508473:-900.000000
+-19.924274:18.508473:-900.000000
+FIN_BOX
+BOX
+wx:DirectorySelector:Box12
+ISEXEC:FALSE
+-101.781353:71.143492:-900.000000
+-58.831353:61.143492:-900.000000
+FIN_BOX
+BOX
+std:FilesFromDirectory:Box13
+ISEXEC:FALSE
+-70.012805:52.008449:-900.000000
+-26.137805:42.008449:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box14
+ISEXEC:TRUE
+-11.430502:-80.373451:-900.000000
+27.649498:-90.373451:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:12
+CONNECTION
+Box02:DataPath:Box03:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box05:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box05:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box11:IOP:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:IPP:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:PixelSpacing:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box13:In
+NumberOfControlPoints:0
+CONNECTION
+Box11:Out:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box14:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:Box14:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box13:Out:Box11:In
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/gdcmvtk/bbs/appli/exampleGetXCoherentInfoGdcmReader.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include std
+include wx
+include creaMaracasVisu
+include gdcmvtk
+
+author "Author ??"
+description "Description ??"
category "example"
-load gdcmvtk
-load std
-load wx
+new std:Configuration Box02
+
+new std:ConcatStrings Box03
+ set Box03.In2 "/gdcmvtk/dicom01"
+
+new wx:OutputText Box04
+ set Box04.Title "IOP"
+
+new wx:LayoutLine Box05
+
+new wx:OutputText Box06
+ set Box06.Title "IPP"
+
+new wx:OutputText Box08
+ set Box08.Title "PixelSpacing"
+
+new creaMaracasVisu:ViewerNV Box09
+
+new gdcmvtk:GetXCoherentInfoGdcmReader Box11
+
+new wx:DirectorySelector Box12
+
+new std:FilesFromDirectory Box13
+
+new wx:LayoutSplit Box14
+ set Box14.Orientation "H"
+
+
+connect Box02.DataPath Box03.In1
+
+connect Box04.Widget Box05.Widget1
+
+connect Box06.Widget Box05.Widget2
+
+connect Box08.Widget Box05.Widget4
+
+connect Box11.IOP Box04.In
+connect Box11.IPP Box06.In
-//message all 9
+connect Box11.PixelSpacing Box08.In
-// To choose the directory
-new DirectorySelector ds
-// To get the image names into a vector
-new FilesFromDirectory fd
- connect ds.Out fd.In
-// list of files as input
-#print "In $ds.Out$\n
-#print "Files found : $fd.Out$\n
-// user choosen directory as input
-new GetXCoherentInfoGdcmReader reader
-connect fd.Out reader.In
-exec reader
+connect Box03.Out Box13.In
-// No adaptor
-#print $reader.Out$
+connect Box11.Out Box09.In
-print IOP
-print $reader.IOP$
+connect Box05.Widget Box14.Widget1
-print IPP
-print $reader.IPP$
+connect Box09.Widget Box14.Widget2
-print PixelSpacing
-print $reader.PixelSpacing$
+connect Box13.Out Box11.In
+# Complex input ports
+exec Box14
f->GetImagePositionPatient(ipp);
for(i=0; i< 3; i++)
+ {
v_ipp.push_back(ipp[i]);
+ } // for i
bbSetOutputIPP(v_ipp );
std::vector<double> v_pixelspacing;
if (f->GetZSize() != 1)
{
v_pixelspacing.push_back(f->GetZSpacing());
- }
+ } // if size
bbSetOutputPixelSpacing(v_pixelspacing);
//double interslice;
reader = vtkGdcmReader::New();
reader->SetFileName( bbGetInputIn().c_str() );
+ reader->SetFlipY(true);
reader->Update();
reader->GetOutput();
- vtkIndent indent ;
- reader->GetOutput()->PrintSelf(std::cout, indent);
+// vtkIndent indent ;
+// reader->GetOutput()->PrintSelf(std::cout, indent);
bbSetOutputOut( reader->GetOutput() );
}
#endif
deIop.GetValue().Print(ss);
gdcm::Element<gdcm::VR::DS,gdcm::VM::VM6> iop;
iop.Read( ss );
- for(i=0; i< 6; i++)
+ for(i=0; i< 6; i++)
+ {
v_iop.push_back((float)(iop[i]));
+ } // for i
bbSetOutputIOP(v_iop );
// Image Position (Patient)
deIpp.GetValue().Print(ss);
gdcm::Element<gdcm::VR::DS,gdcm::VM::VM3> ipp;
ipp.Read( ss );
- for(i=0; i< 3; i++)
+ for(i=0; i< 3; i++)
+ {
v_ipp.push_back((float)(ipp[i]));
+ } // for
bbSetOutputIPP(v_ipp );
std::vector<double> v_pixelspacing = gdcm::ImageHelper::GetSpacingValue(f);
sizeZ = 1;
vtkImageData *newImage = vtkImageData::New();
newImage->Initialize();
- newImage->SetScalarTypeToUnsignedChar();
newImage->SetSpacing( 1,1,1 );
newImage->SetDimensions( sizeX,sizeY,sizeZ );
- newImage->SetWholeExtent(0, sizeX-1,0,sizeY-1,0,sizeZ-1 );
newImage->SetExtent(0, sizeX-1,0,sizeY-1,0,sizeZ-1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ newImage->SetWholeExtent(0, sizeX-1,0,sizeY-1,0,sizeZ-1 );
+ newImage->SetScalarTypeToUnsignedChar();
newImage->SetNumberOfScalarComponents(1);
newImage->AllocateScalars();
newImage->Update();
+#else
+ newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*1 );
for (i=0; i<sizeX; i++)
{
f->SetFileName( bbGetInputIn()[0] );
} else {
f->SetFileName( "" );
- }
+ } // if
bool res = f->Load();
if ( !res )
f->Delete();
bbSetOutputOut( CreateDefaultImage() );
return;
- }
+ } // if res
// Get info from the first image file
int i;
std::vector<double> v_iop;
f->GetImageOrientationPatient(iop);
for(i=0; i< 6; i++)
+ {
v_iop.push_back(iop[i]);
+ } // for i
bbSetOutputIOP(v_iop );
std::vector<double> v_ipp;
f->GetImagePositionPatient(ipp);
for(i=0; i< 3; i++)
+ {
v_ipp.push_back(ipp[i]);
+ } // for i
bbSetOutputIPP(v_ipp );
// Add *all the files* to the SerieHelper
++it)
{
sh->AddFileName(*it);
- }
+ } //for vector
GDCM_NAME_SPACE::FileList::const_iterator it;
l = sh->GetFirstSingleSerieUIDFileSet();
int nbFiles;
- double zspacing = 0.;
- nbFiles = l->size() ;
+ double zspacing = 0.;
+ nbFiles = l->size() ;
sh->OrderFileList(l); // this one should compute the *actual* Z Spacing!
- zspacing = sh->GetZSpacing();
+ zspacing = sh->GetZSpacing();
std::vector<double> v_pixelspacing;
v_pixelspacing.push_back( f->GetXSpacing() );
v_pixelspacing.push_back( f->GetYSpacing() );
// v_pixelspacing.push_back(f->GetZSpacing());
// }
bbSetOutputPixelSpacing(v_pixelspacing);
-
if (reader!=NULL)
{
reader->Delete();
- reader=NULL;
+ reader = NULL;
}
reader = vtkGdcmReader::New();
-
//EED 21 mars 2012 FLIP probleme ..PLOP..
reader->SetFlipY(false);
-
-
//reader->SetFileName( bbGetInputIn().c_str() );
reader->SetCoherentFileList(l);
reader->Update();
+ reader->GetOutput();
+
+printf("EED GetXCoherentInfoGdcmReader::Process \n");
bbSetOutputOut( reader->GetOutput() );
}
#endif
gdcm::Element<gdcm::VR::DS,gdcm::VM::VM6> iop;
iop.Read( ss );
for(i=0; i< 6; i++)
- v_iop.push_back((float)(iop[i]));
+ {
+ v_iop.push_back((float)(iop[i]));
+ }
bbSetOutputIOP(v_iop );
std::vector<double> v_ipp;
deIpp.GetValue().Print(ss);
gdcm::Element<gdcm::VR::DS,gdcm::VM::VM3> ipp;
ipp.Read( ss );
- for(i=0; i< 3; i++)
+ for(i=0; i< 3; i++)
+ {
v_ipp.push_back((float)(ipp[i]));
+ } // for 3
bbSetOutputIPP(v_ipp );
// Add *all the files* to the IPPsorter
void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
{
if(reader)
+ {
reader->Delete();
+ } // if reader
if(f)
+ {
f->Delete();
+ } // if f
if(sh)
+ {
sh->Delete();
+ } // if sh
}
#endif
void GetXCoherentInfoGdcmReader::bbUserFinalizeProcessing()
{
if(reader)
+ {
reader->Delete();
+ }
}
#endif
VTKImageToImageFilter<TOutputImage>
::SetInput( vtkImageData * inputImage )
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
m_Exporter->SetInput( inputImage );
+#else
+ m_Exporter->SetInputData( inputImage );
+#endif
}
+++ /dev/null
-ObjectType = Image
-NDims = 3
-BinaryData = True
-BinaryDataByteOrderMSB = False
-ElementSpacing = 0.796875 0.796875 0.7
-DimSize = 112 131 192
-Position = 0 0 0
-ElementNumberOfChannels = 1
-ElementType = MET_USHORT
-ElementDataFile = hola.raw
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleMagnitud.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:11
+BOX
+vtk:Magnitud:Box00
+ISEXEC:FALSE
+-53.653620:-11.121479:-900.000000
+-5.333620:-21.121479:-900.000000
+PORT
+Contour:"2"
+PORT
+MRatio:"1"
+PORT
+MoveX:"0"
+PORT
+MoveY:"0"
+PORT
+MoveZ:"0"
+PORT
+Opactity:"1"
+PORT
+PlaneCenterSL:"20 20 20"
+PORT
+Scale:"100"
+PORT
+ShowPlane:"1"
+PORT
+ShowStream:"1"
+PORT
+ValInf:"0"
+PORT
+ValSup:"1000"
+FIN_BOX
+BOX
+std:Configuration:Box01
+ISEXEC:FALSE
+-20.890345:63.422486:-900.000000
+18.534655:53.422486:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box02
+ISEXEC:FALSE
+-34.717048:42.682432:-900.000000
+5.007952:32.682432:-900.000000
+PORT
+In2:"/creaVtk/Vectors.vtk"
+FIN_BOX
+BOX
+vtk:StructuredPointsReader:Box03
+ISEXEC:FALSE
+-48.243171:16.832508:-900.000000
+0.456829:6.832508:-900.000000
+FIN_BOX
+BOX
+creaVtk:Actor:Box06
+ISEXEC:TRUE
+41.029239:-68.231774:-900.000000
+72.629239:-78.231774:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+vtk:LoadHola:Box07
+ISEXEC:FALSE
+21.190926:-10.820898:-900.000000
+56.740926:-20.820898:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box08
+ISEXEC:TRUE
+11.572349:-29.456889:-900.000000
+75.292349:-39.456889:-900.000000
+FIN_BOX
+BOX
+creaVtk:Actor:Box09
+ISEXEC:TRUE
+-111.804551:-63.561380:-900.000000
+-80.204551:-73.561380:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaVtk:Actor:Box10
+ISEXEC:TRUE
+-70.763916:-64.902596:-900.000000
+-39.163916:-74.902596:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaVtk:Actor:Box11
+ISEXEC:TRUE
+-33.931408:-73.758324:-900.000000
+-2.331408:-83.758324:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaVtk:Actor:Box12
+ISEXEC:TRUE
+1.999359:-69.689091:-900.000000
+33.599359:-79.689091:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+CONNECTIONS:14
+CONNECTION
+Box01:DataPath:Box02:In1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out5:Box06:In
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box08:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box06:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out1:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out2:Box10:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out3:Box11:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out4:Box12:In
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box12:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box11:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box10:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box08:Renderer1:Box09:Renderer
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleMagnitud.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include std
+include creaVtk
+include creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:Magnitud Box00
+ set Box00.Contour "2"
+ set Box00.MRatio "1"
+ set Box00.MoveX "0"
+ set Box00.MoveY "0"
+ set Box00.MoveZ "0"
+ set Box00.Opactity "1"
+ set Box00.PlaneCenterSL "20 20 20"
+ set Box00.Scale "100"
+ set Box00.ShowPlane "1"
+ set Box00.ShowStream "1"
+ set Box00.ValInf "0"
+ set Box00.ValSup "1000"
+
+new std:Configuration Box01
+
+new std:ConcatStrings Box02
+ set Box02.In2 "/creaVtk/Vectors.vtk"
+
+new vtk:StructuredPointsReader Box03
+
+new creaVtk:Actor Box06
+ set Box06.Active "true"
+
+new vtk:LoadHola Box07
+
+new creaMaracasVisu:ViewerNV Box08
+
+new creaVtk:Actor Box09
+ set Box09.Active "true"
+
+new creaVtk:Actor Box10
+ set Box10.Active "true"
+
+new creaVtk:Actor Box11
+ set Box11.Active "true"
+
+new creaVtk:Actor Box12
+ set Box12.Active "true"
+
+
+connect Box01.DataPath Box02.In1
+
+connect Box02.Out Box03.In
+
+connect Box03.Out Box00.In
+
+connect Box00.Out5 Box06.In
+
+connect Box07.Out Box08.In
+
+connect Box08.Renderer1 Box06.Renderer
+
+connect Box00.Out1 Box09.In
+
+connect Box00.Out2 Box10.In
+
+connect Box00.Out3 Box11.In
+
+connect Box00.Out4 Box12.In
+
+connect Box08.Renderer1 Box12.Renderer
+
+connect Box08.Renderer1 Box11.Renderer
+
+connect Box08.Renderer1 Box10.Renderer
+
+connect Box08.Renderer1 Box09.Renderer
+
+
+
+# Complex input ports
+exec Box06
+exec Box08
+exec Box09
+exec Box10
+exec Box11
+exec Box12
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_1.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example mesh
+DESCRIPTION:LoadHola box example
+AUTHOR:Info-dev at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:5
+BOX
+vtk:PolyDataReader:pdr
+ISEXEC:FALSE
+-42.643201:37.859821:-900.000000
+-3.143201:27.859821:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:pdActor
+ISEXEC:FALSE
+-43.231617:15.778483:-900.000000
+1.293383:5.778483:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:TRUE
+-58.052491:-20.642054:-900.000000
+5.667509:-30.642054:-900.000000
+FIN_BOX
+BOX
+std:Configuration:Box04
+ISEXEC:FALSE
+-32.462694:83.943937:-900.000000
+6.962306:73.943937:-900.000000
+FIN_BOX
+BOX
+std:ConcatStrings:Box05
+ISEXEC:FALSE
+-40.946976:65.422216:-900.000000
+-1.221976:55.422216:-900.000000
+PORT
+In2:"/vtk/bunny.vtk"
+FIN_BOX
+CONNECTIONS:4
+CONNECTION
+pdr:Out:pdActor:In
+NumberOfControlPoints:0
+CONNECTION
+pdActor:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:DataPath:Box05:In1
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:pdr:In
+NumberOfControlPoints:0
+APP_END
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-# pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-# This software is governed by the CeCILL-B license under French law and
-# abiding by the rules of distribution of free software. You can use,
-# modify and/ or redistribute the software under the terms of the CeCILL-B
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-# or in the file LICENSE.txt.
-#
-# As a counterpart to the access to the source code and rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty and the software's author, the holder of the
-# economic rights, and the successive licensors have only limited
-# liability.
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_1.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+include std
+include itkvtk
+include vtk
+include wxvtk
+include std
-description "LoadHola box example"
author "Info-dev at creatis.insa-lyon.fr"
+description "LoadHola box example"
category "example mesh"
-load vtk
-load wx
-load wxvtk
-load std
+new vtk:PolyDataReader pdr
+
+new vtk:PolyDataToActor pdActor
+
+new wxvtk:Viewer3D viewer
+
+new std:Configuration Box04
+
+new std:ConcatStrings Box05
+ set Box05.In2 "/vtk/bunny.vtk"
+
+
+connect pdr.Out pdActor.In
+
+connect pdActor.Out viewer.In1
-new FileSelector fileName
- set fileName.Wildcard "*.vtk"
+connect Box04.DataPath Box05.In1
-new PolyDataReader pdr
- connect fileName.Out pdr.In
+connect Box05.Out pdr.In
-new PolyDataToActor pdActor
- connect pdr.Out pdActor.In
-new Viewer3D viewer
- connect pdActor.Out viewer.In1
+# Complex input ports
exec viewer
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_2.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example mesh
+DESCRIPTION:LoadBunny_vtkPolyData box example
+AUTHOR:Info-dev at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:3
+BOX
+vtk:LoadBunny_vtkPolyData:pdr
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+47.075000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:pdActor
+ISEXEC:FALSE
+-7.244640:41.412518:-900.000000
+37.280360:31.412518:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:TRUE
+0.000000:10.000000:-900.000000
+63.720000:0.000000:-900.000000
+FIN_BOX
+CONNECTIONS:2
+CONNECTION
+pdr:Out:pdActor:In
+NumberOfControlPoints:0
+CONNECTION
+pdActor:Out:viewer:In1
+NumberOfControlPoints:0
+APP_END
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-# pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-# This software is governed by the CeCILL-B license under French law and
-# abiding by the rules of distribution of free software. You can use,
-# modify and/ or redistribute the software under the terms of the CeCILL-B
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-# or in the file LICENSE.txt.
-#
-# As a counterpart to the access to the source code and rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty and the software's author, the holder of the
-# economic rights, and the successive licensors have only limited
-# liability.
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleReadView_vtkPolyData_2.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+include std
+include itkvtk
+include vtk
+include wxvtk
-description "LoadBunny_vtkPolyData box example"
author "Info-dev at creatis.insa-lyon.fr"
+description "LoadBunny_vtkPolyData box example"
category "example mesh"
+new vtk:LoadBunny_vtkPolyData pdr
+
+new vtk:PolyDataToActor pdActor
+
+new wxvtk:Viewer3D viewer
-load wx
-load wxvtk
-load std
-include vtk
-//new PolyDataReader pdr
-// set pdr.In "/Users/davila/Borrame/Images/Helena/bunny.vtk"
+connect pdr.Out pdActor.In
-new LoadBunny_vtkPolyData pdr
+connect pdActor.Out viewer.In1
-new PolyDataToActor pdActor
- connect pdr.Out pdActor.In
-new Viewer3D viewer
- connect pdActor.Out viewer.In1
+# Complex input ports
exec viewer
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleSave_vtkPolyData.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example mesh
+DESCRIPTION:Save a vtkPolyData example
+AUTHOR:info-dev at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:8
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+-64.799460:68.621288:-900.000000
+-28.549460:58.621288:-900.000000
+FIN_BOX
+BOX
+vtk:MarchingCubes:mc
+ISEXEC:FALSE
+-48.298304:41.378712:-900.000000
+-9.148304:31.378712:-900.000000
+PORT
+Value:"1000"
+FIN_BOX
+BOX
+wx:FileSelector:saveFileName
+ISEXEC:FALSE
+9.650983:40.331662:-900.000000
+54.950983:30.331662:-900.000000
+PORT
+OpenSave:"Save"
+FIN_BOX
+BOX
+vtk:PolyDataWriter:pdw
+ISEXEC:FALSE
+-67.600270:-21.034034:-900.000000
+-28.700270:-31.034034:-900.000000
+FIN_BOX
+BOX
+vtk:PolyDataToActor:pdActor
+ISEXEC:FALSE
+11.029695:-8.293965:-900.000000
+55.554695:-18.293965:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-35.889896:-61.732067:-900.000000
+27.830104:-71.732067:-900.000000
+FIN_BOX
+BOX
+wx:CommandButton:button
+ISEXEC:FALSE
+-122.705360:20.288275:-900.000000
+-79.530360:10.288275:-900.000000
+PORT
+Label:"Save vtkPolyData"
+FIN_BOX
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+-52.779117:-102.430101:-900.000000
+-13.699117:-112.430101:-900.000000
+PORT
+Proportion:"90"
+FIN_BOX
+CONNECTIONS:8
+CONNECTION
+reader:Out:mc:In
+NumberOfControlPoints:0
+CONNECTION
+saveFileName:Out:pdw:Filename
+NumberOfControlPoints:0
+CONNECTION
+mc:Out:pdw:In
+NumberOfControlPoints:0
+CONNECTION
+mc:Out:pdActor:In
+NumberOfControlPoints:0
+CONNECTION
+pdActor:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+button:BoxChange:pdw:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+button:Widget:main:Widget2
+NumberOfControlPoints:0
+APP_END
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-# pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-# This software is governed by the CeCILL-B license under French law and
-# abiding by the rules of distribution of free software. You can use,
-# modify and/ or redistribute the software under the terms of the CeCILL-B
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-# or in the file LICENSE.txt.
-#
-# As a counterpart to the access to the source code and rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty and the software's author, the holder of the
-# economic rights, and the successive licensors have only limited
-# liability.
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/vtk/bbs/appli/exampleSave_vtkPolyData.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wx
+include wxvtk
-description "Save a vtkPolyData example"
author "info-dev at creatis.insa-lyon.fr"
+description "Save a vtkPolyData example"
category "example mesh"
-load wx
-load std
-load vtk
-load wxvtk
+new vtk:LoadHola reader
-include "vtk/boxes/bbLoadHola"
-new LoadHola reader
+new vtk:MarchingCubes mc
+ set mc.Value "1000"
-new MarchingCubes mc
- set mc.Value 1000
- connect reader.Out mc.In
+new wx:FileSelector saveFileName
+ set saveFileName.OpenSave "Save"
+new vtk:PolyDataWriter pdw
-new FileSelector saveFileName
- set saveFileName.OpenSave Save
+new vtk:PolyDataToActor pdActor
-new PolyDataWriter pdw
- connect saveFileName.Out pdw.Filename
- connect mc.Out pdw.In
+new wxvtk:Viewer3D viewer
-new PolyDataToActor pdActor
- connect mc.Out pdActor.In
+new wx:CommandButton button
+ set button.Label "Save vtkPolyData"
-new Viewer3D viewer
- connect pdActor.Out viewer.In1
+new wx:LayoutSplit main
+ set main.Proportion "90"
-new CommandButton button
- set button.Label "Save vtkPolyData"
- connect button.BoxChange pdw.BoxExecute
-new LayoutSplit main
- set main.Proportion 90
- connect viewer.Widget main.Widget1
- connect button.Widget main.Widget2
+connect reader.Out mc.In
-exec main
+connect saveFileName.Out pdw.Filename
+
+connect mc.Out pdw.In
+connect mc.Out pdActor.In
+connect pdActor.Out viewer.In1
+
+connect button.BoxChange pdw.BoxExecute
+
+connect viewer.Widget main.Widget1
+
+connect button.Widget main.Widget2
+
+
+
+# Complex input ports
+exec main
+++ /dev/null
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-# pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-# This software is governed by the CeCILL-B license under French law and
-# abiding by the rules of distribution of free software. You can use,
-# modify and/ or redistribute the software under the terms of the CeCILL-B
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-# or in the file LICENSE.txt.
-#
-# As a counterpart to the access to the source code and rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty and the software's author, the holder of the
-# economic rights, and the successive licensors have only limited
-# liability.
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
-
-
-load vtk
-include std/boxes/bbPrependPackageDataPath
-
-define LoadHola_vtkPolyData vtk
- description "Loads the image 'hola_vtkPolyData.vtk'"
- author "eduardo.davila at creatis.insa-lyon.fr"
- category "mesh;read/write"
-
- new PolyDataReader reader
- new PrependPackageDataPath ppdp
- set ppdp.In "hola_vtkPolyData.vtk"
- set ppdp.Package "vtk"
- connect ppdp.Out reader.In
-
- output Out reader.Out "The poly data"
- output FileName ppdp.Out "The path to the mesh to load"
-
-endefine
+++ /dev/null
-ObjectType = Image
-NDims = 3
-DimSize = 127 147 187
-ElementType = MET_USHORT
-HeaderSize = 0
-ElementNumberOfChannels = 1
-
-ElementSpacing = 0.7 0.7 0.7
-Position = 0 0 0
-TransformMatrix = 1 0 0 0 1 0 0 0 1
-Offset = 0 0 0
-CenterOfRotation = 0 0 0
-
-BinaryData = True
-BinaryDataByteOrderMSB = False
-CompressedData = False
-
-ElementDataFile = hola.raw
//Se pregunta al OS el tamanio de la palabra de un apuntador
int palabra = sizeof(T);
db = vtkImageData::New();
- db->SetScalarType(Memcache::darTipo(palabra));
db->SetDimensions(x,y,z);
db->SetOrigin(0, 0, 0);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ db->SetScalarType(Memcache::darTipo(palabra));
db->AllocateScalars();
db->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ db->AllocateScalars(Memcache::darTipo(palabra),1);
+#endif
+
+
}
void* get(int x, int y, int z)
{
<process>
<PRE>
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetVtkObject()->SetInput(bbGetInputIn1());
bbGetVtkObject()->SetInput(bbGetInputIn2());
bbGetVtkObject()->SetInput(bbGetInputIn3());
bbGetVtkObject()->SetInput(bbGetInputIn4());
bbGetVtkObject()->SetInput(bbGetInputIn5());
+#else
+ bbGetVtkObject()->AddInputData(bbGetInputIn1());
+ bbGetVtkObject()->AddInputData(bbGetInputIn2());
+ bbGetVtkObject()->AddInputData(bbGetInputIn3());
+ bbGetVtkObject()->AddInputData(bbGetInputIn4());
+ bbGetVtkObject()->AddInputData(bbGetInputIn5());
+#endif
+
bbGetVtkObject()->Update();
</PRE>
int i,j,k;
int sizeX,sizeY,sizeZ;
- if (bbGetInputIn()!=NULL){
- bbGetInputIn()->Update();
+ if (bbGetInputIn()!=NULL)
+ {
int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ bbGetInputIn()->Update();
bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputIn()->GetExtent(ext);
+#endif
+
sizeX=ext[1]-ext[0]+1;
sizeY=ext[3]-ext[2]+1;
- sizeZ=ext[5]-ext[4]+1;
-
+ sizeZ=ext[5]-ext[4]+1;
sizeX=(sizeX/2)*2;
sizeY=(sizeY/2)*2;
-// if (_newImage==NULL)
-// {
- _newImage = vtkImageData::New();
- _newImage->Initialize();
- _newImage->SetScalarType( bbGetInputIn()->GetScalarType() );
- _newImage->SetSpacing( bbGetInputIn()->GetSpacing() );
- _newImage->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() );
- _newImage->SetDimensions( sizeX,sizeY,sizeZ );
- _newImage->SetWholeExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
- _newImage->AllocateScalars();
-// }
-
-
-
+ _newImage = vtkImageData::New();
+ _newImage->Initialize();
+ _newImage->SetSpacing( bbGetInputIn()->GetSpacing() );
+ _newImage->SetDimensions( sizeX,sizeY,sizeZ );
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ _newImage->SetWholeExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
+ _newImage->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() );
+ _newImage->SetScalarType( bbGetInputIn()->GetScalarType() );
+ _newImage->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ _newImage->SetExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
+ _newImage->AllocateScalars(bbGetInputIn()->GetScalarType(),1);
+#endif
for (i=0; i<sizeX; i++)
{
for (j=0; j<sizeY; j++)
_newImage->SetScalarComponentFromDouble(i,j,k, 0, value );
} // for k
} // for j
- } // for i
-
- }// bbGetInputIn
-
+ } // for i
+ }// bbGetInputIn
bbSetOutputOut(_newImage);
-
}
//=====
// 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(AutoCrop,bbtk::AtomicBlackBox);
BBTK_NAME("AutoCrop");
BBTK_AUTHOR("Info-Dev");
- BBTK_DESCRIPTION("Automatique cropping of the image");
+ BBTK_DESCRIPTION("Automatique cropping of the image, (See also ImageBoundaries)");
BBTK_CATEGORY("Filter");
BBTK_INPUT(AutoCrop,In,"Input image",vtkImageData*,"");
- BBTK_INPUT(AutoCrop,Type,"Type of cropping (default 0) 0=power of two dimensions",int,"");
+ BBTK_INPUT(AutoCrop,Type,"Type of cropping (default 0) 0=power of two dimensions X and Y",int,"");
BBTK_OUTPUT(AutoCrop,Out,"Output image",vtkImageData*,"");
BBTK_END_DESCRIBE_BLACK_BOX(AutoCrop);
//=====
return;
}
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
ope->SetInput1((vtkDataObject*)bbGetInputIn1());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ ope->SetInput1Data((vtkDataObject*)bbGetInputIn1());
+#endif
if (bbGetInputIn2() != NULL)
{
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
ope->SetInput2((vtkDataObject*)bbGetInputIn2());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ ope->SetInput2Data((vtkDataObject*)bbGetInputIn2());
+#endif
- }
- else
- {
+ } else {
std::cout << "Set In2" << std::endl;
return;
}
//original->GetOrigin(origin);
//original->GetDimensions(newDim);
- final->SetScalarType(scalar_type);
//final->SetSpacing(space);
newDim[0] = x;
origin[2] = 0;
final->SetOrigin(origin);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ final->SetScalarType(scalar_type);
final->AllocateScalars();
final->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ final->AllocateScalars(scalar_type,1);
+#endif
+
for (int i=0; i<newDim[0]; i++){
for (int j=0; j<newDim[1]; j++){
int i,j;
int ext[6];
int dim[3];
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
image->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ image->GetExtent(ext);
+#endif
dim[0]=ext[1]-ext[0]+1;
dim[1]=ext[3]-ext[2]+1;
//----------------------------------------------------------------------
void CleanExternalPlane::CleanTypeB()
{
-
int ext[6];
int dimA[3];
int dimB[3];
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputIn()->GetExtent(ext);
+#endif
dimA[0] = ext[1]-ext[0]+1;
dimA[1] = ext[3]-ext[2]+1;
imageoutput->Initialize();
- imageoutput->SetScalarType( bbGetInputIn()->GetScalarType() );
imageoutput->SetSpacing( bbGetInputIn()->GetSpacing() );
imageoutput->SetDimensions( dimB[0], dimB[1], dimB[2] );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ imageoutput->SetScalarType( bbGetInputIn()->GetScalarType() );
imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ imageoutput->AllocateScalars( bbGetInputIn()->GetScalarType() , 1);
+#endif
int j,k;
for (k=0;k<dimA[2];k++)
{
memcpy( imageoutput->GetScalarPointer(1,j+1,k+1) , bbGetInputIn()->GetScalarPointer(0,j,k) , sizeBlock );
- }
- }
+ } // for k
+ } // for j
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
imageoutput->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ // ..
+#endif
+
imageoutput->Modified();
}
/// - supposes *all* the images are consistent (same type, same number of components, same pixel type)
/// - if images in the vector are already 3D, exports only the first one. ?!? // JPR
///
- void ConcatImages::Process()
- {
- int dim[3];
- int curDim[3];
+void ConcatImages::Process()
+{
+ int dim[3];
+ int curDim[3];
int nbComponents;
int scalarType;
int nb = (unsigned int)bbGetInputIn().size();
// int consistentNb(nb);
int newSizeZ;
- if (nb == 0) {
+ if (nb == 0) {
// ??? JPR
}
mConcat = bbGetInputIn()[0];
//mConcat->PrintSelf(std::cout, vtkIndent(2));
} else {
- // We suppose *all* the images within the directory are consistent (same sizeS, same pixel Type?...)
- vtkImageData * firstImage = bbGetInputIn()[0];
+ // We suppose *all* the images within the directory are consistent (same sizeS, same pixel Type?...)
+ vtkImageData * firstImage = bbGetInputIn()[0];
- //std::cout << "--------PrintSelf firstImage " << std::endl;
- // firstImage->PrintSelf(std::cout, vtkIndent(2));
+ //std::cout << "--------PrintSelf firstImage " << std::endl;
+ // firstImage->PrintSelf(std::cout, vtkIndent(2));
- nbComponents = firstImage->GetNumberOfScalarComponents();
- mConcat->SetNumberOfScalarComponents(nbComponents);
-
- mConcat->SetScalarType(firstImage->GetScalarType( ));
- scalarType = firstImage->GetScalarType( );
- mConcat->SetScalarType(scalarType);
+ nbComponents = firstImage->GetNumberOfScalarComponents();
+ scalarType = firstImage->GetScalarType( );
- mConcat->SetSpacing(firstImage->GetSpacing());
+ mConcat->SetSpacing(firstImage->GetSpacing());
- firstImage->GetDimensions(dim);
- newSizeZ=0;
- // brute way to perform an ultra-mini consistency check :
- // First image is supposed to be the reference image,
- // any unconsistent image is just discarted...
- for(int i=0; i<nb; i++)
- {
+ firstImage->GetDimensions(dim);
+ newSizeZ=0;
+ // brute way to perform an ultra-mini consistency check :
+ // First image is supposed to be the reference image,
+ // any unconsistent image is just discarted...
+ for(int i=0; i<nb; i++)
+ {
//EED 2013 oct 29
//EED if ( !CheckConsistency(firstImage, dim, nbComponents, scalarType))
//EED consistentNb--;
if ( CheckConsistency(bbGetInputIn()[i], dim, nbComponents, scalarType))
- {
- bbGetInputIn()[i]->GetDimensions(curDim);
- newSizeZ = newSizeZ + curDim[2];
- } // if
+ {
+ bbGetInputIn()[i]->GetDimensions(curDim);
+ newSizeZ = newSizeZ + curDim[2];
+ } // if
- } // for
+ } // for
dim[2]=newSizeZ;
mConcat->SetDimensions(dim);
mConcat->SetExtent(0, dim[0]-1, 0, dim[1]-1, 0, dim[2]-1);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ mConcat->SetNumberOfScalarComponents(nbComponents);
+ mConcat->SetScalarType(scalarType);
mConcat->AllocateScalars();
mConcat->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ mConcat->AllocateScalars(scalarType,nbComponents);
+#endif
int index_image;
// Devrait etre dans bbUserFinalizeProcessing() ? On n'y entre jamais // JPR
bbSetOutputOut(mConcat);
- }
+}
+//---------------------------------------------------
bool ConcatImages::CheckConsistency( vtkImageData *curImage, int dim[], int nbComponents, int scalarType )
{
assert (curImage);
<vtkobject>vtkConeSource</vtkobject>
<output name="Out" type="vtkPolyData*" special="vtk output" description="Output Cone"/>
-<input name="Radius" type="double" special="vtk parameter" description="Cone Radius"/>
-<input name="Resolution" type="int" special="vtk parameter" description="Cone Resolution"/>
-<input name="CenterX" type="double" description="Center X coord"/>
-<input name="CenterY" type="double" description="Center Y coord"/>
-<input name="CenterZ" type="double" description="Center Z coord"/>
-<input name="DirectionX" type="double" description="X Direction"/>
-<input name="DirectionY" type="double" description="Y Direction"/>
-<input name="DirectionZ" type="double" description="Z Direction"/>
+<input name="Radius" type="double" special="vtk parameter" description="Cone Radius (default 1)"/>
+<input name="Height" type="double" special="vtk parameter" description="Cone height (default 1)"/>
+<input name="Resolution" type="int" special="vtk parameter" description="Cone Resolution (default 10)"/>
+<input name="CenterX" type="double" description="Center X coord (default 0)"/>
+<input name="CenterY" type="double" description="Center Y coord (default 0)"/>
+<input name="CenterZ" type="double" description="Center Z coord (default 0)"/>
+<input name="DirectionX" type="double" description="X Direction (default 0)"/>
+<input name="DirectionY" type="double" description="Y Direction (default 0)"/>
+<input name="DirectionZ" type="double" description="Z Direction (default 1)"/>
<process>
<PRE>
bbGetVtkObject()->SetCenter(bbGetInputCenterX(),
bbGetInputCenterY(),
bbGetInputCenterZ());
-
bbGetVtkObject()->SetDirection(bbGetInputDirectionX(),
bbGetInputDirectionY(),
- bbGetInputDirectionZ());
-
+ bbGetInputDirectionZ());
bbGetVtkObject()->SetResolution(bbGetInputResolution());
bbGetVtkObject()->SetRadius((double)bbGetInputRadius());
+bbGetVtkObject()->SetHeight((double)bbGetInputHeight());
bbGetVtkObject()->Update();
</PRE>
</process>
+<defaultValues>
+<PRE>
+ bbSetInputRadius( 1 );
+ bbSetInputHeight( 1 );
+ bbSetInputResolution( 10 );
+ bbSetInputCenterX( 0 );
+ bbSetInputCenterY( 0 );
+ bbSetInputCenterZ( 0 );
+ bbSetInputDirectionX( 0 );
+ bbSetInputDirectionY( 0 );
+ bbSetInputDirectionZ( 1 );
+</PRE>
+</defaultValues>
+
+
+
</blackbox>
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
-
-
double spc[6];
int dim[3];
int outputformat = VTK_UNSIGNED_SHORT;
-
if (bbGetInputOutputFormat()=="VTK_BIT") outputformat = VTK_BIT; // 1
else if (bbGetInputOutputFormat()=="VTK_CHAR") outputformat = VTK_CHAR; // 2
else if (bbGetInputOutputFormat()=="MET_CHAR") outputformat = VTK_CHAR; // 2
else if (bbGetInputOutputFormat()=="MET_DOUBLE") outputformat = VTK_DOUBLE; // 11
-
spc[0] = bbGetInputSpacing()[0];
spc[1] = bbGetInputSpacing()[1];
spc[2] = bbGetInputSpacing()[2];
dim[2] = bbGetInputDimensions()[2];
imageoutput->Initialize();
- imageoutput->SetScalarType( outputformat );
imageoutput->SetSpacing( spc );
imageoutput->SetDimensions( dim[0], dim[1], dim[2] );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ imageoutput->SetScalarType( outputformat );
imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ imageoutput->AllocateScalars( outputformat,1 );
+#endif
- int i,j,k;
- long sizeBlock;
-
- for (i=0; i<dim[0]; i++)
- {
- imageoutput->SetScalarComponentFromDouble(i,0,0, 0, bbGetInputInitialValue() );
- }
-
- sizeBlock= dim[0] * imageoutput->GetScalarSize();
- for (j=1; j<dim[1]; j++)
- {
- memcpy( imageoutput->GetScalarPointer(0,j,0), imageoutput->GetScalarPointer() , sizeBlock );
- }
-
- sizeBlock= dim[0] * dim[1] * imageoutput->GetScalarSize();
- for (k=0; k<dim[2]; k++)
- {
- memcpy( imageoutput->GetScalarPointer(0,0,k) ,imageoutput->GetScalarPointer() , sizeBlock );
- } // for k
-
- imageoutput->Update();
- imageoutput->Modified();
- bbSetOutputOut(imageoutput);
-
+ int i,j,k;
+ long sizeBlock;
+ for (i=0; i<dim[0]; i++)
+ {
+ imageoutput->SetScalarComponentFromDouble(i,0,0, 0, bbGetInputInitialValue() );
+ } // for i
+
+ sizeBlock= dim[0] * imageoutput->GetScalarSize();
+ for (j=1; j<dim[1]; j++)
+ {
+ memcpy( imageoutput->GetScalarPointer(0,j,0), imageoutput->GetScalarPointer() , sizeBlock );
+ } // for j
+
+ sizeBlock= dim[0] * dim[1] * imageoutput->GetScalarSize();
+ for (k=0; k<dim[2]; k++)
+ {
+ memcpy( imageoutput->GetScalarPointer(0,0,k) ,imageoutput->GetScalarPointer() , sizeBlock );
+ } // for k
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ imageoutput->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ // ..
+#endif
+
+ imageoutput->Modified();
+ bbSetOutputOut(imageoutput);
}
//=====
voi[4] = bbGetInputIndex()[2];
voi[5] = bbGetInputIndex()[2]+bbGetInputSize()[2]-1;
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
_extract->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ _extract->SetInputData( bbGetInputIn() );
+#endif
+
_extract->SetVOI(voi);
_extract->UpdateWholeExtent();
_extract->Modified();
mImageOut = vtkImageData::New(); // Alloc depends on bbGetInputIn().size()
mImageOut->Initialize();
- mImageOut->SetScalarType( bbGetInputIn()->GetScalarType() );
mImageOut->SetSpacing( bbGetInputIn()->GetSpacing() );
mImageOut->SetDimensions( bbGetInputIn()->GetDimensions() );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ mImageOut->SetScalarType( bbGetInputIn()->GetScalarType() );
mImageOut->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() );
mImageOut->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ mImageOut->AllocateScalars(bbGetInputIn()->GetScalarType() , bbGetInputIn()->GetNumberOfScalarComponents());
+#endif
int inputdims[3];
// int outputdims[3];
bbGetInputIn()->GetDimensions (inputdims);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetInputIn()->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ // ..
+#endif
+
int nbScalComp = bbGetInputIn()->GetNumberOfScalarComponents();
int scalarSize = bbGetInputIn()->GetScalarSize();
int lineSize = inputdims[0]*scalarSize*nbScalComp;
int ext[6];
double value;
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputIn()->GetExtent(ext);
+#endif
+
int maxX = ext[1]-ext[0]+1;
int maxY = ext[3]-ext[2]+1;
int maxZ = ext[5]-ext[4]+1;
// (the one provided in the attribute 'type' of the tag 'input')
vtkImageData* img = bbGetInputIn();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
cast->SetInput(img);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ cast->SetInputData(img);
+#endif
+
cast->SetOutputScalarTypeToUnsignedShort();
cast->Modified();
cast->Update();
// EED MPR view orientation correction..
vtkImageFlip *flipYFilter = vtkImageFlip::New();
flipYFilter->SetFilteredAxis(1); // flip y axis
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
flipYFilter->SetInput( planeWidgetX->GetResliceOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ flipYFilter->SetInputData( planeWidgetX->GetResliceOutput() );
+#endif
+
flipYFilter->Update();
vtkImageChangeInformation *image = vtkImageChangeInformation::New();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
image->SetInput( planeWidgetY->GetResliceOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ image->SetInputData( planeWidgetY->GetResliceOutput() );
+#endif
+
image->SetOutputSpacing( 1,1,1 );
image->CenterImageOn();
image->Update();
_imageTransform = vtkTransform::New();
vtkImageReslice *slicer =vtkImageReslice::New();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
slicer->SetInput( image->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ slicer->SetInputData( image->GetOutput() );
+#endif
+
slicer->SetInformationInput( image->GetOutput() );
slicer->SetResliceTransform( _imageTransform );
slicer->SetOutputOrigin(0 , 0 , 0 );
slicer->SetInterpolationModeToNearestNeighbor();
slicer->Update();
vtkImageChangeInformation *imageResult = vtkImageChangeInformation::New();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
imageResult->SetInput( slicer->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ imageResult->SetInputData( slicer->GetOutput() );
+#endif
+
double spc[3];
planeWidgetY->GetResliceOutput()->GetSpacing(spc);
imageResult->SetOutputSpacing( spc[1], spc[0], spc[2] );
{
int dim[3];
int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetOutputPlaneX()->GetResliceOutput()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetOutputPlaneX()->GetResliceOutput()->GetExtent(ext);
+#endif
+
dim[0] = ext[1]-ext[0]+1;
dim[1] = ext[3]-ext[2]+1;
dim[2] = ext[5]-ext[4]+1;
double xSpacing, ySpacing, zSpacing;
bbGetInputIn()->GetSpacing(xSpacing, ySpacing, zSpacing);
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetOutputPlaneX()->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetOutputPlaneX()->SetInputData(bbGetInputIn());
+#endif
+
bbGetOutputPlaneX()->SetPlaneOrientationToXAxes();
bbGetOutputPlaneX()->SetSlicePosition((xMax+xMin)/2.*xSpacing);
// bbGetOutputPlaneX()->SetPoint1( 0*xSpacing, 146*ySpacing, 186*zSpacing);
// bbGetOutputPlaneX()->SetPoint2( 126*xSpacing, 146*ySpacing, 0*zSpacing);
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetOutputPlaneY()->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetOutputPlaneY()->SetInputData(bbGetInputIn());
+#endif
+
bbGetOutputPlaneY()->SetPlaneOrientationToYAxes();
bbGetOutputPlaneY()->SetSlicePosition((yMax+yMin)/2.*ySpacing);
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetOutputPlaneZ()->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetOutputPlaneZ()->SetInputData(bbGetInputIn());
+#endif
+
bbGetOutputPlaneZ()->SetPlaneOrientationToZAxes();
bbGetOutputPlaneZ()->SetSlicePosition((zMax+zMin)/2.*zSpacing);
bbGetOutputPlaneZ()->SetResliceInterpolate( bbGetInputInterpolation() );
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetOutputPlaneX()->GetResliceOutput()->Update();
bbGetOutputPlaneY()->GetResliceOutput()->Update();
bbGetOutputPlaneZ()->GetResliceOutput()->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ // ...
+#endif
std::vector<int> pointsx = bbGetInputPointsX();
std::vector<int> pointsy = bbGetInputPointsY();
//for the plane widgets
vtkImagePlaneWidget* plane3pts = (vtkImagePlaneWidget*)bbGetOutputPlane3Pts();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
plane3pts->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ plane3pts->SetInputData(bbGetInputIn());
+#endif
+
double xSpacing, ySpacing, zSpacing;
bbGetInputIn()->GetSpacing(xSpacing, ySpacing, zSpacing);
plane3pts->SetOrigin(pointsx[0]*xSpacing,pointsy[0]*ySpacing,pointsz[0]*zSpacing);
plane3pts->SetPoint2((origin[0]+vect2[0]*factor)*xSpacing,
(origin[1]+vect2[1]*factor)*ySpacing,
(origin[2]+vect2[2]*factor)*zSpacing);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
plane3pts->GetResliceOutput()->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ // ..
+#endif
+
//To get the slice of image out of the selected volume
if (_imageReslicer==NULL){
_imageReslicer = vtkImageReslice::New();
_matrix = vtkMatrix4x4::New();
}
_imageReslicer->SetInterpolationMode( bbGetInputInterpolation() );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
_imageReslicer->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ _imageReslicer->SetInputData( bbGetInputIn() );
+#endif
+
+
_imageReslicer->SetInformationInput(bbGetInputIn());
//fill out the information with the created vectors and using the spacing of the image
_imageReslicer->SetResliceAxesDirectionCosines(newx[0]*xSpacing,newx[1]*xSpacing,newx[2]*xSpacing,
vect2[0]*ySpacing,vect2[1]*ySpacing,vect2[2]*ySpacing,
crossp[0]*zSpacing,crossp[1]*zSpacing,crossp[2]*zSpacing);
_imageReslicer->SetResliceAxesOrigin(origin[0]*xSpacing,origin[1]*ySpacing,origin[2]*zSpacing);
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
_imageReslicer->GetOutput()->Update();
_imageReslicer->GetOutput()->UpdateInformation();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ _imageReslicer->Update();
+#endif
+
+
bbSetOutputImage3Pts(_imageReslicer->GetOutput());
if ( bbGetInputIn() )
{
bbGetInputIn()->Modified();
- bbGetInputIn()->Update();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ bbGetInputIn()->Update();
bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputIn()->GetExtent(ext);
+#endif
+
vsize.push_back(ext[1]-ext[0]+1);
vsize.push_back(ext[3]-ext[2]+1);
vsize.push_back(ext[5]-ext[4]+1);
int dim[3];
int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetInputImageFix()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputImageFix()->GetExtent(ext);
+#endif
dim[0]= ext[1]-ext[0]+1;
dim[1]= ext[3]-ext[2]+1;
dim[2]= ext[5]-ext[4]+1;
{
_imageoutput = vtkImageData::New();
_imageoutput->Initialize();
- _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
_imageoutput->SetSpacing( bbGetInputImageFix()->GetSpacing() );
_imageoutput->SetDimensions( dim[0], dim[1], dim[2] );
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
_imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ _imageoutput->AllocateScalars(bbGetInputImageFix()->GetScalarType() , 1);
+#endif
}
if (bbGetInputType()==1)
{
int j,k;
int px,py,pz;
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetInputImageMove()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputImageMove()->GetExtent(ext);
+#endif
+
int dimMoveX = ext[1]-ext[0]+1;
int dimMoveY = ext[3]-ext[2]+1;
int dimMoveZ = ext[5]-ext[4]+1;
//---------------------------------------------------------------------
void MIPCreator::bbUserSetDefaultValues()
{
-
-
-
std::vector<double> opaValues;
std::vector<double> denPoints;
opaValues.push_back(0.0);
bbSetInputOpacityValues(opaValues);
bbSetInputMinColorWindow(0.0);
bbSetInputMaxColorWindow(255.0);
-
- opacityTransferFunction = vtkPiecewiseFunction::New();
- grayTransferFunction = vtkPiecewiseFunction::New();
-
+ opacityTransferFunction = vtkPiecewiseFunction::New();
+ grayTransferFunction = vtkPiecewiseFunction::New();
mCast = NULL;
mMIP = NULL;
mMapper = NULL;
mVolume = NULL;
-
-
}
+
//---------------------------------------------------------------------
void MIPCreator::bbUserInitializeProcessing()
{
-
-
// Create the pipeline
mCast = vtkImageShiftScale::New();
mCast->SetOutputScalarTypeToUnsignedChar();
mCast->ClampOverflowOn();
-
-
}
//---------------------------------------------------------------------
void MIPCreator::Process()
{
-
-
-
double ranges[2];
vtkImageData *image = bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
image->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ // ..
+#endif
image->GetScalarRange(ranges);
-
scale = 255/(ranges[1]/100);
-
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
mCast->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ mCast->SetInputData( bbGetInputIn() );
+#endif
mCast->SetScale( scale / 100.0 );
//mCast->SetShift( -bbGetInputShift() );
-
-
-
-
-
-
-
-
-
DensityPoints = bbGetInputDensityPoints();
-
//We assign by default the values of density by regarding at range from the image
if(DensityPoints.size()==0)
{
DensityPoints.push_back(ranges[0]);
DensityPoints.push_back(ranges[1]);
}
-
-
OpacityValues = bbGetInputOpacityValues();
-
while(DensityPoints.size()>OpacityValues.size())
{
OpacityValues.push_back(1.0);
}
-
-
-
double factor = scale/ 100.0 ;
-
double minCF = bbGetInputMinColorWindow();
double maxCF = bbGetInputMaxColorWindow();
-
grayTransferFunction->AddSegment( minCF , 0.0 , maxCF , 1.0 );
-
-
-
-
for(int i =0; i< DensityPoints.size(); i++)
{
- cout<<"MIPCreator::Process::dPoint"<<i<<"::"<<DensityPoints.at(i)<<endl;
- cout<<"MIPCreator::Process::oPoint"<<i<<"::"<<OpacityValues.at(i)<<endl;
-
+ cout<<"MIPCreator::Process::dPoint"<<i<<"::"<<DensityPoints.at(i)<<endl;
+ cout<<"MIPCreator::Process::oPoint"<<i<<"::"<<OpacityValues.at(i)<<endl;
opacityTransferFunction->AddPoint(DensityPoints.at(i)*factor, OpacityValues.at(i));
}
//opacityTransferFunction = vtkPiecewiseFunction::New();
// opacityTransferFunction->AddPoint( 210 , 50.0/100.0 );
// opacityTransferFunction->AddPoint( 255 , 90.0/100.0 );
-
-
// Create a set of properties for mip
vtkVolumeProperty *mipProperty;
mipProperty = vtkVolumeProperty::New();
mipProperty->SetScalarOpacity( opacityTransferFunction );
mipProperty->SetColor( grayTransferFunction );
-
// mipProperty->SetInterpolationTypeToLinear();
mipProperty->SetInterpolationTypeToNearest();
-
// mipProperty->ShadeOff();
mipProperty->ShadeOn();
-
// mipProperty->SetAmbient(0.9);
// mipProperty->SetDiffuse(0.9);
// mipProperty->SetSpecular(0.9);
-
-
-
-
-
mMIP = vtkVolumeRayCastMIPFunction::New();
mMIP->SetMaximizeMethodToScalarValue();
-
mMapper = vtkVolumeRayCastMapper::New();
mMapper->SetVolumeRayCastFunction(mMIP);
+ mCast->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
mMapper->SetInput(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ mMapper->SetInputData(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
mVolume = vtkVolume::New();
mVolume->SetMapper(mMapper);
mVolume->SetProperty( mipProperty );
-
-
-
mMapper->Update();
-
bbSetOutputOut(mVolume);
// mVolume->GetProperty()->SetColor( bbGetInputColour()[0], bbGetInputColour()[1], bbGetInputColour()[2] );
// mVolume->GetProperty()->SetOpacity( bbGetInputOpacity() );
void Magnitud::Process()
{
+printf("EED Magnitud::Process Start\n");
+
// THE MAIN PROCESSING METHOD BODY
// Here we simply set the input 'In' value to the output 'Out'
// And print out the output value
// (the one provided in the attribute 'type' of the tag 'input')
// ----------
- if (bbGetInputIn()!=NULL) {
- vGreenToRedLut->SetHueRange(0.6667,0.0);
- vGreenToRedLut->Build();
+ if (bbGetInputIn()!=NULL)
+ {
+ vGreenToRedLut->SetHueRange(0.6667,0.0);
+ vGreenToRedLut->Build();
//Input Data
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vVecMagnitude->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vVecMagnitude->SetInputData(bbGetInputIn());
+#endif
+
vVecMagnitude->NormalizeOff();
vVecMagnitude->Update();
vVecMagnitude->GetOutput()->GetScalarRange( range1 );
vVecMagnitude->Update();
//Glyph
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vMaskPoint->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vMaskPoint->SetInputData(bbGetInputIn());
+#endif
+
vMaskPoint->SetOnRatio(100);
vMaskPoint->Update();
vMaskPoint->RandomModeOn();
-
- vGlyph->SetInput(vMaskPoint->GetOutput());
- vGlyph->SetSource(cone->GetOutput());
+
vGlyph->SetScaleModeToScaleByVector();
vGlyph->SetColorModeToColorByVector();
vGlyph->SetScaleFactor(0.20);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ vGlyph->SetInput(vMaskPoint->GetOutput());
+ vGlyph->SetSource(cone->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vGlyph->SetInputData(vMaskPoint->GetOutput());
+ cone->Update();
+ vGlyph->SetSourceData(cone->GetOutput());
+#endif
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vGlyphMapper->SetInput( vGlyph->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vGlyphMapper->SetInputData( vGlyph->GetOutput() );
+#endif
+
step = (range1[1]-range1[0])/10;
//Contour
- dRangeColorForMultipleContourVelocity[0]=0;
- dRangeColorForMultipleContourVelocity[1]=1;
- dRangeColorForGlyphVelocity[0]=0;
- dRangeColorForGlyphVelocity[1]=1;
+ dRangeColorForMultipleContourVelocity[0] = 0;
+ dRangeColorForMultipleContourVelocity[1] = 1;
+ dRangeColorForGlyphVelocity[0] = 0;
+ dRangeColorForGlyphVelocity[1] = 1;
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vMultipleContourVelocity->SetInput((vtkDataSet *) vVecMagnitude->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vMultipleContourVelocity->SetInputData((vtkDataSet *) vVecMagnitude->GetOutput());
+#endif
index = 0;
double h;
index+=1;
}
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vMultipleContourMapper->SetInput( vMultipleContourVelocity->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vMultipleContourMapper->SetInputData( vMultipleContourVelocity->GetOutput() );
+#endif
+
vMultipleContourMapper->SetScalarRange( range1 );
vMultipleContourMapper->SetLookupTable( vGreenToRedLut );
vMultipleContourMapper->Update();
vGlyphMapper->ImmediateModeRenderingOn();
//Outline Grid
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vOutlineGrid->SetInput( bbGetInputIn() );
vOutlineMapper->SetInput(vOutlineGrid->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vOutlineGrid->SetInputData( bbGetInputIn() );
+ vOutlineGrid->Update();
+ vOutlineMapper->SetInputData( vOutlineGrid->GetOutput() );
+#endif
+
//Outline Grid Actor
vOutlineActor->SetMapper(vOutlineMapper);
vGlyph->SetScaleFactor(vGlyph->GetScaleFactor()+0.1);
vGlyph->Update();
if( (bbGetInputScale()/100)<0 )
+ {
bbSetInputScale(0);
+ }
if( (bbGetInputScale()/100)>1 )
+ {
bbSetInputScale(1);
-
+ }
+
//vGlyph->SetScaleFactor(dScale);
vGlyph->SetScaleFactor( bbGetInputScale()/100 );
vGlyph->Update();
vMultipleContourMapper->SetScalarRange( range1 );
if( bbGetInputOpactity()/100<0 )
- bbSetInputOpactity(0);
+ {
+ bbSetInputOpactity(0);
+ }
+
if( bbGetInputOpactity()/100>1 )
- bbSetInputOpactity(1);
+ {
+ bbSetInputOpactity(1);
+ }
//Set Contour Opacity
vMultipleContourActor->GetProperty()->SetOpacity( bbGetInputOpactity()/100 );
//Set The Number of Contours
if( bbGetInputContour()<1)
- bbSetInputContour(1);
+ {
+ bbSetInputContour(1);
+ }
step=(range1[1]-range1[0])/bbGetInputContour();
index=0;
//End: Change values by the user
///////////////////////////////////////////////////////////////////////////////////////////////////
//The Plane Widget
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vPlaneWidget->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vPlaneWidget->SetInputData(bbGetInputIn());
+#endif
vPlaneWidget->NormalToXAxisOn();
vPlaneWidget->NormalToZAxisOn();
vPlaneWidget->SetResolution(1);
vPlaneWidget->On();
vPlaneWidget->GetOrigin(p0);
- vPlaneWidget->GetCenter(c); //These is from Execute Method
+ vPlaneWidget->GetCenter(c); //These is fromvtkImageMathematics Execute Method
vPlaneWidget->GetNormal(n);
vPlaneWidget->GetPoint1(p1);
vPlaneWidget->GetPoint2(p2);
vDiskSourceEED->SetCircumferentialResolution (20);
//Stream Lines
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vPointWidget->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vPointWidget->SetInputData( bbGetInputIn() );
+#endif
+
vPointWidget->AllOff();
vPointWidget->PlaceWidget();
//vPointWidget->SetInteractor(vIren);
source->SetCenter( c );
source->SetRadius(5.0);
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
streamer->SetInput( bbGetInputIn() );
streamer->SetSource(source->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ streamer->SetInputData( bbGetInputIn() );
+ streamer->SetSourceData( source->GetOutput() );
+#endif
+
streamer->SetIntegratorTypeToRungeKutta45();
streamer->SetMaximumPropagation(500000);
//EED streamer->SetMaximumPropagationUnitToTimeUnit ();
//EED streamer->ComputeVorticityOn ();
streamer->Update();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
rf->SetInput(streamer->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ rf->SetInputData(streamer->GetOutput());
+#endif
+
rf->SetRadius(.5);
rf->SetNumberOfSides(12);
rf->SetVaryRadiusToVaryRadiusOff();
streamer->GetOutput()->GetScalarRange( range );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
streamMapper2->SetInput(rf->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ streamMapper2->SetInputData(rf->GetOutput());
+#endif
+
streamMapper2->SetLookupTable(vGreenToRedLut);
//vStreamlineActor2->SetMapper( streamMapper2 );
//End: Part of the Execute Method
//////////////////////////////////////////////////////////////////////////////////////
- vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
vtransformpolydatafilter->SetTransform( transformEED );
- vtransformpolydatafilter->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
vProbeslices->SetInput( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
vProbeslices->SetSource( bbGetInputIn() );
+ vGlyphFlowPlane->SetInput( vProbeslices->GetOutput() );
+ vGlyphFlowPlane->SetSource( vArrowSource->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vtransformpolydatafilter->SetInputData( vDiskSourceEED->GetOutput() );
+ vProbeslices->SetInputData( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
+ vProbeslices->SetSourceData( bbGetInputIn() );
+ vGlyphFlowPlane->SetInputData( vProbeslices->GetOutput() );
+ vArrowSource->Update();
+ vGlyphFlowPlane->SetSourceData( vArrowSource->GetOutput() );
+#endif
+
+ vtransformpolydatafilter->Update();
vProbeslices->Update( );
- vGlyphFlowPlane->SetInput(vProbeslices->GetOutput());
- vGlyphFlowPlane->SetSource(vArrowSource->GetOutput());
+
vGlyphFlowPlane->SetScaleModeToScaleByVector();
vGlyphFlowPlane->SetColorModeToColorByVector();
vGlyphFlowPlane->SetScaleFactor(0.2);
vGlyphFlowPlane->Update();
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vProbeslicesFlowWidget->SetInput( ( vtkDataSet* )vPlanSource->GetOutput());
vProbeslicesFlowWidget->SetSource( vVecMagnitude->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vProbeslicesFlowWidget->SetInputData( ( vtkDataSet* )vPlanSource->GetOutput());
+ vVecMagnitude->Update();
+ vProbeslicesFlowWidget->SetSourceData( vVecMagnitude->GetOutput() );
+#endif
+
vProbeslicesFlowWidget->Update( );
vVecMagnitude->GetOutput()->GetScalarRange( range );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
vAppendDataForFlowWidgetVisualisation->AddInput(vGlyphFlowPlane->GetOutput());
vAppendDataForFlowWidgetVisualisation->AddInput(vProbeslicesFlowWidget->GetPolyDataOutput());
-
vSliceMapper->SetInput( vAppendDataForFlowWidgetVisualisation->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ vGlyphFlowPlane->Update();
+ vProbeslicesFlowWidget->Update();
+ vAppendDataForFlowWidgetVisualisation->AddInputData( vGlyphFlowPlane->GetOutput() );
+ vAppendDataForFlowWidgetVisualisation->AddInputData( vProbeslicesFlowWidget->GetPolyDataOutput() );
+ vSliceMapper->SetInputData( vAppendDataForFlowWidgetVisualisation->GetOutput() );
+#endif
+
vSliceMapper->SetScalarRange( range );
vSliceMapper->SetLookupTable( vGreenToRedLut );
vSliceActor->SetMapper( vSliceMapper );
if(bbGetInputShowPlane() == 1)
+ {
vPlaneWidget->On();
- else if(bbGetInputShowPlane() == 0)
+ } else if(bbGetInputShowPlane() == 0) {
vPlaneWidget->Off();
+ }
vSliceActor->GetProperty()->SetOpacity( bbGetInputShowPlane() );
bbSetOutputOut2( vGlyphActor );
bbSetOutputOut3( vOutlineActor );
bbSetOutputOut4( vMultipleContourActor );
- //bbSetOutputOut5( vScalarBarActor );
+
+// bbSetOutputOut5( vScalarBarActor );
+
if(bbGetInputShowStream() == 1)
+ {
vStreamlineActor2->SetMapper( streamMapper2 );
- else
+ } else {
vStreamlineActor2->SetMapper( NULL );
-
+ }
bbSetOutputOut5( vStreamlineActor2 );
//bbSetOutputOut5( vStreamlineActor2 );
//bbSetOutputOutExport( exporter );
//temp->GetData( (vtkInformation*) vMultipleContourVelocity->GetOutput() );
//temp->GetData( vMultipleContourMapper->GetOutput() );
//bbSetOutputOutTest( temp );
+ } // if
+printf("EED Magnitud::Process End\n");
- } // if
} // process
// if any
// ---------- [
- cone = vtkArrowSource::New();
- exporter = vtkImageExport::New();
- point = vtkPolyData::New();
- rf = vtkTubeFilter::New();
- source = vtkPointSource::New();
- streamer = vtkStreamTracer::New();
- streamMapper2 = vtkPolyDataMapper::New();
+ cone = vtkArrowSource::New();
+ exporter = vtkImageExport::New();
+ point = vtkPolyData::New();
+ rf = vtkTubeFilter::New();
+ source = vtkPointSource::New();
+ streamer = vtkStreamTracer::New();
+ streamMapper2 = vtkPolyDataMapper::New();
transformEED = vtkTransform::New();
vAppendDataForFlowWidgetVisualisation = vtkAppendPolyData::New();
vGlyphFlowPlane = vtkGlyph3D::New();
vGlyphMapper = vtkPolyDataMapper::New();
vGreenToRedLut = vtkLookupTable::New();
- vIren = vtkRenderWindowInteractor::New();
+// vIren = vtkRenderWindowInteractor::New();
vMaskPoint = vtkMaskPoints::New();
vMultipleContourActor = vtkActor::New();
vMultipleContourMapper = vtkPolyDataMapper::New();
// 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)
//=====
// -------------- [
- vtkImageData* temp;
- std::vector<double> tempc;
-
- int sizeIma;
- long int index;
- double p0[3], p1[3],p2[3], n[3], c[3], slCenter[3];
- double range[2];
- double range1[2];
- double step;
- double h;
- double nx;
- double ny;
- double nz;
- double alfa;
- double beta;
- double dRangeColorForGlyphVelocity[2];
- double dRangeColorForMultipleContourVelocity[2];
- double dRangeColorForGlyphVelocityForFlowPlane[2];
-
- int Ratio;
- double dOpactity;
- double dScale;
- int nContour;
- bool bShow;
+ vtkImageData *temp;
+ std::vector<double> tempc;
+
+ int sizeIma;
+ long int index;
+ double p0[3], p1[3],p2[3], n[3], c[3], slCenter[3];
+ double range[2];
+ double range1[2];
+ double step;
+ double h;
+ double nx;
+ double ny;
+ double nz;
+ double alfa;
+ double beta;
+ double dRangeColorForGlyphVelocity[2];
+ double dRangeColorForMultipleContourVelocity[2];
+ double dRangeColorForGlyphVelocityForFlowPlane[2];
+
+ int Ratio;
+ double dOpactity;
+ double dScale;
+ int nContour;
+ bool bShow;
- vtkActor* vGlyphActor;
- vtkActor* vMultipleContourActor;
- vtkActor* vOutlineActor;
- vtkActor* vSliceActor;
- vtkActor* vStreamlineActor2;
- vtkAppendPolyData* vAppendDataForFlowWidgetVisualisation;
- vtkArrowSource* cone;
- vtkArrowSource* vArrowSource;
- vtkContourFilter* vMultipleContourVelocity;
- vtkDiskSource* vDiskSourceEED;
- vtkGlyph3D* vGlyph;
- vtkGlyph3D* vGlyphFlowPlane;
- vtkImageExport* exporter;
- vtkLookupTable* vGreenToRedLut;
- vtkMaskPoints* vMaskPoint;
- vtkPlaneSource* vPlanSource;
- vtkProbeFilter* vProbeslices;
- vtkProbeFilter* vProbeslicesFlowWidget;
- vtkPlaneWidget* vPlaneWidget;
- vtkPolyData* point;
- vtkPolyDataMapper* vSliceMapper;
- vtkPointSource* source;
- vtkPointWidget* vPointWidget;
- vtkPolyDataMapper* vGlyphMapper;
- vtkPolyDataMapper* vMultipleContourMapper;
- vtkOutlineFilter* vOutlineGrid;
- vtkPolyDataMapper* vOutlineMapper;
- vtkPolyDataMapper* streamMapper2;
- vtkRenderWindowInteractor* vIren;
- vtkScalarBarActor* vScalarBarActor;
- vtkStreamTracer* streamer;
- vtkTransform* transformEED;
- vtkTransformPolyDataFilter* vtransformpolydatafilter;
- vtkTubeFilter* rf;
- vtkVectorNorm* vVecMagnitude;
+ vtkActor *vGlyphActor;
+ vtkActor *vMultipleContourActor;
+ vtkActor *vOutlineActor;
+ vtkActor *vSliceActor;
+ vtkActor *vStreamlineActor2;
+ vtkAppendPolyData *vAppendDataForFlowWidgetVisualisation;
+ vtkArrowSource *cone;
+ vtkArrowSource *vArrowSource;
+ vtkContourFilter *vMultipleContourVelocity;
+ vtkDiskSource *vDiskSourceEED;
+ vtkGlyph3D *vGlyph;
+ vtkGlyph3D *vGlyphFlowPlane;
+ vtkImageExport *exporter;
+ vtkLookupTable *vGreenToRedLut;
+ vtkMaskPoints *vMaskPoint;
+ vtkPlaneSource *vPlanSource;
+ vtkProbeFilter *vProbeslices;
+ vtkProbeFilter *vProbeslicesFlowWidget;
+ vtkPlaneWidget *vPlaneWidget;
+ vtkPolyData *point;
+ vtkPolyDataMapper *vSliceMapper;
+ vtkPointSource *source;
+ vtkPointWidget *vPointWidget;
+ vtkPolyDataMapper *vGlyphMapper;
+ vtkPolyDataMapper *vMultipleContourMapper;
+ vtkOutlineFilter *vOutlineGrid;
+ vtkPolyDataMapper *vOutlineMapper;
+ vtkPolyDataMapper *streamMapper2;
+ vtkRenderWindowInteractor *vIren;
+ vtkScalarBarActor *vScalarBarActor;
+ vtkStreamTracer *streamer;
+ vtkTransform *transformEED;
+ vtkTransformPolyDataFilter *vtransformpolydatafilter;
+ vtkTubeFilter *rf;
+ vtkVectorNorm *vVecMagnitude;
// -------------- ]
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(Magnitud,bbtk::AtomicBlackBox);
BBTK_NAME("Magnitud");
BBTK_AUTHOR("seba-tor@uniandes.edu.co");
-BBTK_DESCRIPTION("Receive an ImgaData and generates an Actor");
+BBTK_DESCRIPTION("Receive an ImgaData and generates an Actor. 'EED this box habe to be splited in 5 box'");
BBTK_CATEGORY("");
// -------------- [
BBTK_INPUT(Magnitud,In,"Receive the image source",vtkImageData*, "");
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
-printf("EED MaskPoint::Process Start\n");
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
maskpoints->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ maskpoints->SetInputData( bbGetInputIn() );
+#endif
+
maskpoints->SetOnRatio( bbGetInputRatio() );
maskpoints->RandomModeOn();
maskpoints->SetMaximumNumberOfPoints(5000);
maskpoints->Update();
bbSetOutputOut( maskpoints->GetOutput() );
-printf("EED MaskPoint::Process End\n");
}
//=====
// 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(MaskPoint,bbtk::AtomicBlackBox);
BBTK_NAME("MaskPoint");
BBTK_AUTHOR("ED at InfoDev Creatis");
-BBTK_DESCRIPTION("vtkMaskPoint");
+BBTK_DESCRIPTION("vtkMaskPoint. See Vectors/Tensors Examples");
BBTK_CATEGORY("empty");
BBTK_INPUT(MaskPoint,In,"vtkImageData",vtkImageData*,"");
BBTK_INPUT(MaskPoint,Ratio,"Ratio",int,"");
<process><PRE>
vtkMetaImageWriter* w = vtkMetaImageWriter::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetInputIn()->Update();
+#else
+ // ...
+#endif
/*
if (bbGetInputIn() == 0)
if (bbGetInputIn()!=NULL)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
w->SetInput(bbGetInputIn());
+#else
+ w->SetInputData(bbGetInputIn());
+#endif
w->SetCompression(bbGetInputCompression());
w->SetFileDimensionality(bbGetInputIn()->GetDataDimension()); // NTU
std::string userGivenName = bbGetInputFilename();
( bbGetInputStatus("Y") != bbtk::UPTODATE ) )
{
if ( bbGetInputX().size() != bbGetInputY().size() )
- bbtkError(bbGetFullName()
- <<" : input vectors X and Y do not have the same size");
+ bbtkError(bbGetFullName() <<" : input vectors X and Y do not have the same size");
if ( bbGetInputX().size() < 2 )
- bbtkError(bbGetFullName()
- <<" : input vectors X and Y have a size < 2");
+ bbtkError(bbGetFullName() <<" : input vectors X and Y have a size < 2");
bbGetOutputOut()->RemoveAllPoints ();
// std::cout << bbGetInputX().size()<< ","<< bbGetInputY().size()<< std::endl;
std::vector<float>::const_iterator x,y;
{
// std::cout << *x << " -> " << *y << std::endl;
bbGetOutputOut()->AddPoint(*x,*y);
- }
- }
+ } // for x ,y
+ } // if InputX
}
+
}//namespace bbtk
#endif // _USE_VTK_
BBTK_BEGIN_DESCRIBE_BLACK_BOX(PiecewiseFunction,bbtk::AtomicBlackBox);
BBTK_NAME("PiecewiseFunction");
BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
- BBTK_DESCRIPTION("Creates a piecewise function");
+ BBTK_DESCRIPTION("Creates a piecewise function ( see exampleVolumeRendering )");
BBTK_CATEGORY("misc");
BBTK_INPUT(PiecewiseFunction,X,"X coords of the points of the function",
std::vector<float>,"");
plane->SetNormal(normal[0],normal[1],normal[2]);
vtkClipPolyData* clipper = vtkClipPolyData::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
clipper->SetInputConnection(inPolyData->GetProducerPort());
+#else
+ clipper->SetInputData(inPolyData);
+#endif
+
clipper->SetClipFunction(plane);
clipper->Update();
vtkActor *actor = (vtkActor*)bbGetOutputOutActor();
vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
mapper->SetInput(informacion);
- actor->SetMapper(mapper);
+#else
+ mapper->SetInputData(informacion);
+#endif
+ actor->SetMapper(mapper);
bbSetOutputOutActor(actor);
if (bbGetInputInColor().size() >= 3)
if (bbGetInputActive()==true)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
polydatamapper->SetInput( bbGetInputIn() );
+#else
+ polydatamapper->SetInputData( bbGetInputIn() );
+#endif
+
vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
<process><PRE>
- printf("EED PolyDataWriter::Process() %s\n", bbGetInputFilename().c_str());
-
vtkPolyDataWriter* w = vtkPolyDataWriter::New();
if (bbGetInputFileType()==0)
{
} else {
w->SetFileTypeToBinary();
}
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetInputIn()->Update();
w->SetInput(bbGetInputIn());
+#else
+ w->SetInputData(bbGetInputIn());
+#endif
+
w->SetFileName(bbGetInputFilename().c_str());
w->Update();
w->Write();
BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,PolyDataWriterPlus)
BBTK_BLACK_BOX_IMPLEMENTATION(PolyDataWriterPlus,bbtk::AtomicBlackBox);
+
void PolyDataWriterPlus::Process()
{
- std::cout << "[" << this << "]" << "PolyDataWriterPlus::Process()..." << std::endl;
+// std::cout << "[" << this << "]" << "PolyDataWriterPlus::Process()..." << std::endl;
//Review the observers...
if (!HasObserver(OBS_PRE_WRITER_1) && bbGetInputInPrePersistObs1() != NULL)
{
std::cout << "Set In." << std::endl;
return;
+ } else {
+ vtkProp3D* actor = bbGetInputIn2();
+ vtkPolyDataMapper* mapper = ((vtkPolyDataMapper*)((vtkActor*)actor)->GetMapper());
+ cosa = mapper->GetInput();
}
- else
- {
- vtkProp3D* actor = bbGetInputIn2();
- vtkPolyDataMapper* mapper = ((vtkPolyDataMapper*)((vtkActor*)actor)->GetMapper());
- cosa = mapper->GetInput();
- }
- }
- else
- {
+ } else {
cosa = bbGetInputIn();
}
std::string nuevo_nombre = guessName(bbGetInputInPath());
-
vtkPolyData* entrada = cosa;
- std::cout << "Before writing" << std::endl;
- entrada->Print(std::cout);
+// std::cout << "Before writing" << std::endl;
+// entrada->Print(std::cout);
std::vector< std::string > partes = StringSplit(nuevo_nombre, ".");
std::string extension = partes.at(partes.size()-1);
- std::cout << "Extension (vtk, vtp o stl?) => " << extension << std::endl;
-
-
+// std::cout << "Extension (vtk, vtp o stl?) => " << extension << std::endl;
vtkDataSetSurfaceFilter* surfaceFilter = vtkDataSetSurfaceFilter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
surfaceFilter->SetInput(entrada);
+#else
+ surfaceFilter->SetInputData(entrada);
+#endif
+
surfaceFilter->Update();
//vtkPolyData* polydata = surfaceFilter->GetOutput();
entrada = surfaceFilter->GetOutput();
if (extension.compare("vtk") == 0)
{
vtkPolyDataWriter* writer = vtkPolyDataWriter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput(entrada);
+#else
+ writer->SetInputData(entrada);
+#endif
+
writer->SetFileName(nuevo_nombre.data());
writer->Write();
writer->Delete();
{
vtkXMLPolyDataWriter* writer = vtkXMLPolyDataWriter::New();
writer->SetFileName ( nuevo_nombre.data() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput ( entrada );
+#else
+ writer->SetInputData ( entrada );
+#endif
+
writer->Write();
writer->Delete();
}
{
vtkSTLWriter* writer = vtkSTLWriter::New();
writer->SetFileName ( nuevo_nombre.data() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput ( entrada );
+#else
+ writer->SetInputData ( entrada );
+#endif
+
writer->Write();
writer->Print(std::cout);
writer->Delete();
InvokeEvent(OBS_POST_WRITER_1);
}
+
void PolyDataWriterPlus::bbUserSetDefaultValues()
{
BBTK_CATEGORY("__CATEGORY__");
BBTK_INPUT(PolyDataWriterPlus,InPrePersistObs1,"Who will be notified before persist", vtkCommand*,"");
BBTK_INPUT(PolyDataWriterPlus,InPostPersistObs1,"Who will be notified after persist", vtkCommand*,"");
-BBTK_INPUT(PolyDataWriterPlus,InPath,"Path to the file to be created or rewrited",std::string,"");
+BBTK_INPUT(PolyDataWriterPlus,InPath,"Path to the file to be created or rewrited (.vtk file)",std::string,"");
BBTK_INPUT(PolyDataWriterPlus,In,"Information to be saved", vtkPolyData*,"");
BBTK_INPUT(PolyDataWriterPlus,In2,"Information to be saved", vtkProp3D*,"");
BBTK_END_DESCRIBE_BLACK_BOX(PolyDataWriterPlus);
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
-printf("EED ProbeFilter::Process() Start\n");
-
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_probefilter->SetSource( bbGetInputSource() );
_probefilter->SetInput( bbGetInputInput() );
+#else
+ _probefilter->SetSourceData( bbGetInputSource() );
+ _probefilter->SetInputData( bbGetInputInput() );
+#endif
+
_probefilter->Update();
bbSetOutputOut( _probefilter->GetOutput() );
-printf("EED ProbeFilter::Process() End\n");
-
}
//=====
// 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 RescaleSlopeIntercept::Process()
{
+printf("RescaleSlopeIntercept::Process Start\n");
// THE MAIN PROCESSING METHOD BODY
// Here we simply set the input 'In' value to the output 'Out'
shift= A + (range[1]*newdifrange/difrange);
} // if type 3
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
filter1->SetInput( bbGetInputIn() );
+#else
+ filter1->SetInputData( bbGetInputIn() );
+#endif
+
filter1->SetOutputScalarType( VTK_DOUBLE );
filter1->SetShift( 0 );
filter1->SetScale( scale );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
filter2->SetInput( filter1->GetOutput() );
+#else
+ filter2->SetInputData( filter1->GetOutput() );
+#endif
+
filter2->SetOutputScalarType( outputformat );
filter2->SetShift( shift );
filter2->SetScale( 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
mchange->SetInput( filter2->GetOutput() );
+#else
+ mchange->SetInputData( filter2->GetOutput() );
+#endif
+
mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
mchange->SetOutputSpacing (spc);
+ filter1->Update(); //important
+ filter2->Update(); //important
mchange->Update(); //important
bbSetOutputOut( mchange->GetOutput() );
+printf("RescaleSlopeIntercept::Process A\n");
} else {
+printf("RescaleSlopeIntercept::Process B\n");
bbSetOutputOut( NULL );
} // if bbGetInputIn
+printf("RescaleSlopeIntercept::Process End\n");
+
}
{
thresh2 = vtkImageThreshold::New();
- thresh2->SetInValue(255);
- thresh2->SetOutputScalarTypeToUnsignedChar();
+ thresh2->SetInValue(255);
+ thresh2->SetOutputScalarTypeToUnsignedChar();
connect2 = vtkImageSeedConnectivity::New();
- connect2->SetInput(thresh2->GetOutput());
- connect2->SetInputConnectValue(255);
- connect2->SetOutputConnectedValue( 255 );
- connect2->SetOutputUnconnectedValue(0);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ connect2->SetInput(thresh2->GetOutput());
+#else
+ connect2->SetInputData(thresh2->GetOutput());
+#endif
+
+ connect2->SetInputConnectValue(255);
+ connect2->SetOutputConnectedValue( 255 );
+ connect2->SetOutputUnconnectedValue(0);
cast4 = vtkImageCast::New();
- cast4->SetInput(connect2->GetOutput());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ cast4->SetInput(connect2->GetOutput());
+#else
+ cast4->SetInputData(connect2->GetOutput());
+#endif
// EED 2016 06 15
{
int outputformat = bbtkStaticLecture::GetTypeFormat( bbGetInputOutputFormat() , bbGetInputIn() );
vtkImageData *imagedata = bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imagedata->UpdateInformation();
imagedata->SetUpdateExtent(imagedata->GetWholeExtent());
imagedata->Update();
- thresh2->ThresholdBetween(3000, 3001);
thresh2->SetInput(imagedata);
+#else
+ imagedata->SetExtent(imagedata->GetExtent());
+ thresh2->SetInputData(imagedata);
+#endif
+
+ thresh2->ThresholdBetween(3000, 3001);
thresh2->ThresholdBetween(bbGetInputThresholdMinMax()[0], bbGetInputThresholdMinMax()[1]);
thresh2->Modified();
thresh2->Update();
connect2->RemoveAllSeeds ();
int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imagedata->GetWholeExtent(ext);
+#else
+ imagedata->GetExtent(ext);
+#endif
+
int maxX = ext[1]-ext[0]+1;
int maxY = ext[3]-ext[2]+1;
int maxZ = ext[5]-ext[4]+1;
final = vtkImageData::New();
final->SetSpacing(space);
final->SetDimensions(newDim);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
final->SetScalarType(scalar_type);
final->AllocateScalars();
final->Update();
-
+#else
+ final->AllocateScalars(scalar_type,1);
+#endif
}
}
caster = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
caster->SetInput(final);
+#else
+ caster->SetInputData(final);
+#endif
+
caster->SetOutputScalarTypeToShort();
caster->Update();
{
double radio;
if ( bbGetInputlstRadio().size()==0 )
- {
- radio = 1.0;
- } else if ( i<bbGetInputlstRadio().size() )
+ {
+ radio = 1.0;
+ } else if ( i<bbGetInputlstRadio().size() )
{
- radio = bbGetInputlstRadio()[i];
- } else
- {
- radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
- }
-
- return radio;
+ radio = bbGetInputlstRadio()[i];
+ } else {
+ radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
+ }
+ return radio;
}
void SphereList::Process()
{
+printf("EED SphereList::Process Start\n");
+
if (bbGetInputRenderer()!=NULL)
{
int sizeLstX=bbGetInputlstPointX().size();
newSphere -> SetPhiResolution(20);
newSphere -> SetRadius( 1 );
vtkPolyDataMapper * newMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
newMapper -> SetInput( newSphere -> GetOutput() );
+#else
+ newSphere -> Update();
+ newMapper -> SetInputData( newSphere -> GetOutput() );
+#endif
+
vtkActor * newActor = vtkActor::New();
sphereActor.push_back(newActor);
newActor -> SetMapper(newMapper);
sphereActor[i] -> GetProperty() -> SetOpacity( bbGetInputOpacity() );
sphereActor[i] -> GetProperty() -> SetColor( cr,cg,cb );
vtkspheresourceLst[i] -> SetRadius( GetRadio(i) );
+ vtkspheresourceLst[i] -> Update();
} // for i
if (sphereActor.size() != 0)
BBTK_INPUT(SphereList,lstPointY,"List of Y coordinates. Requirement: same size as vector X and vector Z.",std::vector<double>,"");
BBTK_INPUT(SphereList,lstPointZ,"List of Z coordinates. Requirement: same size as vector X and vector Y.",std::vector<double>,"");
BBTK_INPUT(SphereList,lstRadio,"List of Radio values",std::vector<double>,"");
- BBTK_INPUT(SphereList,Colour,"Colour RGB values for the spheres (3 first values of the vector for the first sphere, following values for the second sphere, etc.)",std::vector<double>,"");
- BBTK_INPUT(SphereList,Opacity,"Opacity of the spheres",double,"");
+ BBTK_INPUT(SphereList,Colour,"Colour RGB values for the spheres (default [1 0 0]) (3 first values of the vector for the first sphere, following values for the second sphere, etc.)",std::vector<double>,"");
+ BBTK_INPUT(SphereList,Opacity,"Opacity of the spheres (default 1)",double,"");
BBTK_INPUT(SphereList,Spacing,"(default [1 1 1]) Spacing vector [sx sy sz]",std::vector<double>,"");
BBTK_INPUT(SphereList,Transform,"vtkTransform",vtkLinearTransform*,"");
<input name="CenterX" type="double" description="Center X coord"/>
<input name="CenterY" type="double" description="Center Y coord"/>
<input name="CenterZ" type="double" description="Center Z coord"/>
-<input name="PhiResolution" type="int" description="Sphere PhiResolution" special="vtk parameter" />
-<input name="Radius" type="double" description="Sphere Radius" special="vtk parameter" />
-<input name="ThetaResolution" type="int" description="Sphere ThetaResolution" special="vtk parameter" />
+<input name="PhiResolution" type="int" description="Sphere PhiResolution (default 10)" special="vtk parameter" />
+<input name="Radius" type="double" description="Sphere Radius (default 10)" special="vtk parameter" />
+<input name="ThetaResolution" type="int" description="Sphere ThetaResolution (default 10)" special="vtk parameter" />
<process>
<PRE>
<defaultValues><PRE>
bbSetInputActive(true);
+ bbSetInputRadius(10);
+ bbSetInputPhiResolution(10);
+ bbSetInputThetaResolution(10);
</PRE></defaultValues>
</blackbox>
if ( bbGetInputIn().c_str()!=empty)
{
spr -> SetFileName( bbGetInputIn().c_str() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
sp = spr->GetOutput();
sp -> Update();
bbSetOutputOut( sp );
+#else
+ spr -> Update();
+ bbSetOutputOut( spr->GetOutput() );
+#endif
} else {
bbSetOutputOut( NULL );
}
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-printf("EED SurfaceTexture::Process Start\n");
int i;
double spc[3];
int ext[6];
bbGetInputImage()->GetSpacing(spc);
bbGetInputImage()->GetScalarRange(range);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetInputImage()->GetWholeExtent(ext);
+#else
+ bbGetInputImage()->GetExtent(ext);
+#endif
+
int maxX = ext[1]-ext[0]+1;
int maxY = ext[3]-ext[2]+1;
int maxZ = ext[5]-ext[4]+1;
{
int ext[6];
int sizeX,sizeY,sizeZ;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
bbGetInputIn()->GetWholeExtent(ext);
+#else
+ bbGetInputIn()->GetExtent(ext);
+#endif
+
sizeX=ext[1]-ext[0]+1;
sizeY=ext[3]-ext[2]+1;
sizeZ=ext[5]-ext[4]+1;
BBTK_BEGIN_DESCRIBE_BLACK_BOX(TemporalPicker,bbtk::AtomicBlackBox);
BBTK_NAME("TemporalPicker");
BBTK_AUTHOR("Info-Dev");
- BBTK_DESCRIPTION("Pick vector in Z direction");
+ BBTK_DESCRIPTION("Pick vector in Z direction (2D+t => 3D)");
BBTK_CATEGORY("");
BBTK_INPUT(TemporalPicker,In,"Input image",vtkImageData*,"");
BBTK_INPUT(TemporalPicker,SizeRegion,"Size region (default 1)",int,"");
int outputdims[3];
imageIn->GetDimensions (inputdims);
unsigned short *input = (unsigned short *)(imageIn->GetScalarPointer());
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageIn->Update();
+#else
+ // ..
+#endif
unsigned int div = (unsigned int)ceil(sqrt( (double)numberOfImagesInMosaic ) );
outputdims[0] = inputdims[0] / div;
vtkImageOut = vtkImageData::New();
vtkImageOut->SetDimensions( outputdims );
vtkImageOut->SetExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
- vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
vtkImageOut->SetNumberOfScalarComponents(1);
//vtkImageOut->SetSpacing( blabla );
vtkImageOut->SetScalarType( VTK_UNSIGNED_SHORT );
vtkImageOut->AllocateScalars();
vtkImageOut->Update();
+#else
+ vtkImageOut->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#endif
+
+
+
unsigned short *output =(unsigned short *)(vtkImageOut->GetScalarPointer());
return;
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
ope->SetInput1((vtkDataObject*)bbGetInputIn1());
+#else
+ ope->SetInput1Data((vtkDataObject*)bbGetInputIn1());
+#endif
switch (bbGetInputOperation())
for (i=0 ; i<size ; i++)
{
vtkimagegaussiansmooth = vtkImageGaussianSmooth::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkimagegaussiansmooth->SetInput( bbGetInputIn()[i] );
+#else
+ vtkimagegaussiansmooth->SetInputData( bbGetInputIn()[i] );
+#endif
+
vtkimagegaussiansmooth->SetStandardDeviation( stdvX,stdvY, stdvZ );
vtkimagegaussiansmooth->Modified();
vtkimagegaussiansmooth->Update();
polydatamapper = vtkPolyDataMapper::New();
vtkactor = vtkActor::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
polydatamapper->SetInput(marchingcubes->GetOutput());
+#else
+ polydatamapper->SetInputData(marchingcubes->GetOutput());
+#endif
+
vtkactor->SetMapper(polydatamapper);
polydatamapper->ScalarVisibilityOff();
marchingcubes=VecMarchingcubes[i];
vtkactor=(vtkActor*)VecVtkactor[i];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
marchingcubes->SetInput( bbGetInputIn()[i] );
+#else
+ marchingcubes->SetInputData( bbGetInputIn()[i] );
+#endif
+
marchingcubes->SetValue(0, bbGetInputIsovalue() );
marchingcubes->Update();
bool changed = false;
if ( bbGetInputStatus("In") != bbtk::UPTODATE )
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
mMapper->SetInput( bbGetInputIn() );
+#else
+ mMapper->SetInputData( bbGetInputIn() );
+#endif
changed = true;
}
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleDoubleSlicer.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#exampleDoubleSlicer'>exampleDoubleSlicer.bbs</a>.
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:DoubleSlicer
+PACKAGENAME:wxvtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+Widget
+114.692614:-148.835476:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:11
+COMPLEX_PORT
+In1
+113.645640:101.221236:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+In2
+-23.203486:97.557528:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinDialog
+175.787320:91.451347:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinTitle
+226.397938:91.451347:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinWidth
+252.583834:92.672583:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinHeight
+200.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Orientation
+-99.503468:98.965966:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+RefreshSlicer1
+86.989011:98.965966:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+RefreshSlicer2
+10.496359:92.061965:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxProcessModeSlicer1
+101.407769:98.778764:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxProcessModeSlicer2
+-58.644844:96.336292:-900.000000
+FIN_COMPLEX_PORT
+BOXES:7
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+90.617386:-106.093473:-900.000000
+129.697386:-116.093473:-900.000000
+PORT
+Proportion:"80"
+FIN_BOX
+BOX
+wx:LayoutLine:slicers
+ISEXEC:FALSE
+5.679546:-77.487776:-900.000000
+63.239546:-87.487776:-900.000000
+PORT
+Orientation:"HORIZONTAL"
+FIN_BOX
+BOX
+wxvtk:Viewer2D:slicer1
+ISEXEC:FALSE
+80.764708:-7.676600:-900.000000
+119.844708:-17.676600:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:slicer2
+ISEXEC:FALSE
+-18.360331:-0.894079:-900.000000
+20.719669:-10.894079:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+33.020789:74.281715:-900.000000
+84.420789:64.281715:-900.000000
+PORT
+Title:"Slice"
+FIN_BOX
+BOX
+std:MultipleInputs:refresh1
+ISEXEC:FALSE
+56.039503:38.668844:-900.000000
+97.539503:28.668844:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:refresh2
+ISEXEC:FALSE
+-5.624910:34.913382:-900.000000
+35.875090:24.913382:-900.000000
+FIN_BOX
+CONNECTIONS:22
+CONNECTION
+slicers:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+slicer1:Widget:slicers:Widget1
+NumberOfControlPoints:0
+CONNECTION
+slicer2:Widget:slicers:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:slicer1:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:slicer2:Slice
+NumberOfControlPoints:0
+CONNECTION
+refresh1:Out:slicer1:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+refresh2:Out:slicer2:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:refresh2:In1
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:refresh1:In1
+NumberOfControlPoints:0
+CONNECTION
+In1:In1:slicer1:In
+NumberOfControlPoints:0
+CONNECTION
+In2:In2:slicer2:In
+NumberOfControlPoints:0
+CONNECTION
+WinDialog:WinDialog:main:WinDialog
+NumberOfControlPoints:0
+CONNECTION
+WinTitle:WinTitle:main:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+WinWidth:WinWidth:main:WinWidth
+NumberOfControlPoints:0
+CONNECTION
+WinHeight:WinHeight:main:WinHeight
+NumberOfControlPoints:0
+CONNECTION
+Orientation:Orientation:slicers:Orientation
+NumberOfControlPoints:0
+CONNECTION
+RefreshSlicer1:RefreshSlicer1:refresh1:In2
+NumberOfControlPoints:0
+CONNECTION
+RefreshSlicer2:RefreshSlicer2:refresh2:In2
+NumberOfControlPoints:0
+CONNECTION
+BoxProcessModeSlicer1:BoxProcessModeSlicer1:slicer1:BoxProcessMode
+NumberOfControlPoints:0
+CONNECTION
+BoxProcessModeSlicer2:BoxProcessModeSlicer2:slicer2:BoxProcessMode
+NumberOfControlPoints:0
+CONNECTION
+main:Widget:Widget:Widget
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
-
-description "Demo of the box <a href=#DoubleSlicer>DoubleSlicer</a>."
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleDoubleSlicer.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include wx
+include wxvtk
+include std
+
+define DoubleSlicer wxvtk
+
author "laurent.guigues at creatis.insa-lyon.fr"
-category "example"
+description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#exampleDoubleSlicer'>exampleDoubleSlicer.bbs</a>."
+
+category "<VOID>"
+
+new wx:LayoutSplit main
+ set main.Proportion "80"
+
+new wx:LayoutLine slicers
+ set slicers.Orientation "HORIZONTAL"
+
+new wxvtk:Viewer2D slicer1
+
+new wxvtk:Viewer2D slicer2
+
+new wx:Slider slider
+ set slider.Title "Slice"
+
+new std:MultipleInputs refresh1
+
+new std:MultipleInputs refresh2
-include vtk/boxes/bbLoadHola
-include wxvtk/boxes/bbDoubleSlicer
-new LoadHola reader1
-new LoadHola reader2
-new DoubleSlicer viewer
+connect slicers.Widget main.Widget1
+connect slicer1.Widget slicers.Widget1
+connect slicer2.Widget slicers.Widget2
+connect slider.Widget main.Widget2
+connect slider.Out slicer1.Slice
+connect slider.Out slicer2.Slice
+connect refresh1.Out slicer1.BoxExecute
+connect refresh2.Out slicer2.BoxExecute
+connect slider.BoxChange refresh2.In1
+connect slider.BoxChange refresh1.In1
-connect reader1.Out viewer.In1
-connect reader2.Out viewer.In2
+# Complex input ports
+input In1 slicer1.In " "
+input In2 slicer2.In " "
+input WinDialog main.WinDialog " "
+input WinTitle main.WinTitle " "
+input WinWidth main.WinWidth " "
+input WinHeight main.WinHeight " "
+input Orientation slicers.Orientation " "
+input RefreshSlicer1 refresh1.In2 " "
+input RefreshSlicer2 refresh2.In2 " "
+input BoxProcessModeSlicer1 slicer1.BoxProcessMode " "
+input BoxProcessModeSlicer2 slicer2.BoxProcessMode " "
-load std
-set viewer.WinTitle "ExampleDoubleSlicer"
-set viewer.WinWidth 600
-set viewer.WinHeight 400
-set viewer.Orientation 0
+# Complex output ports
+output Widget main.Widget " "
-exec viewer
+exec main
+endefine
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleImagePlanes.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of the box vtk::ImagePlanes.
+AUTHOR:laurent.guigues@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:3
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+36.250000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:FALSE
+-2.010756:46.011610:-900.000000
+37.614244:36.011610:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:TRUE
+0.000000:10.000000:-900.000000
+63.720000:0.000000:-900.000000
+PORT
+WinHeight:"400"
+PORT
+WinTitle:"ExampleImagePlanes"
+PORT
+WinWidth:"350"
+FIN_BOX
+CONNECTIONS:4
+CONNECTION
+reader:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneX:viewer:Obs1
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneY:viewer:Obs2
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneZ:viewer:Obs3
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleImagePlanes.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
-description "Example of the box vtk::ImagePlanes."
author "laurent.guigues@creatis.insa-lyon.fr"
+description "Example of the box vtk::ImagePlanes."
category "example"
-include vtk/boxes/bbLoadHola
-load vtk
-load wxvtk
+new vtk:LoadHola reader
+
+new vtk:ImagePlanes planes
+
+new wxvtk:Viewer3D viewer
+ set viewer.WinHeight "400"
+ set viewer.WinTitle "ExampleImagePlanes"
+ set viewer.WinWidth "350"
+
-new LoadHola reader
-new ImagePlanes planes
-new Viewer3D viewer
connect reader.Out planes.In
+
connect planes.PlaneX viewer.Obs1
+
connect planes.PlaneY viewer.Obs2
+
connect planes.PlaneZ viewer.Obs3
-load std
-set viewer.WinTitle "ExampleImagePlanes"
-set viewer.WinWidth 350
-set viewer.WinHeight 400
-#set viewer.Slice 20
-exec viewer
+# Complex input ports
+exec viewer
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/appli/bbs/appli/exampleIsoSurfaceWidget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of IsoSurfaceWidget.
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:7
+BOX
+wxvtk:IsoSurfaceWidget:surface1
+ISEXEC:FALSE
+-17.763434:48.350814:-900.000000
+27.861566:38.350814:-900.000000
+PORT
+Colour:"0.5 0 0"
+PORT
+Isovalue:"100"
+PORT
+Opacity:"100"
+PORT
+Title:"Iso-surface 1"
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface2
+ISEXEC:FALSE
+-76.685492:44.440859:-900.000000
+-31.060492:34.440859:-900.000000
+PORT
+Isovalue:"200"
+PORT
+Opacity:"20"
+PORT
+Title:"Iso-surface 2"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-71.608845:-32.743264:-900.000000
+-7.888845:-42.743264:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:reader1
+ISEXEC:FALSE
+-8.962398:102.678719:-900.000000
+28.412602:92.678719:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:refresh
+ISEXEC:FALSE
+-28.865581:0.514767:-900.000000
+11.509419:-9.485233:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:main
+ISEXEC:TRUE
+-31.022958:-128.884139:-900.000000
+26.537042:-138.884139:-900.000000
+PORT
+WinHeight:"800"
+PORT
+WinWidth:"800"
+FIN_BOX
+BOX
+wx:LayoutLine:controls
+ISEXEC:FALSE
+64.947557:-18.962398:-900.000000
+122.507557:-28.962398:-900.000000
+FIN_BOX
+CONNECTIONS:11
+CONNECTION
+reader1:Out:surface1:In
+NumberOfControlPoints:0
+CONNECTION
+reader1:Out:surface2:In
+NumberOfControlPoints:0
+CONNECTION
+surface1:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+surface2:Out:viewer:In2
+NumberOfControlPoints:0
+CONNECTION
+surface1:BoxChange:refresh:In1
+NumberOfControlPoints:0
+CONNECTION
+surface2:BoxChange:refresh:In2
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+controls:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+surface1:Widget:controls:Widget1
+NumberOfControlPoints:0
+CONNECTION
+surface2:Widget:controls:Widget2
+NumberOfControlPoints:0
+CONNECTION
+refresh:Out:viewer:BoxExecute
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/appli/bbs/appli/exampleIsoSurfaceWidget.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wxvtk
+include vtk
+include std
+include wx
-description "Example of IsoSurfaceWidget."
author "laurent.guigues at creatis.insa-lyon.fr"
+description "Example of IsoSurfaceWidget."
category "example"
-include wxvtk
+new wxvtk:IsoSurfaceWidget surface1
+ set surface1.Colour "0.5 0 0"
+ set surface1.Isovalue "100"
+ set surface1.Opacity "100"
+ set surface1.Title "Iso-surface 1"
-include wxvtk/boxes/bbIsoSurfaceWidget
-include vtk/boxes/bbLoadHola
-
-new IsoSurfaceWidget surface1
-new IsoSurfaceWidget surface2
+new wxvtk:IsoSurfaceWidget surface2
+ set surface2.Isovalue "200"
+ set surface2.Opacity "20"
+ set surface2.Title "Iso-surface 2"
-//load wxvtk
-new Viewer3D viewer
-new LoadHola reader1
+new wxvtk:Viewer3D viewer
-connect reader1.Out surface1.In
-connect reader1.Out surface2.In
+new vtk:LoadHola reader1
+
+new std:MultipleInputs refresh
+
+new wx:LayoutLine main
+ set main.WinHeight "800"
+ set main.WinWidth "800"
-set surface1.Isovalue 100
-set surface1.Opacity 100
-set surface1.Colour "0.5 0 0"
-set surface1.Title "Iso-surface 1"
+new wx:LayoutLine controls
-set surface2.Isovalue 200
-set surface2.Opacity 20
-set surface2.Title "Iso-surface 2"
+connect reader1.Out surface1.In
+
+connect reader1.Out surface2.In
connect surface1.Out viewer.In1
+
connect surface2.Out viewer.In2
-new MultipleInputs refresh
+
connect surface1.BoxChange refresh.In1
+
connect surface2.BoxChange refresh.In2
-new LayoutLine main
-new LayoutLine controls
connect viewer.Widget main.Widget1
-connect controls.Widget main.Widget2
-connect surface1.Widget controls.Widget1
-connect surface2.Widget controls.Widget2
-set main.WinWidth 800
-set main.WinHeight 800
+connect controls.Widget main.Widget2
-exec main
+connect surface1.Widget controls.Widget1
+
+connect surface2.Widget controls.Widget2
-# BUG in pipeline update : have to plug forced execution of viewer
-# after creation of all windows
connect refresh.Out viewer.BoxExecute
+
+
+
+# Complex input ports
+exec main
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleMIPWidget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of MIPWidget.
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:4
+BOX
+wxvtk:MIPWidget:MIP
+ISEXEC:FALSE
+2.104064:58.878521:-900.000000
+36.379064:48.878521:-900.000000
+PORT
+Title:"MIP Controls"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-72.647174:20.161687:-900.000000
+-8.927174:10.161687:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+-32.763275:78.532355:-900.000000
+3.486725:68.532355:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:main
+ISEXEC:TRUE
+-34.172870:-23.907547:-900.000000
+23.387130:-33.907547:-900.000000
+PORT
+WinTitle:"ExampleMIPWidget"
+FIN_BOX
+CONNECTIONS:5
+CONNECTION
+reader:Out:MIP:In
+NumberOfControlPoints:0
+CONNECTION
+MIP:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+MIP:BoxChange:viewer:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+MIP:Widget:main:Widget2
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleMIPWidget.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include wxvtk
+include vtk
+include wx
-description "Example of MIPWidget."
author "laurent.guigues at creatis.insa-lyon.fr"
+description "Example of MIPWidget."
category "example"
-include wxvtk/boxes/bbMIPWidget
-include vtk/boxes/bbLoadHola
-
-new MIPWidget MIP
+new wxvtk:MIPWidget MIP
+ set MIP.Title "MIP Controls"
+
+new wxvtk:Viewer3D viewer
+
+new vtk:LoadHola reader
+
+new wx:LayoutLine main
+ set main.WinTitle "ExampleMIPWidget"
-load wxvtk
-new Viewer3D viewer
-new LoadHola reader
connect reader.Out MIP.In
+
connect MIP.Out viewer.In1
+
connect MIP.BoxChange viewer.BoxExecute
-new LayoutLine main
connect viewer.Widget main.Widget1
-connect MIP.Widget main.Widget2
-set MIP.Shift 300
-set MIP.Scale 200
-#set MIP.Colour "0.5 0 0"
-set MIP.Title "MIP Controls"
+connect MIP.Widget main.Widget2
+
+
-set main.WinTitle "ExampleMIPWidget"
+# Complex input ports
exec main
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:tool image viewer
+DESCRIPTION:elementary image synchronization tool
+AUTHOR:info-dev at creatis.Insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:12
+BOX
+creaImageIO:ImagesChooserDialogBox:chooser1
+ISEXEC:FALSE
+34.805229:92.592868:-900.000000
+89.430229:82.592868:-900.000000
+FIN_BOX
+BOX
+vtk:ConcatImages:reader1
+ISEXEC:FALSE
+46.468061:65.212081:-900.000000
+89.068061:55.212081:-900.000000
+FIN_BOX
+BOX
+creaImageIO:ImagesChooserDialogBox:chooser2
+ISEXEC:FALSE
+-91.028897:89.210524:-900.000000
+-36.403897:79.210524:-900.000000
+FIN_BOX
+BOX
+vtk:ConcatImages:reader2
+ISEXEC:FALSE
+-101.880062:-4.332819:-900.000000
+-59.280062:-14.332819:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:viewer1
+ISEXEC:FALSE
+32.876971:-62.895296:-900.000000
+96.596971:-72.895296:-900.000000
+PORT
+nTypeView:"0"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:viewer2
+ISEXEC:FALSE
+-100.594549:-63.561510:-900.000000
+-36.874549:-73.561510:-900.000000
+PORT
+nTypeView:"0"
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+-19.017545:-28.450304:-900.000000
+32.382455:-38.450304:-900.000000
+PORT
+ReactiveOnTrack:"1"
+PORT
+Title:"Slice number"
+FIN_BOX
+BOX
+wx:LayoutSplit:layout
+ISEXEC:TRUE
+-55.328435:-151.513368:-900.000000
+-16.248435:-161.513368:-900.000000
+PORT
+Proportion:"10"
+FIN_BOX
+BOX
+wx:LayoutLine:layout_line
+ISEXEC:FALSE
+-17.426729:-112.296567:-900.000000
+40.133271:-122.296567:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+itk:ImageProperties:imProperties
+ISEXEC:FALSE
+-17.395966:41.194134:-900.000000
+30.879034:31.194134:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:imSize
+ISEXEC:FALSE
+-35.036257:20.479935:-900.000000
+11.688743:10.479935:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:Add:add
+ISEXEC:FALSE
+-9.017909:-1.097942:-900.000000
+19.607091:-11.097942:-900.000000
+PORT
+In1:"-1"
+FIN_BOX
+CONNECTIONS:14
+CONNECTION
+reader1:Out:viewer1:In
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer1:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+reader2:Out:viewer2:In
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer2:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:layout:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layout_line:Widget:layout:Widget2
+NumberOfControlPoints:0
+CONNECTION
+viewer1:Widget:layout_line:Widget1
+NumberOfControlPoints:0
+CONNECTION
+viewer2:Widget:layout_line:Widget2
+NumberOfControlPoints:0
+CONNECTION
+reader1:Out:imProperties:In
+NumberOfControlPoints:0
+CONNECTION
+imProperties:Size:imSize:In
+NumberOfControlPoints:0
+CONNECTION
+imSize:Out:add:In2
+NumberOfControlPoints:0
+CONNECTION
+add:Out:slider:Max
+NumberOfControlPoints:0
+CONNECTION
+chooser2:OutImages:reader2:In
+NumberOfControlPoints:0
+CONNECTION
+chooser1:OutImages:reader1:In
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbs
+# ----------------------------------
-
-
-description "elementary image synchronization tool"
-author "info-dev at creatis.Insa-lyon.fr"
-category "tool image viewer"
+# BBTK GEditor Script
+# ----------------------
include std
+include itkvtk
+include creaImageIO
include vtk
+include creaMaracasVisu
include wx
include itk
-include wxvtk
-include itkvtk
+include std
+
+author "info-dev at creatis.Insa-lyon.fr"
+description "elementary image synchronization tool"
+category "tool image viewer"
+
+new creaImageIO:ImagesChooserDialogBox chooser1
+
+new vtk:ConcatImages reader1
+
+new creaImageIO:ImagesChooserDialogBox chooser2
+
+new vtk:ConcatImages reader2
+
+new creaMaracasVisu:ViewerNV viewer1
+ set viewer1.nTypeView "0"
-load creaImageIO
-load creaMaracasVisu
+new creaMaracasVisu:ViewerNV viewer2
+ set viewer2.nTypeView "0"
-new ImagesChooserDialogBox chooser1
-new ConcatImages reader1
- connect chooser1.Out reader1.In
+new wx:Slider slider
+ set slider.ReactiveOnTrack "1"
+ set slider.Title "Slice number"
-new ImagesChooserDialogBox chooser2
-new ConcatImages reader2
- connect chooser2.Out reader2.In
+new wx:LayoutSplit layout
+ set layout.Proportion "10"
-new ViewerNV viewer1
- set viewer1.nTypeView 0
-new ViewerNV viewer2
- set viewer2.nTypeView 0
+new wx:LayoutLine layout_line
+ set layout_line.Orientation "H"
-# slider is useless, since ViewerNV has no entry 'Slice Number' :-(
-new Slider slider
-new LayoutSplit layout
-new LayoutLine layout_line
-new ImageProperties imProperties
-new GetVectorIntElement imSize
-new Add add
+new itk:ImageProperties imProperties
+
+new std:GetVectorIntElement imSize
+ set imSize.I "2"
+
+new std:Add add
+ set add.In1 "-1"
+
+
+connect reader1.Out viewer1.In
-connect reader1.Out viewer1.In
connect slider.BoxChange viewer1.BoxExecute
-connect reader2.Out viewer2.In
+connect reader2.Out viewer2.In
+
connect slider.BoxChange viewer2.BoxExecute
connect slider.Widget layout.Widget1
+
connect layout_line.Widget layout.Widget2
+
connect viewer1.Widget layout_line.Widget1
+
connect viewer2.Widget layout_line.Widget2
+
connect reader1.Out imProperties.In
+
connect imProperties.Size imSize.In
+
connect imSize.Out add.In2
+
connect add.Out slider.Max
-set slider.Title "Slice number"
-set slider.ReactiveOnTrack 1
-set layout.Proportion 10
-set layout_line.Orientation H
+connect chooser2.OutImages reader2.In
+
+connect chooser1.OutImages reader1.In
+
-set imSize.I 2
-set add.In1 -1
+# Complex input ports
exec layout
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:application image viewer
+DESCRIPTION:elementary 3D image synchronization tool
+AUTHOR:maciej.orkisz at creatis.Insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:12
+BOX
+wx:FileSelector:fileDialog1
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+37.375000:60.000000:-900.000000
+PORT
+DefaultDir:"."
+PORT
+Message:"Select the first (left) MHD image file"
+FIN_BOX
+BOX
+vtk:MetaImageReader:reader1
+ISEXEC:FALSE
+2.407568:40.470839:-900.000000
+48.907568:30.470839:-900.000000
+FIN_BOX
+BOX
+wx:FileSelector:fileDialog2
+ISEXEC:FALSE
+-68.507131:64.617369:-900.000000
+-26.757131:54.617369:-900.000000
+PORT
+DefaultDir:"."
+PORT
+Message:"Select the second (right) MHD image file"
+FIN_BOX
+BOX
+vtk:MetaImageReader:reader2
+ISEXEC:FALSE
+-71.607188:38.192114:-900.000000
+-25.107188:28.192114:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer1
+ISEXEC:FALSE
+29.269295:-74.222865:-900.000000
+68.349295:-84.222865:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2
+ISEXEC:FALSE
+-77.795707:-75.458213:-900.000000
+-38.715707:-85.458213:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+9.033110:-36.675368:-900.000000
+60.433110:-46.675368:-900.000000
+PORT
+ReactiveOnTrack:"1"
+PORT
+Title:"Slice number"
+FIN_BOX
+BOX
+wx:LayoutSplit:layout
+ISEXEC:TRUE
+-43.782767:-167.503045:-900.000000
+-4.702767:-177.503045:-900.000000
+PORT
+Proportion:"10"
+FIN_BOX
+BOX
+wx:LayoutLine:layout_line
+ISEXEC:FALSE
+-94.368246:-112.268838:-900.000000
+-36.808246:-122.268838:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+itk:ImageProperties:imProperties
+ISEXEC:FALSE
+22.779648:22.396181:-900.000000
+71.054648:12.396181:-900.000000
+FIN_BOX
+BOX
+std:GetVectorIntElement:imSize
+ISEXEC:FALSE
+29.521617:3.296470:-900.000000
+76.246617:-6.703530:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+std:Add:add
+ISEXEC:FALSE
+24.504482:-12.520390:-900.000000
+53.129482:-22.520390:-900.000000
+PORT
+In1:"-1"
+FIN_BOX
+CONNECTIONS:16
+CONNECTION
+fileDialog1:Out:reader1:In
+NumberOfControlPoints:0
+CONNECTION
+reader1:Out:viewer1:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer1:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer1:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+fileDialog2:Out:reader2:In
+NumberOfControlPoints:0
+CONNECTION
+reader2:Out:viewer2:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer2:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:viewer2:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:layout:Widget1
+NumberOfControlPoints:0
+CONNECTION
+layout_line:Widget:layout:Widget2
+NumberOfControlPoints:0
+CONNECTION
+viewer1:Widget:layout_line:Widget1
+NumberOfControlPoints:0
+CONNECTION
+viewer2:Widget:layout_line:Widget2
+NumberOfControlPoints:0
+CONNECTION
+reader1:Out:imProperties:In
+NumberOfControlPoints:0
+CONNECTION
+imProperties:Size:imSize:In
+NumberOfControlPoints:0
+CONNECTION
+imSize:Out:add:In2
+NumberOfControlPoints:0
+CONNECTION
+add:Out:slider:Max
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
-
-# my_MHD_slicer.bbs
-
-description "elementary 3D image synchronization tool"
-author "maciej.orkisz at creatis.Insa-lyon.fr"
-#category "example"
-category "application image viewer"
-#category "image"
-#category "viewer"
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
include std
-include vtk
+include itkvtk
include wx
-include itk
+include vtk
include wxvtk
-include itkvtk
+include itk
+include std
+
+author "maciej.orkisz at creatis.Insa-lyon.fr"
+description "elementary 3D image synchronization tool"
+category "application image viewer"
+
+new wx:FileSelector fileDialog1
+ set fileDialog1.DefaultDir "."
+ set fileDialog1.Message "Select the first (left) MHD image file"
+
+new vtk:MetaImageReader reader1
+
+new wx:FileSelector fileDialog2
+ set fileDialog2.DefaultDir "."
+ set fileDialog2.Message "Select the second (right) MHD image file"
+
+new vtk:MetaImageReader reader2
+
+new wxvtk:Viewer2D viewer1
+
+new wxvtk:Viewer2D viewer2
+
+new wx:Slider slider
+ set slider.ReactiveOnTrack "1"
+ set slider.Title "Slice number"
+
+new wx:LayoutSplit layout
+ set layout.Proportion "10"
+
+new wx:LayoutLine layout_line
+ set layout_line.Orientation "H"
+
+new itk:ImageProperties imProperties
+
+new std:GetVectorIntElement imSize
+ set imSize.I "2"
+
+new std:Add add
+ set add.In1 "-1"
+
+
+connect fileDialog1.Out reader1.In
+
+connect reader1.Out viewer1.In
+
+connect slider.Out viewer1.Slice
-new FileSelector fileDialog1
-new MetaImageReader reader1
-new FileSelector fileDialog2
-new MetaImageReader reader2
-new Viewer2D viewer1
-new Viewer2D viewer2
-new Slider slider
-new LayoutSplit layout
-new LayoutLine layout_line
-new ImageProperties imProperties
-new GetVectorIntElement imSize
-new Add add
-
-connect fileDialog1.Out reader1.In
-connect reader1.Out viewer1.In
-connect slider.Out viewer1.Slice
connect slider.BoxChange viewer1.BoxExecute
-connect fileDialog2.Out reader2.In
-connect reader2.Out viewer2.In
-connect slider.Out viewer2.Slice
+connect fileDialog2.Out reader2.In
+
+connect reader2.Out viewer2.In
+
+connect slider.Out viewer2.Slice
+
connect slider.BoxChange viewer2.BoxExecute
connect slider.Widget layout.Widget1
+
connect layout_line.Widget layout.Widget2
+
connect viewer1.Widget layout_line.Widget1
+
connect viewer2.Widget layout_line.Widget2
+
connect reader1.Out imProperties.In
+
connect imProperties.Size imSize.In
+
connect imSize.Out add.In2
+
connect add.Out slider.Max
-set fileDialog1.Message "Select the first (left) MHD image file"
-set fileDialog2.Message "Select the second (right) MHD image file"
-set slider.Title "Slice number"
-set slider.ReactiveOnTrack 1
-set layout.Proportion 10
-set layout_line.Orientation H
-set fileDialog1.DefaultDir "."
-set fileDialog2.DefaultDir "."
-set imSize.I 2
-set add.In1 -1
+# Complex input ports
exec layout
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView2D3D.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:6
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+35.550000:60.000000:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+30.657931:45.414653:-900.000000
+82.057931:35.414653:-900.000000
+PORT
+In:"20"
+FIN_BOX
+BOX
+wxvtk:Viewer2D:v2d
+ISEXEC:FALSE
+31.546239:3.408249:-900.000000
+70.626239:-6.591751:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:v3d
+ISEXEC:FALSE
+-79.518486:-19.529161:-900.000000
+-15.798486:-29.529161:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:layout
+ISEXEC:TRUE
+-7.062591:-52.589617:-900.000000
+50.497409:-62.589617:-900.000000
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface
+ISEXEC:FALSE
+-76.222611:12.755360:-900.000000
+-31.722611:2.755360:-900.000000
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+reader:Out:v2d:In
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:v2d:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:layout:Widget1
+NumberOfControlPoints:0
+CONNECTION
+v2d:Widget:layout:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:v2d:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:surface:In
+NumberOfControlPoints:0
+CONNECTION
+surface:Out:v3d:In1
+NumberOfControlPoints:0
+CONNECTION
+surface:Widget:layout:Widget3
+NumberOfControlPoints:0
+CONNECTION
+v3d:Widget:layout:Widget4
+NumberOfControlPoints:0
+CONNECTION
+surface:BoxChange:v3d:BoxExecute
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
-
-
-load wx
-include wxvtk
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView2D3D.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
include vtk
+include wx
+include wxvtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:LoadHola reader
+
+new wx:Slider slider
+ set slider.In "20"
+
+new wxvtk:Viewer2D v2d
+
+new wxvtk:Viewer3D v3d
+
+new wx:LayoutTab layout
+
+new wxvtk:IsoSurfaceWidget surface
-new LoadHola reader
-new Slider slider
-new Viewer2D v2d
-new Viewer3D v3d
-new LayoutTab layout
-set slider.In 20
connect reader.Out v2d.In
+
connect slider.Out v2d.Slice
+
connect slider.Widget layout.Widget1
+
connect v2d.Widget layout.Widget2
+
connect slider.BoxChange v2d.BoxExecute
-new IsoSurfaceWidget surface
+
connect reader.Out surface.In
+
connect surface.Out v3d.In1
+
connect surface.Widget layout.Widget3
+
connect v3d.Widget layout.Widget4
+
connect surface.BoxChange v3d.BoxExecute
+
+
+# Complex input ports
exec layout
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView3DImage1.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:6
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+-35.783794:49.518486:-900.000000
+0.466206:39.518486:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:FALSE
+-67.747502:16.928870:-900.000000
+-28.122502:6.928870:-900.000000
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface
+ISEXEC:FALSE
+-15.302280:20.593886:-900.000000
+29.197720:10.593886:-900.000000
+PORT
+Colour:"1.0 0.31 0.31"
+PORT
+Isovalue:"100"
+PORT
+Opacity:"100"
+PORT
+Title:"Iso-surface"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-71.985056:-11.524891:-900.000000
+-8.265056:-21.524891:-900.000000
+PORT
+Stereo:"FALSE"
+PORT
+WinHeight:"400"
+PORT
+WinTitle:"ExampleView3DImage1"
+PORT
+WinWidth:"350"
+FIN_BOX
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+-26.602426:-49.058321:-900.000000
+12.477574:-59.058321:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:controls
+ISEXEC:FALSE
+-1.829987:-12.669967:-900.000000
+55.730013:-22.669967:-900.000000
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+reader:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneX:viewer:Obs1
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneY:viewer:Obs2
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneZ:viewer:Obs3
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:surface:In
+NumberOfControlPoints:0
+CONNECTION
+surface:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+surface:BoxChange:viewer:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+controls:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+surface:Widget:controls:Widget1
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView3DImage1.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
+include wx
-description "Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>"
author "laurent.guigues at creatis.insa-lyon.fr"
+description "Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>"
category "example"
-load vtk
-load wxvtk
-include vtk/boxes/bbLoadHola
-include wxvtk/bbs/boxes/bbIsoSurfaceWidget
+new vtk:LoadHola reader
+
+new vtk:ImagePlanes planes
+
+new wxvtk:IsoSurfaceWidget surface
+ set surface.Colour "1.0 0.31 0.31"
+ set surface.Isovalue "100"
+ set surface.Opacity "100"
+ set surface.Title "Iso-surface"
+
+new wxvtk:Viewer3D viewer
+ set viewer.Stereo "FALSE"
+ set viewer.WinHeight "400"
+ set viewer.WinTitle "ExampleView3DImage1"
+ set viewer.WinWidth "350"
+
+new wx:LayoutSplit main
+
+new wx:LayoutLine controls
-new LoadHola reader
-new ImagePlanes planes
-new IsoSurfaceWidget surface
-new Viewer3D viewer
connect reader.Out planes.In
+
connect planes.PlaneX viewer.Obs1
+
connect planes.PlaneY viewer.Obs2
+
connect planes.PlaneZ viewer.Obs3
connect reader.Out surface.In
+
connect surface.Out viewer.In1
+
connect surface.BoxChange viewer.BoxExecute
-new LayoutSplit main
-new LayoutLine controls
connect viewer.Widget main.Widget1
-connect controls.Widget main.Widget2
-connect surface.Widget controls.Widget1
-set surface.Isovalue 100
-set surface.Opacity 100
-set surface.Colour "1.0 0.31 0.31"
-set surface.Title "Iso-surface"
+connect controls.Widget main.Widget2
-load std
-set viewer.WinTitle "ExampleView3DImage1"
-set viewer.WinWidth 350
-set viewer.WinHeight 400
-set viewer.Stereo FALSE
+connect surface.Widget controls.Widget1
-exec main
+# Complex input ports
+exec main
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView3DImage1_Stereo.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:6
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+35.550000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:ImagePlanes:planes
+ISEXEC:FALSE
+-70.337118:27.758176:-900.000000
+-30.712118:17.758176:-900.000000
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface
+ISEXEC:FALSE
+-0.470839:28.362736:-900.000000
+44.029161:18.362736:-900.000000
+PORT
+Colour:"1.0 0.31 0.31"
+PORT
+Isovalue:"100"
+PORT
+Opacity:"100"
+PORT
+Title:"Iso-surface"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-62.568268:-7.287336:-900.000000
+1.151732:-17.287336:-900.000000
+PORT
+Stereo:"TRUE"
+PORT
+WinHeight:"400"
+PORT
+WinTitle:"ExampleView3DImage1"
+PORT
+WinWidth:"350"
+FIN_BOX
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+-29.898301:-53.531295:-900.000000
+9.181699:-63.531295:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:controls
+ISEXEC:FALSE
+7.115961:-6.313635:-900.000000
+64.675961:-16.313635:-900.000000
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+reader:Out:planes:In
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneX:viewer:Obs1
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneY:viewer:Obs2
+NumberOfControlPoints:0
+CONNECTION
+planes:PlaneZ:viewer:Obs3
+NumberOfControlPoints:0
+CONNECTION
+reader:Out:surface:In
+NumberOfControlPoints:0
+CONNECTION
+surface:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+surface:BoxChange:viewer:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+controls:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+surface:Widget:controls:Widget1
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleView3DImage1_Stereo.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
+include wx
-description "Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>"
author "laurent.guigues at creatis.insa-lyon.fr"
+description "Example of complex 3D view of an image using vtk::ImagePlanes and wxvtk::IsoSurfaceWidget. Screenshot : <img src=ExampleView3DImage1.jpg></img>"
category "example"
-include vtk/boxes/bbLoadHola
-include wxvtk/boxes/bbIsoSurfaceWidget
-load vtk
-load wxvtk
+new vtk:LoadHola reader
+
+new vtk:ImagePlanes planes
+
+new wxvtk:IsoSurfaceWidget surface
+ set surface.Colour "1.0 0.31 0.31"
+ set surface.Isovalue "100"
+ set surface.Opacity "100"
+ set surface.Title "Iso-surface"
+
+new wxvtk:Viewer3D viewer
+ set viewer.Stereo "TRUE"
+ set viewer.WinHeight "400"
+ set viewer.WinTitle "ExampleView3DImage1"
+ set viewer.WinWidth "350"
+
+new wx:LayoutSplit main
+
+new wx:LayoutLine controls
-new LoadHola reader
-new ImagePlanes planes
-new IsoSurfaceWidget surface
-new Viewer3D viewer
connect reader.Out planes.In
+
connect planes.PlaneX viewer.Obs1
+
connect planes.PlaneY viewer.Obs2
+
connect planes.PlaneZ viewer.Obs3
connect reader.Out surface.In
+
connect surface.Out viewer.In1
+
connect surface.BoxChange viewer.BoxExecute
-new LayoutSplit main
-new LayoutLine controls
connect viewer.Widget main.Widget1
-connect controls.Widget main.Widget2
-connect surface.Widget controls.Widget1
-set surface.Isovalue 100
-set surface.Opacity 100
-set surface.Colour "1.0 0.31 0.31"
-set surface.Title "Iso-surface"
+connect controls.Widget main.Widget2
-load std
-set viewer.WinTitle "ExampleView3DImage1"
-set viewer.WinWidth 350
-set viewer.WinHeight 400
-set viewer.Stereo TRUE
+connect surface.Widget controls.Widget1
-exec main
+# Complex input ports
+exec main
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleViewer2D.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example of the box <a href=#Viewer2D>Viewer2D</a>.
+AUTHOR:laurent.guigues@creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:4
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+-64.740416:33.745367:-900.000000
+-28.490416:23.745367:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer
+ISEXEC:FALSE
+-60.449491:0.214071:-900.000000
+-21.369491:-9.785929:-900.000000
+PORT
+Slice:"20"
+FIN_BOX
+BOX
+wx:Slider:Box02
+ISEXEC:FALSE
+-6.120912:33.429597:-900.000000
+45.279088:23.429597:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box03
+ISEXEC:TRUE
+-30.369141:-30.133721:-900.000000
+8.710859:-40.133721:-900.000000
+PORT
+Proportion:"90"
+FIN_BOX
+CONNECTIONS:5
+CONNECTION
+reader:Out:viewer:In
+NumberOfControlPoints:0
+CONNECTION
+viewer:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box02:Out:viewer:Slice
+NumberOfControlPoints:0
+CONNECTION
+Box02:BoxChange:viewer:BoxExecute
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleViewer2D.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
+include wx
-description "Example of the box <a href=#Viewer2D>Viewer2D</a>."
author "laurent.guigues@creatis.insa-lyon.fr"
+description "Example of the box <a href=#Viewer2D>Viewer2D</a>."
category "example"
-include vtk/boxes/bbLoadHola
-load wxvtk
+new vtk:LoadHola reader
+
+new wxvtk:Viewer2D viewer
+ set viewer.Slice "20"
+
+new wx:Slider Box02
+
+new wx:LayoutSplit Box03
+ set Box03.Proportion "90"
+
-new LoadHola reader
-new Viewer2D viewer
connect reader.Out viewer.In
-# To get the string to int adaptor and set the slice
-load std
-set viewer.Slice 20
+connect viewer.Widget Box03.Widget1
+
+connect Box02.Widget Box03.Widget2
+
+connect Box02.Out viewer.Slice
+
+connect Box02.BoxChange viewer.BoxExecute
+
+
-exec viewer
+# Complex input ports
+exec Box03
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleViewerInLayoutTab.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Example :Viewer in a LayoutTab
+AUTHOR:jpr@creatis.univ-lyon1.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:7
+BOX
+wx:Slider:slider1
+ISEXEC:FALSE
+-10.656945:-20.720661:-900.000000
+40.743055:-30.720661:-900.000000
+PORT
+Orientation:"V"
+FIN_BOX
+BOX
+wx:Slider:slider2
+ISEXEC:FALSE
+-85.517485:-0.988251:-900.000000
+-34.117485:-10.988251:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider3
+ISEXEC:FALSE
+-66.947476:-23.063855:-900.000000
+-15.547476:-33.063855:-900.000000
+FIN_BOX
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+36.701776:15.273737:-900.000000
+72.951776:5.273737:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2DImageOriginal
+ISEXEC:FALSE
+13.662750:-65.575535:-900.000000
+66.262750:-75.575535:-900.000000
+PORT
+Slice:"20"
+FIN_BOX
+BOX
+wx:LayoutLine:sizer
+ISEXEC:FALSE
+-78.959365:-80.273255:-900.000000
+-21.399365:-90.273255:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:main
+ISEXEC:TRUE
+-12.023220:-110.546510:-900.000000
+45.536780:-120.546510:-900.000000
+FIN_BOX
+CONNECTIONS:7
+CONNECTION
+reader:Out:viewer2DImageOriginal:In
+NumberOfControlPoints:0
+CONNECTION
+slider2:Widget:sizer:Widget1
+NumberOfControlPoints:0
+CONNECTION
+slider3:Widget:sizer:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider1:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+sizer:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider1:BoxChange:viewer2DImageOriginal:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+viewer2DImageOriginal:Widget:main:Widget3
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleViewerInLayoutTab.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+include std
+include itkvtk
+include wx
+include vtk
+include wxvtk
-description "Example :Viewer in a LayoutTab"
author "jpr@creatis.univ-lyon1.fr"
+description "Example :Viewer in a LayoutTab"
category "example"
-// WARNING : Doesn't work, right now (25 Nov 2008)
-include std
-include vtk
-include wx
-include wxvtk
+new wx:Slider slider1
+ set slider1.Orientation "V"
+new wx:Slider slider2
-new Slider slider1
- set slider1.Orientation V
-new Slider slider2
-new Slider slider3
+new wx:Slider slider3
-new LoadHola reader
+new vtk:LoadHola reader
-new Viewer2D viewer2DImageOriginal
-connect reader.Out viewer2DImageOriginal.In
-set viewer2DImageOriginal.Slice 20
+new wxvtk:Viewer2D viewer2DImageOriginal
+ set viewer2DImageOriginal.Slice "20"
-new LayoutLine sizer
-new LayoutTab main
+new wx:LayoutLine sizer
+
+new wx:LayoutTab main
+
+
+connect reader.Out viewer2DImageOriginal.In
connect slider2.Widget sizer.Widget1
+
connect slider3.Widget sizer.Widget2
connect slider1.Widget main.Widget1
+
connect sizer.Widget main.Widget2
+
connect slider1.BoxChange viewer2DImageOriginal.BoxExecute
+
connect viewer2DImageOriginal.Widget main.Widget3
-exec viewer2DImageOriginal
+
+
+# Complex input ports
exec main
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleVolumeRendering.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:example
+DESCRIPTION:Volume rendering example
+AUTHOR:laurent.guigues at creatis.insa-lyon.fr
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:5
+BOX
+vtk:LoadHola:reader
+ISEXEC:FALSE
+0.000000:70.000000:-900.000000
+36.250000:60.000000:-900.000000
+FIN_BOX
+BOX
+vtk:PiecewiseFunction:color
+ISEXEC:FALSE
+-43.190285:17.155882:-900.000000
+0.109715:7.155882:-900.000000
+PORT
+X:"0 500 1000"
+PORT
+Y:"0 0.01 1"
+FIN_BOX
+BOX
+vtk:PiecewiseFunction:opacity
+ISEXEC:FALSE
+15.329606:15.711030:-900.000000
+61.104606:5.711030:-900.000000
+PORT
+X:"0 500 1000"
+PORT
+Y:"0 0.01 0.1"
+FIN_BOX
+BOX
+vtk:VolumeRenderer:renderer
+ISEXEC:FALSE
+-11.929912:-20.300581:-900.000000
+33.195088:-30.300581:-900.000000
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:TRUE
+-15.930767:-53.606966:-900.000000
+47.789233:-63.606966:-900.000000
+FIN_BOX
+CONNECTIONS:4
+CONNECTION
+reader:Out:renderer:In
+NumberOfControlPoints:0
+CONNECTION
+color:Out:renderer:ColorFunction
+NumberOfControlPoints:0
+CONNECTION
+opacity:Out:renderer:OpacityFunction
+NumberOfControlPoints:0
+CONNECTION
+renderer:Out:viewer:In1
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleVolumeRendering.bbs
+# ----------------------------------
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include wxvtk
-description "Volume rendering example"
author "laurent.guigues at creatis.insa-lyon.fr"
-category "example"
+description "Volume rendering example"
+category "example"
-include vtk
-load wxvtk
+new vtk:LoadHola reader
+
+new vtk:PiecewiseFunction color
+ set color.X "0 500 1000"
+ set color.Y "0 0.01 1"
+
+new vtk:PiecewiseFunction opacity
+ set opacity.X "0 500 1000"
+ set opacity.Y "0 0.01 0.1"
+
+new vtk:VolumeRenderer renderer
+
+new wxvtk:Viewer3D viewer
-new LoadHola reader
-new PiecewiseFunction color
-new PiecewiseFunction opacity
-new VolumeRenderer renderer
-new Viewer3D viewer
connect reader.Out renderer.In
+
connect color.Out renderer.ColorFunction
+
connect opacity.Out renderer.OpacityFunction
+
connect renderer.Out viewer.In1
-load std
-set color.X "0 500 1000"
-set color.Y "0 0.01 1"
-set opacity.X "0 500 1000"
-set opacity.Y "0 0.01 0.1"
+
+# Complex input ports
exec viewer
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbSimpleIsoSurfaceViewer.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:viewer
+DESCRIPTION:Simple viewer of an iso-surface of an image
+AUTHOR:laurent.guigues@creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:SimpleIsoSurfaceViewer
+PACKAGENAME:wxvtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+Widget
+29.396698:-80.884809:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:6
+COMPLEX_PORT
+In
+-50.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinDialog
+0.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinTitle
+50.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinWidth
+100.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinHeight
+150.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxExecute
+200.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+BOXES:4
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+41.534742:-43.421797:-900.000000
+80.614742:-53.421797:-900.000000
+PORT
+Proportion:"80"
+FIN_BOX
+BOX
+wxvtk:Viewer3D:viewer
+ISEXEC:FALSE
+-23.852972:-1.002246:-900.000000
+39.867028:-11.002246:-900.000000
+FIN_BOX
+BOX
+wxvtk:IsoSurfaceWidget:surface
+ISEXEC:FALSE
+-35.677279:56.327213:-900.000000
+8.822721:46.327213:-900.000000
+PORT
+Isovalue:"10"
+PORT
+Title:"Surface"
+PORT
+Vertical:"0"
+FIN_BOX
+BOX
+std:MultipleInputs:refresh
+ISEXEC:FALSE
+-4.150594:22.599736:-900.000000
+36.224406:12.599736:-900.000000
+FIN_BOX
+CONNECTIONS:12
+CONNECTION
+viewer:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+surface:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+surface:Out:viewer:In1
+NumberOfControlPoints:0
+CONNECTION
+surface:BoxChange:refresh:In1
+NumberOfControlPoints:0
+CONNECTION
+refresh:Out:viewer:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+In:In:surface:In
+NumberOfControlPoints:0
+CONNECTION
+WinDialog:WinDialog:main:WinDialog
+NumberOfControlPoints:0
+CONNECTION
+WinTitle:WinTitle:main:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+WinWidth:WinWidth:main:WinWidth
+NumberOfControlPoints:0
+CONNECTION
+WinHeight:WinHeight:main:WinHeight
+NumberOfControlPoints:0
+CONNECTION
+BoxExecute:BoxExecute:refresh:In2
+NumberOfControlPoints:0
+CONNECTION
+main:Widget:Widget:Widget
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbSimpleIsoSurfaceViewer.bbs
+# ----------------------------------
+include std
+include itkvtk
+include wx
+include wxvtk
+include std
-load std
-load wx
-load wxvtk
-load vtk
+define SimpleIsoSurfaceViewer wxvtk
-include wxvtk/boxes/bbIsoSurfaceWidget
+author "laurent.guigues@creatis.insa-lyon.fr"
+description "Simple viewer of an iso-surface of an image"
-define SimpleIsoSurfaceViewer wxvtk
+category "viewer"
- description "Simple viewer of an iso-surface of an image"
- author "laurent.guigues@creatis.insa-lyon.fr"
- category "viewer"
+new wx:LayoutSplit main
+ set main.Proportion "80"
- new LayoutSplit main
- new Viewer3D viewer
+new wxvtk:Viewer3D viewer
- new IsoSurfaceWidget surface
+new wxvtk:IsoSurfaceWidget surface
+ set surface.Isovalue "10"
+ set surface.Title "Surface"
+ set surface.Vertical "0"
- set surface.Isovalue 10
- set surface.Title "Surface"
- set surface.Vertical 0
+new std:MultipleInputs refresh
- connect viewer.Widget main.Widget1
- connect surface.Widget main.Widget2
- # WE NEED A MultipleInputs BOX TO CONNECT BOTH
- # surface.BoxChange AND THE INPUT BoxExecute
- # OF THE COMPLEX BOX TO viewer.BoxExecute
- new MultipleInputs refresh
+connect viewer.Widget main.Widget1
+connect surface.Widget main.Widget2
+connect surface.Out viewer.In1
+connect surface.BoxChange refresh.In1
+connect refresh.Out viewer.BoxExecute
-
- connect surface.Out viewer.In1
- connect surface.BoxChange refresh.In1
- connect refresh.Out viewer.BoxExecute
+# Complex input ports
+input In surface.In " "
+input WinDialog main.WinDialog " "
+input WinTitle main.WinTitle " "
+input WinWidth main.WinWidth " "
+input WinHeight main.WinHeight " "
+input BoxExecute refresh.In2 " "
- set main.Proportion 80
+# Complex output ports
+output Widget main.Widget " "
- input In surface.In "Input image"
- input WinDialog main.WinDialog "Dialog mode"
- input WinTitle main.WinTitle "Title of the window"
- input WinWidth main.WinWidth "Width of the window"
- input WinHeight main.WinHeight "Height of the window"
- input BoxExecute refresh.In2 "Execute the box"
+exec main
- output Widget main.Widget "Widget"
- # EXECUTING THE COMPLEX BOX EXECUTES the main
- exec main
endefine
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:viewer
+DESCRIPTION:Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See <a href='#exampleSimpleSlicer'>exampleSimpleSlicer.bbs</a>. Screenshot : <center><img src='ExampleSimpleSlicer.jpg'></center>
+AUTHOR:info-dev@creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:SimpleSlicer
+PACKAGENAME:wxvtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+Widget
+190.888578:-140.367383:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:13
+COMPLEX_PORT
+In
+176.539300:98.168146:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinDialog
+0.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinTitle
+50.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinWidth
+100.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinHeight
+150.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+BoxExecute
+268.389223:98.168146:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Orientation
+250.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Slice
+384.265292:96.336292:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Interpolate
+204.672902:104.274326:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SliderSize
+400.000000:100.000000:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SliderTitle
+464.654833:98.778764:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SliderOrientation
+413.902854:99.389382:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+SliderReactiveOnTrack
+442.531221:97.557528:-900.000000
+FIN_COMPLEX_PORT
+BOXES:4
+BOX
+wx:LayoutSplit:main
+ISEXEC:TRUE
+189.908352:-94.533066:-900.000000
+228.988352:-104.533066:-900.000000
+PORT
+Proportion:"80"
+FIN_BOX
+BOX
+wxvtk:Viewer2D:viewer2D
+ISEXEC:FALSE
+214.458844:-51.932394:-900.000000
+253.538844:-61.932394:-900.000000
+FIN_BOX
+BOX
+wx:Slider:slider
+ISEXEC:FALSE
+359.090705:25.563987:-900.000000
+410.490705:15.563987:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:refresh
+ISEXEC:FALSE
+239.657507:-22.837623:-900.000000
+280.032507:-32.837623:-900.000000
+FIN_BOX
+CONNECTIONS:19
+CONNECTION
+viewer2D:Widget:main:Widget1
+NumberOfControlPoints:0
+CONNECTION
+slider:Widget:main:Widget2
+NumberOfControlPoints:0
+CONNECTION
+slider:Out:viewer2D:Slice
+NumberOfControlPoints:0
+CONNECTION
+slider:BoxChange:refresh:In1
+NumberOfControlPoints:0
+CONNECTION
+refresh:Out:viewer2D:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+In:In:viewer2D:In
+NumberOfControlPoints:0
+CONNECTION
+WinDialog:WinDialog:main:WinDialog
+NumberOfControlPoints:0
+CONNECTION
+WinTitle:WinTitle:main:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+WinWidth:WinWidth:main:WinWidth
+NumberOfControlPoints:0
+CONNECTION
+WinHeight:WinHeight:main:WinHeight
+NumberOfControlPoints:0
+CONNECTION
+BoxExecute:BoxExecute:refresh:In2
+NumberOfControlPoints:0
+CONNECTION
+Orientation:Orientation:viewer2D:Orientation
+NumberOfControlPoints:0
+CONNECTION
+Slice:Slice:slider:In
+NumberOfControlPoints:0
+CONNECTION
+Interpolate:Interpolate:viewer2D:Interpolate
+NumberOfControlPoints:0
+CONNECTION
+SliderSize:SliderSize:slider:Max
+NumberOfControlPoints:0
+CONNECTION
+SliderTitle:SliderTitle:slider:Title
+NumberOfControlPoints:0
+CONNECTION
+SliderOrientation:SliderOrientation:slider:Orientation
+NumberOfControlPoints:0
+CONNECTION
+SliderReactiveOnTrack:SliderReactiveOnTrack:slider:ReactiveOnTrack
+NumberOfControlPoints:0
+CONNECTION
+main:Widget:Widget:Widget
+NumberOfControlPoints:0
+APP_END
- # ---------------------------------------------------------------------
- #
- # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
- # pour la SantÈ)
- # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
- # Previous Authors : Laurent Guigues, Jean-Pierre Roux
- # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
- #
- # This software is governed by the CeCILL-B license under French law and
- # abiding by the rules of distribution of free software. You can use,
- # modify and/ or redistribute the software under the terms of the CeCILL-B
- # license as circulated by CEA, CNRS and INRIA at the following URL
- # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- # or in the file LICENSE.txt.
- #
- # As a counterpart to the access to the source code and rights to copy,
- # modify and redistribute granted by the license, users are provided only
- # with a limited warranty and the software's author, the holder of the
- # economic rights, and the successive licensors have only limited
- # liability.
- #
- # The fact that you are presently reading this means that you have had
- # knowledge of the CeCILL-B license and that you accept its terms.
- # ------------------------------------------------------------------------ */
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbSimpleSlicer.bbs
+# ----------------------------------
-
-load std
-load wx
-load wxvtk
+include std
+include itkvtk
+include wx
+include wxvtk
+include std
define SimpleSlicer wxvtk
- description "Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See <a href='#exampleSimpleSlicer'>exampleSimpleSlicer.bbs</a>. Screenshot : <center><img src='ExampleSimpleSlicer.jpg'></center>"
- author "info-dev@creatis.insa-lyon.fr"
- category "viewer"
+author "info-dev@creatis.insa-lyon.fr"
+description "Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See <a href='#exampleSimpleSlicer'>exampleSimpleSlicer.bbs</a>. Screenshot : <center><img src='ExampleSimpleSlicer.jpg'></center>"
+
+category "viewer"
+
+new wx:LayoutSplit main
+ set main.Proportion "80"
+
+new wxvtk:Viewer2D viewer2D
+
+new wx:Slider slider
+
+new std:MultipleInputs refresh
- new LayoutSplit main
- set main.Proportion 80
- new Viewer2D viewer2D
- new Slider slider
-
- # WE NEED a MultipleInputs Box to connect BOTH
- # slider.BoxChange AND the input BoxExecute
- # of the Complex box to viewer2D.BoxExecute
-
- new MultipleInputs refresh
- connect viewer2D.Widget main.Widget1
- connect slider.Widget main.Widget2
- connect slider.Out viewer2D.Slice
+connect viewer2D.Widget main.Widget1
+connect slider.Widget main.Widget2
+connect slider.Out viewer2D.Slice
+connect slider.BoxChange refresh.In1
+connect refresh.Out viewer2D.BoxExecute
- connect slider.BoxChange refresh.In1
- connect refresh.Out viewer2D.BoxExecute
+# Complex input ports
+input In viewer2D.In " "
+input WinDialog main.WinDialog " "
+input WinTitle main.WinTitle " "
+input WinWidth main.WinWidth " "
+input WinHeight main.WinHeight " "
+input BoxExecute refresh.In2 " "
+input Orientation viewer2D.Orientation " "
+input Slice slider.In " "
+input Interpolate viewer2D.Interpolate " "
+input SliderSize slider.Max " "
+input SliderTitle slider.Title " "
+input SliderOrientation slider.Orientation " "
+input SliderReactiveOnTrack slider.ReactiveOnTrack " "
- #set main.Proportion 80
+# Complex output ports
+output Widget main.Widget " "
- input In viewer2D.In "Input image"
- input WinDialog main.WinDialog "Execute in dialog mode"
- input WinTitle main.WinTitle "Title of the window"
- input WinWidth main.WinWidth "Width of the window"
- input WinHeight main.WinHeight "Height of the window"
- input BoxExecute refresh.In2 "Execute the box"
- input Orientation viewer2D.Orientation "Slicing orientation : 0:yz / 1:xz / 2:xy"
- input Slice slider.In "Initial slice"
- input Interpolate viewer2D.Interpolate "Pixels Interpolation (true/false)"
- input SliderSize slider.Max "Slider Size"
- input SliderTitle slider.Title "Slider Title"
- input SliderOrientation slider.Orientation "Slider Orientation (H/V)"
- input SliderReactiveOnTrack slider.ReactiveOnTrack "Reactive On track (default : 0)"
-
- output Widget main.Widget "Widget"
+exec main
- # EXECUTING THE COMPLEX BOX EXECUTES main
- exec main
-
endefine
#include <vtkInteractorStyleImage.h>
#include <vtkCommand.h>
#include <vtkImageActor.h>
+#include <wx/gdicmn.h>
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ #include "wxvtkImageViewer2.h"
+#else
+ #include <vtkImageViewer2.h>
+#endif
+
+
+#include "wxVTKRenderWindowInteractor.h"
+
namespace bbwxvtk
{
//--------------------------------------------------------------------------
Viewer2DWidget(Viewer2D* box, wxWindow *parent);
~Viewer2DWidget();
void UpdateView();
- vtkRenderer *GetRenderer();
- vtkImageActor *GetImageActor();
+ vtkRenderer *GetRenderer();
+ vtkImageActor *GetImageActor();
private:
- bool mFirstTime;
- Viewer2D *mBox;
- wxvtkImageViewer2 *imageViewer;
- vtkImageData *backImageData;
- vtkImageData *mDefaultImage;
+ bool mFirstTime;
+ Viewer2D *mBox;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ wxvtkImageViewer2 *imageViewer;
+#else
+ vtkImageViewer2 *imageViewer;
+#endif
+
+ vtkImageData *backImageData;
+ vtkImageData *mDefaultImage;
wxVTKRenderWindowInteractor *wxvtkrenderwindowinteractor;
bool mUpdateCamera;
vtkImplicitPlaneWidget * maPlane1, * maPlane2, * mbPlane1, * mbPlane2;
};
- Viewer2DWidget::Viewer2DWidget(Viewer2D* box,
- wxWindow *parent)
+ Viewer2DWidget::Viewer2DWidget(Viewer2D* box, wxWindow *parent)
:
wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL),
mFirstTime(true),
wxvtkrenderwindowinteractor = new wxVTKRenderWindowInteractor(panel,-1);
wxvtkrenderwindowinteractor->UseCaptureMouseOn();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageViewer = wxvtkImageViewer2::New();
+#else
+ imageViewer = vtkImageViewer2::New();
+#endif
+
imageViewer->SetSlice( 1 );
imageViewer->SetupInteractor ( wxvtkrenderwindowinteractor );
mDefaultImage->SetDimensions ( dim );
mDefaultImage->SetSpacing(1,1,1);
mDefaultImage->SetExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
- mDefaultImage->SetWholeExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ mDefaultImage->SetWholeExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
mDefaultImage->SetScalarTypeToUnsignedChar();
- mDefaultImage->AllocateScalars();
- for (int i=0;i<dim[0];i++)
- for (int j=0;j<dim[1];j++)
- for (int k=0;k<dim[2];k++)
- mDefaultImage->SetScalarComponentFromFloat(i,j,k,0,0);
-
- for (int i=0;i<dim[0];i++)
- {
- /*
- mDefaultImage->SetScalarComponentFromFloat(i,0,0,0,255);
- mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,0,0,255);
- mDefaultImage->SetScalarComponentFromFloat(0,i,0,0,255);
- mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,0,0,255);
- mDefaultImage->SetScalarComponentFromFloat(i,0,1,0,255);
- mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,1,0,255);
- mDefaultImage->SetScalarComponentFromFloat(0,i,1,0,255);
- mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,1,0,255);
- */
- mDefaultImage->SetScalarComponentFromFloat(i,i,0,0,255);
- mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,0,0,255);
- mDefaultImage->SetScalarComponentFromFloat(i,i,1,0,255);
- mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,1,0,255);
- }
+ mDefaultImage->AllocateScalars();
+#else
+ mDefaultImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
+ int i,j,k;
+ for (i=0;i<dim[0];i++)
+ {
+ for (j=0;j<dim[1];j++)
+ {
+ for (k=0;k<dim[2];k++)
+ {
+ mDefaultImage->SetScalarComponentFromFloat(i,j,k,0,0);
+ } // for k
+ }// for j
+ } // for i
+
+ for (i=0;i<dim[0];i++)
+ {
+ /*
+ mDefaultImage->SetScalarComponentFromFloat(i,0,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(0,i,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,0,1,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,1,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(0,i,1,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,1,0,255);
+ */
+ mDefaultImage->SetScalarComponentFromFloat(i,i,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,i,1,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,1,0,255);
+ } // for i
+ mDefaultImage->Modified();
backImageData = mDefaultImage;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageViewer->SetInput( backImageData );
- mUpdateCamera = true;
+#else
+ imageViewer->SetInputData( backImageData );
+#endif
+ mUpdateCamera = true;
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
sizer->Add( wxvtkrenderwindowinteractor, 1, wxEXPAND, 0);
panel->SetSizer(sizer);
panel->SetAutoLayout(true);
panel->Layout();
-
-
// wxvtkrenderwindowinteractor->Refresh();
// wxvtkrenderwindowinteractor->Render();
// imageViewer->GetRenderer()->ResetCameraClippingRange();
-
imageViewer->GetRenderer()->SetBackground(0.1,0.1,0.2);
-
}
//-------------------------------------------------------------------------
mDefaultImage->Delete();
if (backImageData)
- {
- // backImageData->UnRegister(NULL);
- }
+ {
+// backImageData->UnRegister(NULL);
+ }
if (imageViewer)
- {
- imageViewer->Delete();
- }
+ {
+ imageViewer->Delete();
+ }
delete wxvtkrenderwindowinteractor;
// std::cout << "Viewer2DWidget::~Viewer2DWidget() OK" << std::endl;
}
//-------------------------------------------------------------------------
-
-
void Viewer2DWidget::UpdateView()
{
// std::cout << "Viewer2DWidget::UpdateView() " << std::endl;
// std::cout << "slice="<<mBox->bbGetInputSlice()<<std::endl;
mUpdateCamera = false; //JPR
- if ( ( mBox->bbGetInputIn() == NULL ) &&
- ( backImageData != mDefaultImage ) )
- {
- //
- // std::cout << "** Viewer2DWidget::UpdateView() : NULL Input (reset)" <<std::endl;
- backImageData = mDefaultImage;
- mUpdateCamera = true;
- }
- else if ( ( mBox->bbGetInputIn() != NULL ) &&
+ if ( ( mBox->bbGetInputIn() == NULL ) && ( backImageData != mDefaultImage ) )
+ {
+ //
+ // std::cout << "** Viewer2DWidget::UpdateView() : NULL Input (reset)" <<std::endl;
+ backImageData = mDefaultImage;
+ mUpdateCamera = true;
+ } else if ( ( mBox->bbGetInputIn() != NULL ) &&
(( mBox->bbGetInputStatus("In") != bbtk::UPTODATE ) ||
( mFirstTime))
)
//(backImageData != mBox->bbGetInputIn()) )
- {
- // std::cout << "** Viewer2DWidget::UpdateView() : Input changed" <<std::endl;
- mFirstTime = false;
- if (backImageData != mBox->bbGetInputIn()) // Don't update if just Slice changed
- {
- backImageData = mBox->bbGetInputIn();
- backImageData->Update();
- imageViewer->SetInput( backImageData );
- mUpdateCamera = true;
- }
- }
+ {
+ // std::cout << "** Viewer2DWidget::UpdateView() : Input changed" <<std::endl;
+ mFirstTime = false;
+ if (backImageData != mBox->bbGetInputIn()) // Don't update if just Slice changed
+ {
+ backImageData = mBox->bbGetInputIn();
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ backImageData->Update();
+ imageViewer->SetInput( backImageData );
+ #else
+ imageViewer->SetInputData( backImageData );
+ #endif
+ mUpdateCamera = true;
+ } // if BackImageData
+ } // if BoxInputIn
if (mUpdateCamera)
- {
- // std::cout << "** Viewer2DWidget::UpdateView() : Update Camera"
- // <<std::endl;
- int x1,x2,y1,y2,z1,z2;
- double spx,spy,spz;
- backImageData->GetSpacing(spx,spy,spz);
- backImageData->GetExtent (x1,x2,y1,y2,z1,z2);
+ {
+ // std::cout << "** Viewer2DWidget::UpdateView() : Update Camera"
+ // <<std::endl;
+ int x1,x2,y1,y2,z1,z2;
+ double spx,spy,spz;
+ backImageData->GetSpacing(spx,spy,spz);
+ backImageData->GetExtent (x1,x2,y1,y2,z1,z2);
- double *range = backImageData->GetScalarRange();
- imageViewer->SetColorWindow(range[1] - range[0]);
- imageViewer->SetColorLevel(0.5 * (range[1] + range[0]));
-
- imageViewer->GetRenderer()->ResetCamera();
- double bounds[6];
- imageViewer->GetRenderer()->ComputeVisiblePropBounds(bounds);
- imageViewer->GetRenderer()->ResetCameraClippingRange(bounds);
+ double *range = backImageData->GetScalarRange();
+ imageViewer->SetColorWindow(range[1] - range[0]);
+ imageViewer->SetColorLevel(0.5 * (range[1] + range[0]));
+
+ imageViewer->GetRenderer()->ResetCamera();
+ double bounds[6];
+ imageViewer->GetRenderer()->ComputeVisiblePropBounds(bounds);
+ imageViewer->GetRenderer()->ResetCameraClippingRange(bounds);
- // bbtkMessage("Output",2,"Viewer2D '"<<mBox->bbGetName()<<"' - Image :"<<std::endl);
- // std::cout << " extent = "<< x1<<"-"<<x2<<" x "<<y1<<"-"<<y2<<" x "<<z1<<"-"<<z2<<std::endl;
- // std::cout << " spacing = "<<spx << " - "<< spy << " - "<<spz<<std::endl;
- /*
- vtkCamera *camera = imageViewer->GetRenderer()->GetActiveCamera();
-
- camera->SetViewUp ( spx*0, -spy*1, spz*0 );
- camera->SetPosition ( spx*(x1+x2)/2, spy*(y1+y2)/2, -spz*10000000 );
- camera->SetFocalPoint( spx*(x1+x2)/2, spy*(y1+y2)/2, spz*0 );
-
- camera->ComputeViewPlaneNormal();
- camera->SetParallelScale( spx*(x2-x1)/2.0 );
- //
- // imageViewer->GetRenderer()->ResetCamera(x1,x2,y1,y2,z1,z2);
- mUpdateCamera = false;
- // std::cout << "Viewer2DWidget::UpdateView() passe par 3" << std::endl;
- imageViewer->SetColorWindow(512);
- imageViewer->SetColorLevel(256);
- */
- /*
- for (int i=0;i<10;i++)
- for (int j=0;j<10;j++)
- std::cout << mBox->bbGetInputIn()->GetScalarComponentAsFloat(i,j,0,0)
- << std::endl;
- */
+ // bbtkMessage("Output",2,"Viewer2D '"<<mBox->bbGetName()<<"' - Image :"<<std::endl);
+ // std::cout << " extent = "<< x1<<"-"<<x2<<" x "<<y1<<"-"<<y2<<" x "<<z1<<"-"<<z2<<std::endl;
+ // std::cout << " spacing = "<<spx << " - "<< spy << " - "<<spz<<std::endl;
+ /*
+ vtkCamera *camera = imageViewer->GetRenderer()->GetActiveCamera();
+
+ camera->SetViewUp ( spx*0, -spy*1, spz*0 );
+ camera->SetPosition ( spx*(x1+x2)/2, spy*(y1+y2)/2, -spz*10000000 );
+ camera->SetFocalPoint( spx*(x1+x2)/2, spy*(y1+y2)/2, spz*0 );
+
+ camera->ComputeViewPlaneNormal();
+ camera->SetParallelScale( spx*(x2-x1)/2.0 );
+ //
+ // imageViewer->GetRenderer()->ResetCamera(x1,x2,y1,y2,z1,z2);
+ mUpdateCamera = false;
+ // std::cout << "Viewer2DWidget::UpdateView() passe par 3" << std::endl;
+ imageViewer->SetColorWindow(512);
+ imageViewer->SetColorLevel(256);
+ */
+ /*
+ for (int i=0;i<10;i++)
+ for (int j=0;j<10;j++)
+ std::cout << mBox->bbGetInputIn()->GetScalarComponentAsFloat(i,j,0,0)
+ << std::endl;
+ */
}
// std::cout << "OW = "<< mBox->bbGetWindow() << std::endl;
bool interp = mBox->bbGetInputInterpolate();
if ( interp )
+ {
imageViewer->GetImageActor()->InterpolateOn();
- else
+ } else {
imageViewer->GetImageActor()->InterpolateOff();
-
+ }
int orientation = mBox->bbGetInputOrientation();
- if (orientation<0 || orientation>2) {
+ if (orientation<0 || orientation>2)
+ {
bbtkMessage("Output", 2, "Viewer2D : Orientation was not 0< <2 "<<std::endl);
orientation=2; // Why not?
}
// mBox->bbIsShown() is necessary to be sure that the wxWindow is already
// created and displayed.
// Else when slice != 0 we get an X Window System error with wxGTK
- if (
- (backImageData!=NULL)&&
- (mBox->bbIsShown()))
+ if ( (backImageData!=NULL) && (mBox->bbIsShown()) )
{
int z = mBox->bbGetInputSlice();
int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
backImageData->GetWholeExtent(ext);
+#else
+ backImageData->GetExtent(ext);
+#endif
+
/*
std::cout << "ext = "<<ext[0]<<" - "<<ext[1]<<" ; "
<<ext[2]<<" - "<<ext[3]<<" ; "
bbtkMessage("Output", 2, "Viewer2D : Orientation was not 0< <2 (shouldn't arrive here!"<<std::endl);
z = ext[5]; // Why not?
}
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
wxvtkrenderwindowinteractor->Refresh();
+#else
+ //wxRect *rect=new wxRect(0, 0, 50, 50);
+ //wxvtkrenderwindowinteractor->Refresh(true, rect);
+ // ..
+#endif
+
wxvtkrenderwindowinteractor->Render();
bbtkDebugMessage("Output",3,"Viewer2D : slice = "<<z<<std::endl);
imageViewer->SetSliceOrientation (orientation);
imageViewer->SetSlice( z );
-
- }
- }
+ } // if backImageData
- vtkRenderer * Viewer2DWidget::GetRenderer()
- {
- return imageViewer->GetRenderer();
- }
-
+}
+ //--------------------------------------------------------------------------
+vtkRenderer * Viewer2DWidget::GetRenderer()
+{
+ return imageViewer->GetRenderer();
+}
//--------------------------------------------------------------------------
//-------------------------------------------------------------------------
// std::cout << "Slice="<<bbtk::GetIOStatusString(bbGetInputStatus("Slice")) << std::endl;
Viewer2DWidget* w = (Viewer2DWidget*)bbGetOutputWidget();
if (w)
- {
- w->UpdateView();
- }
+ {
+ w->UpdateView();
+ }
bbSetOutputOut( bbGetInputSlice() );
}
#define __bbwxvtkViewer2D_h__
#include "vtkImageData.h"
-#include "wxvtkImageViewer2.h"
#include "vtkImplicitPlaneWidget.h"
#include "bbtkWxBlackBox.h"
-#include "wxVTKRenderWindowInteractor.h"
namespace bbwxvtk
{
EVT_SIZE (wxVTKRenderWindowInteractor::OnSize)
END_EVENT_TABLE()
-vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+#else
+ //...
+#endif
+
vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
//---------------------------------------------------------------------------
#ifdef VTK_DEBUG_LEAKS
vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
#endif
+
this->RenderWindow = NULL;
this->SetRenderWindow(vtkRenderWindow::New());
this->RenderWindow->Delete();
+ this->SetBackgroundStyle( wxBG_STYLE_COLOUR );
+ this->SetBackgroundColour( wxColor(0,0,0,0) );
}
//---------------------------------------------------------------------------
wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent,
// so we update the size information of the interactor/renderwindow here
this->UpdateSize(size.x, size.y);
#endif
+ this->SetBackgroundStyle( wxBG_STYLE_COLOUR );
+ this->SetBackgroundColour( wxColor(0,0,0,0) );
}
//---------------------------------------------------------------------------
wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor()
Size[1] = y;
// and our RenderWindow's size
RenderWindow->SetSize(x, y);
- }
- }
+ } // if x y
+ } // if RenderWindow
}
//---------------------------------------------------------------------------
int wxVTKRenderWindowInteractor::CreateTimer(int WXUNUSED(timertype))
{
// it's a one shot timer
if (!timer.Start(10, TRUE))
- assert(false);
+ {
+ assert(false);
+ }
return 1;
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
{
- if (!Enabled)
- return;
-
+ if (!Enabled)
+ {
+ return;
+ }
+
#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::TimerEvent, NULL);
rwin->UpdateGLRegion();
}
#endif
+
}
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
{
- if (!Enabled)
+ this->Render();
+
+ if (!Enabled)
{
- return;
+ return;
}
#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
- SetEventInformationFlipY(event.GetX(), event.GetY(),
- event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
+ SetEventInformationFlipY(event.GetX(), event.GetY(), event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
InvokeEvent(vtkCommand::MouseMoveEvent, NULL);
#else
- InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(),
- event.GetX(), Size[1] - event.GetY() - 1);
+ InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(), event.GetX(), Size[1] - event.GetY() - 1);
#endif
}
//---------------------------------------------------------------------------
#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
- SetEventInformationFlipY(event.GetX(), event.GetY(),
- event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
-
+ SetEventInformationFlipY(event.GetX(), event.GetY(), event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
InvokeEvent(vtkCommand::EnterEvent, NULL);
#else
// old style
- InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(),
- event.GetX(), Size[1] - event.GetY() - 1);
+ InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(), event.GetX(), Size[1] - event.GetY() - 1);
#endif
}
//---------------------------------------------------------------------------
const wxSize &size = wxDefaultSize,
long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
const wxString &name = wxPanelNameStr);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+#else
+ vtkTypeMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+#endif
+
static wxVTKRenderWindowInteractor * New();
void PrintSelf(ostream& os, vtkIndent indent);
void Disable();
void Start();
void UpdateSize(int x, int y);
- int CreateTimer(int timertype);
- int DestroyTimer();
+ int CreateTimer(int timertype);
+ int DestroyTimer();
void TerminateApp() {};
// event handlers
vtkBooleanMacro(UseCaptureMouse,int);
protected:
- wxTimer timer;
- int ActiveButton;
- int RenderAllowed;
- long GetHandleHack();
- int Stereo;
+ wxTimer timer;
+ int ActiveButton;
+ int RenderAllowed;
+ long GetHandleHack();
+ int Stereo;
private:
- long Handle;
- bool Created;
- int RenderWhenDisabled;
- int UseCaptureMouse;
+ long Handle;
+ bool Created;
+ int RenderWhenDisabled;
+ int UseCaptureMouse;
DECLARE_EVENT_TABLE()
};
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkCxxRevisionMacro(wxvtkImageViewer2, "$Revision: 1.8 $");
+#else
+ //...
+#endif
+
vtkStandardNewMacro(wxvtkImageViewer2);
//----------------------------------------------------------------------------
vtkImageData *input = this->GetInput();
if (input)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
input->UpdateInformation();
int *w_ext = input->GetWholeExtent();
+#else
+ int *w_ext = input->GetExtent();
+#endif
+
min = w_ext[this->SliceOrientation * 2];
max = w_ext[this->SliceOrientation * 2 + 1];
}
vtkImageData *input = this->GetInput();
if (input)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
input->UpdateInformation();
+printf("EED Warning wxvtkImageViewer2::GetSliceRange GetWholeExtent()[2] ??? /n");
return input->GetWholeExtent() + this->SliceOrientation * 2;
+#else
+printf("EED Warning wxvtkImageViewer2::GetSliceRange GetExtent()[2] ??? /n");
+ return input->GetExtent() + this->SliceOrientation * 2;
+#endif
}
return NULL;
}
cam->SetFocalPoint(0,0,0);
break;
}
-
+
/*
switch (this->SliceOrientation)
{
}
// std::cout << "--- wxvtkImageViewer2::UpdateDisplayExtent()"<<std::endl;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
input->UpdateInformation();
int *w_ext = input->GetWholeExtent();
+#else
+ int *w_ext = input->GetExtent();
+#endif
// std::cout << "ext = "
// <<w_ext[0]<<" - "<<w_ext[1]<<" ; "
this->InteractorStyle->GetAutoAdjustCameraClippingRange())
{
this->Renderer->ResetCameraClippingRange();
- }
- else
- {
+ } else {
vtkCamera *cam = this->Renderer->GetActiveCamera();
if (cam)
{
spacing[2]; // JPR??
cam->SetClippingRange(
range - avg_spacing * 3.0, range + avg_spacing * 3.0);
- }
- }
- }
+ } // if cam
+ } // if InteractorStyle
+ } // if Renderer
}
//----------------------------------------------------------------------------
if (event == vtkCommand::ResetWindowLevelEvent)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->IV->GetInput()->UpdateInformation();
this->IV->GetInput()->SetUpdateExtent
(this->IV->GetInput()->GetWholeExtent());
this->IV->GetInput()->Update();
+#else
+ //...
+#endif
+
double *range = this->IV->GetInput()->GetScalarRange();
this->IV->SetColorWindow(range[1] - range[0]);
this->IV->SetColorLevel(0.5 * (range[1] + range[0]));
if (this->ImageActor && this->WindowLevel)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->ImageActor->SetInput(this->WindowLevel->GetOutput());
+#else
+ this->WindowLevel->Update();
+ this->ImageActor->SetInputData(this->WindowLevel->GetOutput());
+#endif
}
}
{
if (this->ImageActor)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->ImageActor->SetInput(NULL);
+#else
+ this->ImageActor->SetInputData(NULL);
+#endif
}
if (this->Renderer && this->ImageActor)
input)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
input->UpdateInformation();
int *w_ext = input->GetWholeExtent();
+#else
+ int *w_ext = input->GetExtent();
+#endif
+
int xs = 0, ys = 0;
// std::cout << "wxvtkImageViewer2::Render ext = "
void wxvtkImageViewer2::SetInput(vtkImageData *in)
{
// std::cout << "### wxvtkImageViewer2::SetInput"<<std::endl;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
this->WindowLevel->SetInput(in);
+#else
+ this->WindowLevel->SetInputData(in);
+#endif
+
this->UpdateDisplayExtent();
// LG 03/12/08
// FirstRender = 1;
{
public:
static wxvtkImageViewer2 *New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkTypeRevisionMacro(wxvtkImageViewer2,vtkObject);
+#else
+ vtkTypeMacro(wxvtkImageViewer2,vtkObject);
+#endif
+
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
virtual int GetSliceMin();
virtual int GetSliceMax();
virtual void GetSliceRange(int range[2])
- { this->GetSliceRange(range[0], range[1]); }
+ {
+ this->GetSliceRange(range[0], range[1]);
+ }
virtual void GetSliceRange(int &min, int &max);
virtual int* GetSliceRange();
// Set/Get the position in screen coordinates of the rendering window.
virtual int* GetPosition();
virtual void SetPosition(int a,int b);
- virtual void SetPosition(int a[2]) { this->SetPosition(a[0],a[1]); }
+ virtual void SetPosition(int a[2])
+ {
+ this->SetPosition(a[0],a[1]);
+ }
// Description:
// Set/Get the size of the window in screen coordinates in pixels.