std::string mTemplateImplementation;
std::vector<std::string> mInclude;
+ std::string mVerbosePreprocessor;
std::vector<std::string> mTypedef;
std::string mUserSetDefaultValues;
mAuthor += val;
}
+ // Verbose preprocessor
+ for (i=0,j=0; i<BB.nChildNode("verbosePreprocessor"); i++)
+ {
+ std::string val;
+ bbtk::GetTextOrClear(BB.getChildNode("verbosePreprocessor",&j),val);
+ mVerbosePreprocessor += val + "\n";
+ }
+
// Description
for (i=0,j=0; i<BB.nChildNode("description"); i++)
{
mFile << "#ifndef " << included <<"\n";
mFile << "#define " << included <<"\n";
+ // Verbose preprocessor
+ mFile << mVerbosePreprocessor << "\n";
+
// Includes
mFile << "#include \"bb" << mPackage << "_EXPORT.h\"\n";
std::vector<std::string>::iterator i;
ADD_CUSTOM_COMMAND(
OUTPUT ${BBFY_CXX_OUT}
COMMAND
- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
+ ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
DEPENDS ${xmlfile}
${BBTK_BBFY_DEPENDENCY}
)
#include directives to be put in the .h generated
There must be one tag per file to include
Here we include the standard header iostream.h -->
- <include><PRE>itkDICOMSeriesFileNames.h</PRE></include>
+ <!-- <include><PRE>itkDICOMSeriesFileNames.h</PRE></include>-->
<!--=====================================================================-->
+ <verbosePreprocessor><PRE>
+#include <itkConfigure.h>
+#if ITK_VERSION_MAJOR < 4
+# include <itkDICOMSeriesFileNames.h>
+#else
+# include <itkGDCMSeriesFileNames.h>
+#endif
+ </PRE></verbosePreprocessor>
<!--========================================================================
INPUTS/OUTPUTS DECLARATION -->
<!--========================================================================
THE PROCESSING METHOD BODY -->
<process><PRE>
+#if ITK_VERSION_MAJOR < 4
itk::DICOMSeriesFileNames::Pointer names =
itk::DICOMSeriesFileNames::New();
names->SetDirectory(bbGetInputIn());
bbSetOutputOut( names->GetFileNames() );
+#else
+ itk::GDCMSeriesFileNames::Pointer names =
+ itk::GDCMSeriesFileNames::New();
+ names->SetDirectory(bbGetInputIn());
+ bbSetOutputOut(
+ names->GetFileNames( names->GetSeriesUIDs().begin()->c_str() )
+ );
+#endif
</PRE></process>
<!--=====================================================================-->
#include "bbitkvtkPackage.h"
#include "itkImageToVTKImageFilter.h"
+// -------------------------------------------------------------------------
+// LFV: avoid itk::Concept check on 4d or superior images
+#define BBITKVTK_itkImage2vtkImageData_Template( t, ty, di ) \
+ if( t == typeid( itk::Image< ty, di > ) ) \
+ this->Convert< itk::Image< ty, di > >( )
+// -------------------------------------------------------------------------
namespace bbitkvtk
{
void itkImage2vtkImageData::Convert()
{
bbtk::TypeInfo t = bbGetInputIn().type();
- BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);
+
+ // Only supports images in 1, 2 or 3 dimensions
+ BBITKVTK_itkImage2vtkImageData_Template( t, char, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, short, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, int, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, long, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, float, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, double, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned char, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned short, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned int, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned long, 1 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, char, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, short, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, int, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, long, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, float, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, double, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned char, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned short, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned int, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned long, 2 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, char, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, short, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, int, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, long, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, float, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, double, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned char, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned short, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned int, 3 );
+ else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned long, 3 );
+
+ /* Deprecated
+ BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);
+ */
}
template<class T>
#include "bbitkvtkPackage.h"
#include "itkImageToVTKImageFilter.h"
+// -------------------------------------------------------------------------
+// LFV: avoid itk::Concept check on 4d or superior images
+#define BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, ty, di ) \
+ if( t == typeid( itk::Image< ty, di > ) ) \
+ this->Convert< itk::Image< ty, di > >( )
+// -------------------------------------------------------------------------
namespace bbitkvtk
{
{
// suppose *all* the images have the same type // JPR
bbtk::TypeInfo t = bbGetInputIn()[0].type();
- BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);
+
+ // Only supports images in 1, 2 or 3 dimensions
+ BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, char, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, short, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, int, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, long, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, float, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, double, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned char, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned short, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned int, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned long, 1 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, char, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, short, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, int, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, long, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, float, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, double, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned char, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned short, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned int, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned long, 2 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, char, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, short, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, int, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, long, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, float, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, double, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned char, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned short, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned int, 3 );
+ else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned long, 3 );
+
+ /* Deprecated
+ BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);
+ */
}
template<class T>