SET(prj_NAME_LIB_PREFIX "")
SET(prj_NAME_LIB_EXT ".dll")
SET(prj_NAME_ENV_SEPARATOR ";")
- SET(prj_NAME_PATH_SEPARATOR "\\")
+ SET(prj_NAME_PATH_SEPARATOR "\\\\")
ENDIF("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
## eof - $RCSfile$
TARGET_LINK_LIBRARIES(cpPlugins_QCustomPlot ${QT_LIBRARIES})
ENDIF(Qt4_FOUND)
LibFromDir(cpExtensions SHARED ${_dir}/cpExtensions ${_ver})
-TARGET_LINK_LIBRARIES(cpExtensions ${ITK_LIBRARIES} ${VTK_LIBRARIES})
+TARGET_LINK_LIBRARIES(cpExtensions ${ITK_LIBRARIES} ${VTK_LIBRARIES} ${QT_LIBRARIES})
## =====================
## == Build instances ==
// -------------------------------------------------------------------------
#include <cpPlugins/Config.h>
-#ifdef cpPlugins_Windows
+#ifdef cpPlugins_OS_Windows
# include <memory>
# include <vector>
cpBaseQtApplication::Win32CommandLineConverter cmd_line; \
return( main( cmd_line.argc( ), cmd_line.argv( ) ) ); \
}
-#else // cpPlugins_Windows
+#else // cpPlugins_OS_Windows
# define cpBaseQtApplication_MainComplement
-#endif // cpPlugins_Windows
+#endif // cpPlugins_OS_Windows
#endif // __cpBaseQtApplication__MainHelper__h__
#define cpExtensions_ENV_SEPARATOR "@prj_NAME_ENV_SEPARATOR@"
#define cpExtensions_PATH_SEPARATOR '@prj_NAME_PATH_SEPARATOR@'
-#ifdef cpPlugins_Windows
+#ifdef cpPlugins_OS_Windows
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
if( w != NULL ) props.insert( w );
return( props );
*/
+ TProps props;
+ return( props );
}
// -------------------------------------------------------------------------
#include <cpExtensions/Config.h>
// -------------------------------------------------------------------------
-#ifdef cpPlugins_Windows
-# define cpExtensions_STRTOK( A, B, N ) strtok_s( A, B, N )
+#ifdef cpPlugins_OS_Windows
+# define cpExtensions_STRTOK( A, B, N ) strtok_s( A, B, N )
# define cpExtensions_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O );
-# define
-#else // cpPlugins_Windows
+#else // cpPlugins_OS_Windows
# define cpExtensions_STRTOK( A, B, N ) std::strtok( A, B )
# define cpExtensions_SPRINTF( B, S, O ) std::sprintf( B, "%s", O );
-#endif // cpPlugins_Windows
+#endif // cpPlugins_OS_Windows
// -------------------------------------------------------------------------
#define cpExtensions_CHRONO \
inline std::string CanonicalPath( const std::string& path )
{
std::string ret = "";
-#ifdef cpPlugins_Windows
+#ifdef cpPlugins_OS_Windows
TCHAR buffer[ 4096 ] = TEXT( "" );
TCHAR** lppPart = { NULL };
GetFullPathName( path.c_str( ), 4096, buffer, lppPart );
ret = std::string( buffer );
-#else // cpPlugins_Windows
+#else // cpPlugins_OS_Windows
char* canonical_path = realpath( path.c_str( ), NULL );
if( canonical_path != NULL )
{
free( canonical_path );
} // fi
-#endif // cpPlugins_Windows
+#endif // cpPlugins_OS_Windows
return( ret );
}
unsigned int cpExtensions::Visualization::MPR3DActors::
AddLUTImage( vtkImageData* image )
{
+ unsigned int res = 0;
for( int i = 0; i < 3; ++i )
{
- this->m_Slices[ i ]->AddLUTImage( image );
+ res = this->m_Slices[ i ]->AddLUTImage( image );
this->AddItem( this->m_Slices[ i ]->GetLUTImageActor( ) );
} // rof
+ return( res );
}
// -------------------------------------------------------------------------
#include <cpPlugins/OS/DLLManager.h>
-#ifdef cpPlugins_SYS_WINDOWS
+#ifdef cpPlugins_OS_Windows
# include <Windows.h>
-#else // cpPlugins_SYS_WINDOWS
+#else // cpPlugins_OS_Windows
# include <dlfcn.h>
-#endif // cpPlugins_SYS_WINDOWS
+#endif // cpPlugins_OS_Windows
// -------------------------------------------------------------------------
void* cpPlugins::OS::DLLManager::
Load( const std::string& fname, std::string& error )
{
void* hnd = NULL;
-#ifdef cpPlugins_SYS_WINDOWS
+#ifdef cpPlugins_OS_Windows
hnd = ::LoadLibraryA( fname.c_str( ) );
-#else // cpPlugins_SYS_WINDOWS
+#else // cpPlugins_OS_Windows
hnd = dlopen( fname.c_str( ), RTLD_LAZY | RTLD_GLOBAL );
if( hnd == NULL )
error = dlerror( );
else
dlerror( );
-#endif // cpPlugins_SYS_WINDOWS
+#endif // cpPlugins_OS_Windows
return( hnd );
}
void cpPlugins::OS::DLLManager::
UnLoad( void* hnd )
{
-#ifdef cpPlugins_SYS_WINDOWS
+#ifdef cpPlugins_OS_Windows
::FreeLibrary( ( HMODULE )hnd );
-#else // cpPlugins_SYS_WINDOWS
+#else // cpPlugins_OS_Windows
dlclose( hnd );
-#endif // cpPlugins_SYS_WINDOWS
+#endif // cpPlugins_OS_Windows
}
// -------------------------------------------------------------------------
void* f = NULL;
if( hnd != NULL )
{
-#ifdef cpPlugins_SYS_WINDOWS
+#ifdef cpPlugins_OS_Windows
f = ::GetProcAddress( ( HMODULE )hnd, function.c_str( ) );
-#else // cpPlugins_SYS_WINDOWS
+#else // cpPlugins_OS_Windows
f = dlsym( hnd, function.c_str( ) );
-#endif // cpPlugins_SYS_WINDOWS
+#endif // cpPlugins_OS_Windows
} // fi
return( f );
}
_GenerateData( )
{
auto o = this->GetInputData( "Input" );
- cpPlugins_Demangle_ImageAll_Dims( o, _GD0 );
+ cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
else this->_Error( "Invalid input image." );
}
_GenerateData( )
{
auto o = this->GetInputData( "Input" );
- cpPlugins_Demangle_ImageAll_Dims( o, _GD0 );
+ cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
else this->_Error( "Invalid input image." );
}