Changeset 3870


Ignore:
Timestamp:
Aug 16, 2013 2:17:25 AM (11 years ago)
Author:
ldelgass
Message:

Add VTK reader/resampler to nanovis

Location:
trunk/packages/vizservers/nanovis
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Command.cpp

    r3630 r3870  
    5555#include "FlowCmd.h"
    5656#include "dxReader.h"
     57#ifdef USE_VTK
     58#include "VtkDataSetReader.h"
     59#endif
    5760#include "VtkReader.h"
    5861#include "BMPWriter.h"
     
    12731276    } else if ((nBytes > 14) && (strncmp(bytes, "# vtk DataFile", 14) == 0)) {
    12741277        TRACE("VTK loading...");
    1275         std::stringstream fdata;
    1276         fdata.write(bytes, nBytes);
    12771278        if (nBytes <= 0) {
    12781279            ERROR("data buffer is empty");
     
    12801281        }
    12811282        Rappture::Outcome context;
     1283#ifdef USE_VTK
     1284        volume = load_vtk_volume_stream(context, tag, bytes, nBytes);
     1285#else
     1286        std::stringstream fdata;
     1287        fdata.write(bytes, nBytes);
    12821288        volume = load_vtk_volume_stream(context, tag, fdata);
     1289#endif
    12831290        if (volume == NULL) {
    12841291            Tcl_AppendResult(interp, context.remark(), (char*)NULL);
     
    12921299        }
    12931300        TRACE("DX loading...");
    1294         std::stringstream fdata;
    1295         fdata.write(bytes, nBytes);
    12961301        if (nBytes <= 0) {
    12971302            ERROR("data buffer is empty");
    12981303            abort();
    12991304        }
     1305        std::stringstream fdata;
     1306        fdata.write(bytes, nBytes);
    13001307        Rappture::Outcome context;
    13011308        volume = load_dx_volume_stream(context, tag, fdata);
  • trunk/packages/vizservers/nanovis/Makefile.in

    r3630 r3870  
    33USE_POINTSET_RENDERER   = #yes
    44USE_PARTICLE_SYSTEM     = #yes
     5USE_VTK                 = yes
    56
    67SHELL = /bin/sh
     
    5354VRMATH_LIB_SPEC = $(VRMATH_LIB)
    5455
     56VTK_LIB_DIR     = @VTK_LIB_DIR@
     57VTK_INC_SPEC    = @VTK_INC_SPEC@
     58VTK_LIB_SPEC    = \
     59                -lvtkIOCore-6.0 \
     60                -lvtkIOLegacy-6.0 \
     61                -lvtkFiltersCore-6.0 \
     62                -lvtkImagingHybrid-6.0 \
     63                -lvtkImagingCore-6.0 \
     64                -lvtkCommonCore-6.0 \
     65                -lvtkCommonDataModel-6.0 \
     66                -lvtkCommonExecutionModel-6.0  \
     67                -lvtkCommonMisc-6.0  \
     68                -lvtkCommonSystem-6.0 \
     69                -lvtkCommonTransforms-6.0 \
     70                -lvtkCommonMath-6.0
     71
    5572EXTRA_LIBS      = -lm -lpthread
    5673RP_DIR          =  @RP_DIR@
     
    7390                $(UTIL_LIB_SPEC) \
    7491                $(VRMATH_LIB_SPEC) \
     92                $(VTK_LIB_SPEC) \
    7593                $(TCL_LIB_SPEC) \
    7694                $(CG_LIB_SPEC) \
     
    85103                $(MAT_INC_SPEC) \
    86104                $(VRMATH_INC_SPEC) \
     105                $(VTK_INC_SPEC) \
    87106                $(TCL_INC_SPEC) \
    88107                $(CG_INC_SPEC) \
     
    103122ifdef USE_POINTSET_RENDERER
    104123DEFINES         += -DUSE_POINTSET_RENDERER
     124endif
     125ifdef USE_VTK
     126DEFINES         += -DUSE_VTK
    105127endif
    106128CXX_SWITCHES    = $(CFLAGS) $(EXTRA_CFLAGS) $(DEFINES) $(INCLUDES)
     
    204226endif
    205227
     228ifdef USE_VTK
     229OBJS +=         DataSetResample.o \
     230                VtkDataSetReader.o
     231endif
     232
    206233.PHONY: all install install-resources install-shaders install-nanovis docs clean-docs clean distclean graphics imgloaders newmat11 util vrmath
    207234
     
    287314ContourLineFilter.o: ContourLineFilter.cpp ContourLineFilter.h
    288315ConvexPolygon.o: ConvexPolygon.cpp ConvexPolygon.h $(VRMATH_DIR)/include/vrmath/Vector4f.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h Plane.h
     316DataSetResample.o: DataSetResample.cpp DataSetResample.h
    289317Flow.o: Flow.cpp Flow.h FlowCmd.h FlowTypes.h FlowBox.h FlowParticles.h LIC.h VelocityArrowsSlice.h Switch.h Unirect.h Volume.h TransferFunction.h Trace.h
    290318FlowBox.o: FlowBox.cpp FlowBox.h FlowTypes.h Switch.h Trace.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h $(VRMATH_DIR)/include/vrmath/Vector4f.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h
     
    293321GradientFilter.o: GradientFilter.cpp GradientFilter.h
    294322Grid.o: Grid.cpp Grid.h Axis.h Chain.h $(UTIL_DIR)/Fonts.h $(VRMATH_DIR)/include/vrmath/Color4f.h $(VRMATH_DIR)/include/vrmath/Vector4f.h
    295 HeightMap.o: HeightMap.cpp HeightMap.h
    296 LIC.o: LIC.cpp LIC.h
     323HeightMap.o: HeightMap.cpp HeightMap.h Shader.h
     324LIC.o: LIC.cpp LIC.h Shader.h
    297325OrientationIndicator.o: OrientationIndicator.cpp OrientationIndicator.h
    298326ParticleAdvectionShader.o: ParticleAdvectionShader.cpp ParticleAdvectionShader.h Shader.h
     
    327355VolumeRenderer.o: VolumeRenderer.cpp VolumeRenderer.h ConvexPolygon.h Volume.h nanovis.h Trace.h Plane.h StdVertexShader.h Shader.h
    328356VolumeShader.o: VolumeShader.cpp VolumeShader.h Shader.h
    329 VtkReader.o: VtkReader.h Trace.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h ReaderCommon.h nanovis.h
     357VtkDataSetReader.o: VtkDataSetReader.cpp VtkDataSetReader.h DataSetResample.h $(VRMATH_DIR)/include/vrmath/Vector3f.h ReaderCommon.h Trace.h Volume.h nanovis.h config.h
     358VtkReader.o: VtkReader.h Trace.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h ReaderCommon.h nanovis.h config.h
    330359ZincBlendeReconstructor.o: ZincBlendeReconstructor.cpp ZincBlendeReconstructor.h ZincBlendeVolume.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h
    331360ZincBlendeVolume.o: ZincBlendeVolume.cpp ZincBlendeVolume.h config.h define.h
  • trunk/packages/vizservers/nanovis/VtkReader.cpp

    r3630 r3870  
    1616#include "ReaderCommon.h"
    1717
     18#include "config.h"
    1819#include "nanovis.h"
    1920#include "VtkReader.h"
Note: See TracChangeset for help on using the changeset viewer.