[vtkusers] Minimizing VTK footprint (Java Web Start application)

Bill Lorensen bill.lorensen at gmail.com
Thu Aug 8 10:43:32 EDT 2013


I made a small c++include file that included the class names you said you
use.
Then I ran Utilities/Maintenance/WhatModulesVTK.py on that file.

When you configure your app, try.
find_package(VTK COMPONENTS
  vtkCommonCore
  vtkCommonDataModel
  vtkIOImage
  vtkImagingCore
  vtkInteractionWidgets
  vtkRenderingAnnotation
  vtkRenderingCore
  vtkRenderingOpenGL
)

This does not include Java stuff. You'll need to add that.




On Thu, Aug 8, 2013 at 10:21 AM, Marco Sambin <m.sambin at gmail.com> wrote:

> Hi all.
> I beg your pardon in advance for my long email post...
>
> I am using VTK from a Java Web Start application I've written.
>
> In order to support a possibly trouble-free deployment for my web users, I
> am packaging vtk.jar and the related VTK native libraries into signed JAR
> files, to be passed as external resources through the JNLP descriptor,
> differentiating these resources based on OS and architecture
> (32-bit/64-bit, Windows/Mac/Linux).
>
> Now, considering that my application is a Java Web Start application which
> may be used also through low-bandwidth Internet links, I am trying to
> minimize the footprint of VTK, in particular by trying to reduce the number
> of VTK native libraries to include.
>
> Currently in my application I make direct use of the following VTK classes:
>
> vtkImageData
> vtkImageReader2
> vtkDataArray
> vtkUnsignedShortArray
> vtkUnsignedCharArray
> vtkCanvas
> vtkImagePlaneWidget
> vtkImageReslice
> vtkOrientationMarkerWidget
> vtkAnnotatedCubeActor
> vtkRenderer
> vtkCamera
> vtkGenericRenderWindowInteractor
>
> I've built VTK on Win 64-bit platform through Visual Studio 2010 (starting
> from CMake), enabling th "VTK_Group_Imaging", "VTK_Group_Rendering",
> "VTK_Group_StandAlone" and "VTK_WRAP_JAVA" CMake options.
>
> Checking the dependencies of each produced .dll file with the
> DependencyWalker utility, I've ended up with the following "minimal" list
> of required DLLs for my application:
>
> vtkalglib-6.0.dll
> vtkCommonComputationalGeometry-6.0.dll
> vtkCommonComputationalGeometryJava.dll
> vtkCommonCore-6.0.dll
> vtkCommonCoreJava.dll
> vtkCommonDataModel-6.0.dll
> vtkCommonDataModelJava.dll
> vtkCommonExecutionModel-6.0.dll
> vtkCommonExecutionModelJava.dll
> vtkCommonMath-6.0.dll
> vtkCommonMathJava.dll
> vtkCommonMisc-6.0.dll
> vtkCommonMiscJava.dll
> vtkCommonSystem-6.0.dll
> vtkCommonSystemJava.dll
> vtkCommonTransforms-6.0.dll
> vtkCommonTransformsJava.dll
> vtkDICOMParser-6.0.dll
> vtkexpat-6.0.dll
> vtkFiltersCore-6.0.dll
> vtkFiltersCoreJava.dll
> vtkFiltersExtraction-6.0.dll
> vtkFiltersExtractionJava.dll
> vtkFiltersGeneral-6.0.dll
> vtkFiltersGeneralJava.dll
> vtkFiltersGeometry-6.0.dll
> vtkFiltersGeometryJava.dll
> vtkFiltersHybrid-6.0.dll
> vtkFiltersHybridJava.dll
> vtkFiltersModeling-6.0.dll
> vtkFiltersModelingJava.dll
> vtkFiltersSources-6.0.dll
> vtkFiltersSourcesJava.dll
> vtkFiltersStatistics-6.0.dll
> vtkFiltersStatisticsJava.dll
> vtkfreetype-6.0.dll
> vtkftgl-6.0.dll
> vtkImagingColor-6.0.dll
> vtkImagingColorJava.dll
> vtkImagingCore-6.0.dll
> vtkImagingCoreJava.dll
> vtkImagingFourier-6.0.dll
> vtkImagingFourierJava.dll
> vtkImagingGeneral-6.0.dll
> vtkImagingGeneralJava.dll
> vtkImagingHybrid-6.0.dll
> vtkImagingHybridJava.dll
> vtkImagingSources-6.0.dll
> vtkImagingSourcesJava.dll
> vtkInteractionImage-6.0.dll
> vtkInteractionImageJava.dll
> vtkInteractionStyle-6.0.dll
> vtkInteractionStyleJava.dll
> vtkInteractionWidgets-6.0.dll
> vtkInteractionWidgetsJava.dll
> vtkIOCore-6.0.dll
> vtkIOCoreJava.dll
> vtkIOImage-6.0.dll
> vtkIOImageJava.dll
> vtkIOXMLParser-6.0.dll
> vtkIOXMLParserJava.dll
> vtkjpeg-6.0.dll
> vtkmetaio-6.0.dll
> vtkpng-6.0.dll
> vtkRenderingAnnotation-6.0.dll
> vtkRenderingAnnotationJava.dll
> vtkRenderingCore-6.0.dll
> vtkRenderingCoreJava.dll
> vtkRenderingFreeType-6.0.dll
> vtkRenderingFreeTypeJava.dll
> vtkRenderingFreeTypeOpenGL-6.0.dll
> vtkRenderingFreeTypeOpenGLJava.dll
> vtkRenderingOpenGL-6.0.dll
> vtkRenderingOpenGLJava.dll
> vtkRenderingVolume-6.0.dll
> vtkRenderingVolumeJava.dll
> vtkRenderingVolumeOpenGL-6.0.dll
> vtkRenderingVolumeOpenGLJava.dll
> vtksys-6.0.dll
> vtktiff-6.0.dll
> vtkViewsCore-6.0.dll
> vtkViewsCoreJava.dll
> vtkWrappingJava-6.0.dll
> vtkzlib-6.0.dll
>
> In  "MinSizeRel" build configuration, this means more than 25 megabytes of
> DLLs.
> Can this result be improved somehow? I mean, can I somehow decrease the
> total size/number of required VTK native libraries, considering the set of
> VTK classes I am using?
>
> Thank you in advance for any hint/suggestion you may provide.
> Best regards,
>
> Marco
>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130808/67283b07/attachment.htm>


More information about the vtkusers mailing list