[vtkusers] Which Vtk Module to build to have access to "vtkButterflySubdivisionFilter.h" , "vtkLoopSubdivisionFilter.h" and "vtkLinearSubdivisionFilter.h"

Remi Charrier remi.charrier at gmail.com
Fri Jul 1 03:09:09 EDT 2016


Dear all,
Thanks for your answer, it solved my problem. In fact, I did not included
the vtkFiltersModeling in my CMakeList.txt. Now that it is done it solved
my problem. Anyway I will try the script you mentioned as it is not always
obvious which module to include ...
Thanks again for such prompt answers. Please find my CMakeList.txt after
this message.

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
  cmake_policy(SET CMP0020 NEW)
endif()
if(POLICY CMP0025)
  cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
if (POLICY CMP0043)
  cmake_policy(SET CMP0043 NEW) # CMake 3.0
endif()
if(POLICY CMP0053)
  cmake_policy(SET CMP0053 NEW) # CMake 3.1
endif()

#############################################
# PROJECT: Reagix#
#############################################
PROJECT(Reagix)


# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)


#####################################
# FIND PACKAGES IF BUILDING OUTSIDE #
################################-line 20#####

find_package (VTK COMPONENTS
  vtkCommonCore
  vtkFiltersSources
  vtkInteractionStyle
  vtkRenderingCore
  vtkIOCore
  vtkIOGeometry
  vtkIOPLY
  vtkRenderingCore
#  vtkRenderingVolume
  vtkFiltersModeling
  vtkRenderingVolumeOpenGL2
  vtkRenderingOpenGL2${VTK_RENDERING_BACKEND}
  vtkRenderingVolume${VTK_RENDERING_BACKEND}



#for qt app
  vtkGUISupportQt
  vtkIOImage
)



include ( ${VTK_USE_FILE} )

include_Directories (${CMAKE_CURRENT_BINARY_DIR})

#############################################
# SOURCE FILE SPECIFICATION                 #
#############################################


SET(LOGIC_SOURCE
    main.cxx
    RemiRenderer.cxx
    LoadHeartModel.cxx
    LoadMR.cxx
    CreateCatheterModel.cxx
    ReagixApp.cxx
    ReagixQtApp.cxx
    DataCenter.cxx
#    RemiSTLReader.cxx.
   # vtkSTLReader.cxx
)

#SET(LOGIC_QT_SOURCE
 # QHello.cxx)


# The headers for the Logic code
SET(LOGIC_HEADERS
   ReagixQtApp.h
    RemiRenderer.h
    LoadHeartModel.h
    LoadMR.h
    DataCenter.h
    CreateCatheterModel.h
    ReagixApp.h
)


find_package(Qt5 COMPONENTS Core REQUIRED QUIET)


#############################################
# LIBRARIES AND EXTERNAL CODE               #
#############################################

ADD_EXECUTABLE(Reagix ${LOGIC_HEADERS} ${LOGIC_SOURCE})
qt5_use_modules(Reagix Core Gui Widgets)
TARGET_LINK_LIBRARIES(Reagix  ${VTK_LIBRARIES} )








2016-07-01 9:01 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:

> 2016-06-30 17:32 GMT+02:00 Remi Charrier <remi.charrier at gmail.com>:
>
>> Hi,
>>
>> I would like to try the following filters:
>> "vtkButterflySubdivisionFilter.h"
>> "vtkLoopSubdivisionFilter.h"
>> "vtkLinearSubdivisionFilter.h"
>> in order to increase the number of cells in my 3D models.
>>
>> I have the source files but they didn't compile as I probably did not
>> include them in the CMake process. However I still don't understand where
>> to find to which vtkmodule a specific file is linked. I thought it was
>> based on the folders name but in this case, the path is :
>> VTK-7.0.0\Filters\Modeling
>> in the cmakelist.txt of this folder I find that it may be associated with
>> vtkFiltersModeling
>> But I don't have this module or entry in the Cmake window.
>> Any help would be welcome.
>> Thanks in advance
>>
>
> David Gobbi recently pointed me at a handy script included in the VTK
> source. You can run it on your files/directories an it will try to
> determine which modules you need besed on the headers you include.
>
> Running it on just those three headers, I get:
>
> estan at newton:~/orexplore/VTK$ cat test.cpp
> #include <vtkButterflySubdivisionFilter.h>
> #include <vtkLoopSubdivisionFilter.h>
> #include <vtkLinearSubdivisionFilter.h>
> estan at newton:~/orexplore/VTK$ Utilities/Maintenance/WhatModulesVTK.py .
> test.cpp
> Modules and their dependencies:
> find_package(VTK COMPONENTS
>   vtkCommonComputationalGeometry
>   vtkCommonCore
>   vtkCommonDataModel
>   vtkCommonExecutionModel
>   vtkCommonMath
>   vtkCommonMisc
>   vtkCommonSystem
>   vtkCommonTransforms
>   vtkFiltersCore
>   vtkFiltersGeneral
>   vtkFiltersModeling
>   vtkFiltersSources
>   vtkkwiml
> )
> Your application code includes 13 of 189 vtk modules.
>
> All modules referenced in the files:
> find_package(VTK COMPONENTS
>   vtkFiltersModeling
> )
> Your application code includes 1 of 189 vtk modules.
>
> Minimal set of modules:
> find_package(VTK COMPONENTS
>   vtkFiltersModeling
> )
> Your application code includes 1 of 189 vtk modules.
>
>
> estan at newton:~/orexplore/VTK$
>
> I don't know why you don't have the vtkFiltersModeling module, but it
> would help to see your CMakeLists.txt and CMake output I think.
>
> Elvis
>
> Rémi
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160701/8a61c88a/attachment.html>


More information about the vtkusers mailing list