#include <iostream>
#include <algorithm>
-#include <cctype>
#include <cstring>
#include <map>
#include <vector>
#include <sstream>
+#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
+# define cpPlugins_STRTOK( A, B, N ) strtok_s( A, B, N )
+#else // defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
+# define cpPlugins_STRTOK( A, B, N ) std::strtok( A, B )
+#endif // defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
+
// -------------------------------------------------------------------------
typedef std::vector< std::string > TLines;
typedef std::map< char, TLines > TParsedLines;
typedef std::map< std::string, TLines > TVariables;
// -------------------------------------------------------------------------
+bool cpPlugins_ISBLANK( const char& value );
TLines Tokenize( const std::string& str, const std::string& delims );
std::string Replace(
const std::string& str, const std::string& sub, const std::string& nsub
return( 0 );
}
+// -------------------------------------------------------------------------
+bool cpPlugins_ISBLANK( const char& value )
+{
+ return( value == ' ' || value == '\t' || value == '\n' || value == '\r' );
+}
+
// -------------------------------------------------------------------------
TLines Tokenize( const std::string& str, const std::string& delims )
{
TLines tokens;
if( str.size( ) > 0 )
{
- char* buffer = new char[ str.size( ) + 1 ];
- std::strcpy( buffer, str.c_str( ) );
- buffer[ str.size( ) ] = '\0';
- char* it = std::strtok( buffer, delims.c_str( ) );
+ auto ssize = str.size( );
+ char* buffer = new char[ ssize + 1 ];
+ for( unsigned long i = 0; i < ssize; ++i )
+ buffer[ i ] = str[ i ];
+ buffer[ ssize ] = '\0';
+ char* next;
+ char* it = cpPlugins_STRTOK( buffer, delims.c_str( ), &next );
while( it != NULL )
{
tokens.push_back( std::string( it ) );
- it = std::strtok( NULL, delims.c_str( ) );
+ it = cpPlugins_STRTOK( NULL, delims.c_str( ), &next );
} // elihw
delete buffer;
return( false );
std::string buffer;
file_stream.seekg( 0, std::ios::end );
- buffer.reserve( file_stream.tellg( ) );
+ buffer.reserve( ( unsigned int )( file_stream.tellg( ) ) );
file_stream.seekg( 0, std::ios::beg );
buffer.assign(
( std::istreambuf_iterator< char >( file_stream ) ),
auto lIt = line.begin( );
while( lIt != line.end( ) )
{
- if( !std::isblank( *lIt ) )
+ if( !cpPlugins_ISBLANK( *lIt ) )
{
if( cmd_pos == line.end( ) )
{
return;
std::string buf;
file_stream.seekg( 0, std::ios::end );
- buf.reserve( file_stream.tellg( ) );
+ buf.reserve( ( unsigned int )( file_stream.tellg( ) ) );
file_stream.seekg( 0, std::ios::beg );
buf.assign(
( std::istreambuf_iterator< char >( file_stream ) ),
#include <itkImageRegion.h>
#include <itkFixedArray.h>
#include <itkPoint.h>
+#include <itkVariableLengthVector.h>
#include <itkVector.h>
#include <itkImageRegion.hxx>
#include <itkFixedArray.hxx>
#include <itkPoint.hxx>
+#include <itkVariableLengthVector.hxx>
#include <itkVector.hxx>
// -------------------------------------------------------------------------
cpPlugins_Base_extra_Array_AllScalars_AllDims( itk::Point );
cpPlugins_Base_extra_Array_AllScalars_AllDims( itk::Vector );
+#define cpPlugins_Base_extra_VariableLengthVector_SetSize( T, P ) \
+ template cpPlugins_Base_EXPORT void itk::VariableLengthVector< T >:: \
+ SetSize< itk::VariableLengthVector< T >::P, \
+ itk::VariableLengthVector< T >::KeepOldValues >( \
+ unsigned int, itk::VariableLengthVector< T >::P, \
+ itk::VariableLengthVector< float >::KeepOldValues \
+ )
+
+cpPlugins_Base_extra_VariableLengthVector_SetSize( float, AlwaysReallocate );
+cpPlugins_Base_extra_VariableLengthVector_SetSize( float, ShrinkToFit );
+
// eof - $RCSfile$
ENDFOREACH(i)
## Target links
-TARGET_LINK_LIBRARIES(cpPlugins_Base ${ITK_LIBRARIES} ${VTK_LIBRARIES})
-TARGET_LINK_LIBRARIES(cpPlugins_Image cpPlugins_Base)
-TARGET_LINK_LIBRARIES(cpPlugins_Mesh cpPlugins_Base)
+TARGET_LINK_LIBRARIES(cpPlugins_Base ${ITK_LIBRARIES})
+TARGET_LINK_LIBRARIES(cpPlugins_Transforms ${ITK_LIBRARIES} cpPlugins_Base)
TARGET_LINK_LIBRARIES(cpPlugins_Paths cpPlugins_Base)
-TARGET_LINK_LIBRARIES(cpPlugins_Transforms cpPlugins_Base)
-TARGET_LINK_LIBRARIES(cpPlugins_ImageIterators cpPlugins_Image)
+TARGET_LINK_LIBRARIES(cpPlugins_Mesh cpPlugins_Base)
+TARGET_LINK_LIBRARIES(cpPlugins_Image cpPlugins_Base)
+TARGET_LINK_LIBRARIES(cpPlugins_ImageIterators ${ITK_LIBRARIES} cpPlugins_Image)
TARGET_LINK_LIBRARIES(cpPlugins_ImageFiltersBase cpPlugins_Image)
TARGET_LINK_LIBRARIES(cpPlugins_InPlaceImageFiltersBase cpPlugins_ImageFiltersBase)
+TARGET_LINK_LIBRARIES(cpPlugins_ImageITK2VTK cpPlugins_ImageFiltersBase ${VTK_LIBRARIES})
TARGET_LINK_LIBRARIES(cpPlugins_ThresholdFilters cpPlugins_InPlaceImageFiltersBase cpPlugins_ImageIterators)
TARGET_LINK_LIBRARIES(cpPlugins_DistanceMapFilters cpPlugins_ThresholdFilters)
-TARGET_LINK_LIBRARIES(cpPlugins_ImageIO cpPlugins_ImageFiltersBase cpPlugins_ImageIterators)
-TARGET_LINK_LIBRARIES(cpPlugins_ImageITK2VTK cpPlugins_ImageFiltersBase)
TARGET_LINK_LIBRARIES(cpPlugins_ResamplingFilters cpPlugins_ImageFiltersBase cpPlugins_ImageIterators cpPlugins_Transforms)
TARGET_LINK_LIBRARIES(cpPlugins_GaussianImageFilters cpPlugins_ImageFiltersBase cpPlugins_ImageIterators)
-
-#TARGET_LINK_LIBRARIES(cpPlugins_Transforms
-# cpPlugins_Base
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_Image
-# cpPlugins_Base
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_Mesh
-# cpPlugins_Base
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_ImageFiltersBase
-# cpPlugins_Image
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_ImageITK2VTK
-# cpPlugins_ImageFiltersBase
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_ImageIterators
-# cpPlugins_Image
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_ImageIO
-# cpPlugins_ImageFiltersBase
-# cpPlugins_ImageIterators
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_ThresholdFilters
-# cpPlugins_ImageFiltersBase
-# cpPlugins_ImageIterators
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_DistanceMapFilters
-# cpPlugins_ThresholdFilters
-# )
-# TARGET_LINK_LIBRARIES(
-# cpPlugins_ResamplingFilters
-# cpPlugins_Transforms
-# cpPlugins_ImageFiltersBase
-# cpPlugins_ImageIterators
-# )
-
-# # ===================================
-# # = Integrate all source file names =
-# # ===================================
-
-# SET(
-# lib_HEADERS
-# ${lib_HEADERS_H}
-# ${lib_HEADERS_HPP}
-# ${lib_HEADERS_HXX}
-# )
-
-# SET(
-# lib_SOURCES
-# ${lib_SOURCES_C}
-# ${lib_SOURCES_CPP}
-# ${lib_SOURCES_CXX}
-# )
-
-# ## =====================
-# ## = Compilation rules =
-# ## =====================
-
-# ## ========================
-# ## == Installation rules ==
-# ## ========================
+TARGET_LINK_LIBRARIES(cpPlugins_ImageIO cpPlugins_ImageFiltersBase cpPlugins_ImageIterators)
# INSTALL(
# TARGETS ${l_NAME}
d #array_pixels=#lin_alg_vectors;itk::SymmetricSecondRankTensor
d #double_array_pixels=itk::Matrix
+c itk::ImageRegion< #dims >
+c itk::ImageBase< #dims >
+
c itk::ImportImageContainer< unsigned long, #pixels >
c itk::ImportImageContainer< unsigned long, #array_pixels< #float, #dims > >
c itk::ImportImageContainer< unsigned long, #double_array_pixels< #float, #dims, #dims > >
d #lin_alg_vectors=itk::CovariantVector;itk::Point;itk::Vector
d #pixels=#scalar;#color_pixels;#complex_pixels
d #array_pixels=#lin_alg_vectors;itk::SymmetricSecondRankTensor
-d #double_array_pixels=itk::Matrix
d #filters=itk::ImageToVTKImageFilter;itk::VTKImageToImageFilter
c #filters< itk::Image< #pixels, #dims > >
c #filters< itk::Image< #array_pixels< #float, #dims >, #dims > >
-c #filters< itk::Image< #double_array_pixels< #float, #dims, #dims >, #dims > >
t itkMapContainer.h
t itkVectorContainer.h
+c itk::VectorContainer< unsigned long, itk::CellInterface< #float, itk::CellTraitsInfo< #dims, float, float, unsigned long, unsigned long, unsigned long, itk::Point< float, #dims >, itk::VectorContainer< unsigned long, itk::Point< float, #dims > >, std::set< unsigned long > > >* >
c @{itk::PointSet;itk::Mesh}< #float, #dims >