├── .gitignore ├── .gitmodules ├── .travis.yml ├── BatchRenderer ├── BatchContext.cpp ├── BatchContext.h ├── BatchRenderer.pro ├── CGLContext.cpp ├── CGLContext.h ├── GLXContext.cpp ├── GLXContext.h ├── NSContext.h ├── NSContext.mm ├── TuvokLuaScriptExec.cpp ├── TuvokLuaScriptExec.h ├── WGLContext.cpp ├── WGLContext.h ├── main.cpp └── testNSContext.mm ├── CmdLineConverter ├── CmdLineConverter.pro ├── DebugOut │ ├── HRConsoleOut.cpp │ └── HRConsoleOut.h ├── TuvokConverter.vcxproj ├── TuvokConverter.vcxproj.filters └── main.cpp ├── DemoData ├── c60.1dt ├── c60.2dt └── c60.uvf ├── Doxyfile ├── ExtractDebugInfo ├── ExtractDebugInfo.pro ├── ExtractDebugInfo.vcxproj └── main.cpp ├── IV3D.plist ├── ImageVis3D-2015.sln ├── ImageVis3D.pro ├── ImageVis3D ├── DebugOut │ ├── QTLabelOut.cpp │ ├── QTLabelOut.h │ ├── QTOut.cpp │ └── QTOut.h ├── Doxyfile ├── IO │ ├── 3rdParty │ │ ├── crypt.h │ │ ├── ioapi.c │ │ ├── ioapi.h │ │ ├── zip.c │ │ └── zip.h │ ├── DialogConverter.cpp │ ├── DialogConverter.h │ ├── ZipFile.cpp │ └── ZipFile.h ├── ImageVis3D.pro ├── ImageVis3D.qrc ├── ImageVis3D.vcxproj ├── ImageVis3D.vcxproj.filters ├── Resources │ ├── ImageVis3D.icns │ ├── ImageVis3D.ico │ ├── ImageVis3D.rc │ ├── bug.png │ ├── icon_128.png │ ├── icon_16.png │ ├── icon_256.png │ ├── icon_32.png │ ├── icon_512.png │ ├── icon_64.png │ ├── icon_Update.png │ ├── imagevis3d.png │ └── imagevis3dmini.png ├── StdDefines.h ├── UI │ ├── AboutDlg.cpp │ ├── AboutDlg.h │ ├── BasicSettingsDlg.cpp │ ├── BasicSettingsDlg.h │ ├── BrowseData.cpp │ ├── BrowseData.h │ ├── BugRepDlg.cpp │ ├── BugRepDlg.h │ ├── CrashDetDlg.cpp │ ├── CrashDetDlg.h │ ├── DatasetServerDialog.cpp │ ├── DatasetServerDialog.h │ ├── DebugScriptWindow.cpp │ ├── DebugScriptWindow.h │ ├── FTPDialog.cpp │ ├── FTPDialog.h │ ├── ImageVis3D.cpp │ ├── ImageVis3D.h │ ├── ImageVis3D_1DTransferFunction.cpp │ ├── ImageVis3D_2DTransferFunction.cpp │ ├── ImageVis3D_Capturing.cpp │ ├── ImageVis3D_DebugWindow.cpp │ ├── ImageVis3D_FileHandling.cpp │ ├── ImageVis3D_Help.cpp │ ├── ImageVis3D_I3M.cpp │ ├── ImageVis3D_Locking.cpp │ ├── ImageVis3D_Progress.cpp │ ├── ImageVis3D_Settings.cpp │ ├── ImageVis3D_Stereo.cpp │ ├── ImageVis3D_WindowHandling.cpp │ ├── LODDlg.cpp │ ├── LODDlg.h │ ├── MDIRenderWin.cpp │ ├── MDIRenderWin.h │ ├── MIPRotDialog.cpp │ ├── MIPRotDialog.h │ ├── MergeDlg.cpp │ ├── MergeDlg.h │ ├── MetadataDlg.cpp │ ├── MetadataDlg.h │ ├── PleaseWait.cpp │ ├── PleaseWait.h │ ├── Q1DTransferFunction.cpp │ ├── Q1DTransferFunction.h │ ├── Q2DTransferFunction.cpp │ ├── Q2DTransferFunction.h │ ├── QDataRadioButton.cpp │ ├── QDataRadioButton.h │ ├── QLightPreview.cpp │ ├── QLightPreview.h │ ├── QTransferFunction.cpp │ ├── QTransferFunction.h │ ├── RAWDialog.cpp │ ├── RAWDialog.h │ ├── RenderWindow.cpp │ ├── RenderWindow.h │ ├── RenderWindowDX.cpp │ ├── RenderWindowDX.h │ ├── RenderWindowGL.cpp │ ├── RenderWindowGL.h │ ├── ScaleAndBiasDlg.cpp │ ├── ScaleAndBiasDlg.h │ ├── SettingsDlg.cpp │ ├── SettingsDlg.h │ ├── UI │ │ ├── About.ui │ │ ├── BrowseData.ui │ │ ├── BugRepDlg.ui │ │ ├── CrashDetDlg.ui │ │ ├── FTPDialog.ui │ │ ├── ImageVis3D.ui │ │ ├── LODDlg.ui │ │ ├── MIPRotDialog.ui │ │ ├── MergeDlg.ui │ │ ├── Metadata.ui │ │ ├── PleaseWait.ui │ │ ├── RAWDialog.ui │ │ ├── ScaleAndBiasDlg.ui │ │ ├── SettingsDlg.ui │ │ ├── URLDlg.ui │ │ └── Welcome.ui │ ├── URLDlg.cpp │ ├── URLDlg.h │ ├── Welcome.cpp │ └── Welcome.h └── main.cpp ├── LICENSE ├── LuaScripts ├── BatchRenderer.lua └── FlyThroughAnimator.lua ├── README.md ├── Scripts ├── Linux-StaticQt.sh ├── Mac-DynamicQt-Cocoa.sh ├── Win-StaticQt-4.8.bat ├── WinVM.bat ├── argon.sh ├── build-4.6.0.bat ├── deb-vm.sh ├── debian.sh ├── dl.ps1 ├── download-test-data.sh ├── gcc-dev-cfg.sh ├── installer │ ├── 32-debug.iss │ ├── 32.iss │ ├── 64-debug.iss │ └── 64.iss ├── iv3d-arch.sh ├── mk_app.sh ├── mk_tarball.sh ├── neon.sh ├── nightly.sh ├── oneshot-debug.bat ├── oneshot-debug.sh ├── oneshot-release.bat ├── oneshot-release.sh ├── revision.py ├── util.sh ├── version.py └── vg-nightly.sh ├── StandaloneTuvok ├── 3rdParty │ ├── adler32.c │ ├── compress.c │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── gzio.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── zconf.h │ ├── zconf.in.h │ ├── zlib.h │ ├── zutil.c │ └── zutil.h ├── CmdRenderer.cpp ├── GLContext.cpp ├── GLContext.h ├── SmallImage.cpp ├── SmallImage.h ├── StandaloneTuvok.sln ├── StandaloneTuvok.vcxproj ├── StandaloneTuvok.vcxproj.filters └── readme.txt ├── UVFReader ├── .gitignore ├── BlockInfo.h ├── DataSource.h ├── TuvokReader.vcxproj ├── TuvokReader.vcxproj.filters ├── UVFReader.pro └── main.cpp ├── doc ├── add-converter.adoc ├── expressions.adoc ├── helium.py ├── imagevis3d.1 ├── import.adoc └── uvfconvert.1 ├── notdebian ├── README.Debian ├── changelog ├── compat ├── control ├── copyright ├── dirs ├── imagevis3d.substvars ├── menu ├── rules └── watch ├── pre-commit.sh ├── rpm └── imagevis3d.spec ├── ui_files.props ├── ui_files.rules ├── ui_files.targets └── ui_files.xml /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Default.geo 3 | Default.wsp 4 | Build 5 | .gitignore 6 | *.gcno 7 | debugLog.txt 8 | ImageVis3D.pro.user 9 | *.vcxproj.user 10 | *.sdf 11 | *.suo 12 | *.opensdf 13 | ImageVis3D/UI/AutoGen 14 | *.o 15 | *.swp 16 | BatchRenderer/BatchRenderer 17 | *.dmg 18 | *.zip 19 | *.tar.gz 20 | /ipch 21 | /StandaloneTuvok/x64 22 | /StandaloneTuvok/Release 23 | /StandaloneTuvok/Debug 24 | Scripts/installer/ImageVis3D.pdf 25 | *.exe 26 | Scripts/installer/GettingDataIntoImageVis3D.pdf 27 | *.cached 28 | *.xcodeproj 29 | Info.plist 30 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Tuvok"] 2 | path = Tuvok 3 | url = https://github.com/SCIInstitute/Tuvok.git 4 | branch = master 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | os: 3 | - linux 4 | - osx 5 | compiler: 6 | - clang 7 | - gcc 8 | env: 9 | - CONFIG=debug 10 | - CONFIG=release 11 | matrix: 12 | exclude: 13 | - os: osx 14 | compiler: gcc 15 | before_install: 16 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y; fi 17 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi 18 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install libosmesa6-dev; fi 19 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install libqt4-dev qt4-qmake; fi 20 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi 21 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install qt; fi 22 | - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi 23 | - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi 24 | script: travis_wait ./Scripts/oneshot-${CONFIG}.sh 25 | notifications: 26 | slack: 27 | secure: D03l+Pzfk8TAQfvqVw0Cw1v4IBNxvG8u/RxZ4BJ349x4Ty8AzbJz0EfoXPYVjyPTn8tXaPLKFPmlZxORBj4wb6z9iqTWTi0LKZ+cKfIRIKFGJj10U4UcKss8LZupcBTbaLX1u8UrwrThlLuoJcU/pmpc/h0VldJxCvOIyGabCgs= 28 | -------------------------------------------------------------------------------- /BatchRenderer/BatchContext.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2010 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file batchContext.cpp 31 | \author Tom Fogal 32 | SCI Institute 33 | University of Utah 34 | \brief Establishes an OpenGL context. 35 | */ 36 | 37 | #include 38 | #include 39 | 40 | #include 41 | 42 | #include "Renderer/GL/GLStateManager.h" 43 | #include "BatchContext.h" 44 | 45 | #include "CGLContext.h" 46 | #include "GLXContext.h" 47 | #include "WGLContext.h" 48 | #include "NSContext.h" 49 | 50 | namespace tuvok 51 | { 52 | 53 | BatchContext::BatchContext() : 54 | Context(0) // Tuvok specific 55 | { 56 | ctx = nullptr; // Tuvok specific 57 | } 58 | 59 | BatchContext* BatchContext::Create(uint32_t width, uint32_t height, 60 | uint8_t color_bits, uint8_t depth_bits, 61 | uint8_t stencil_bits, bool double_buffer, 62 | bool visible) 63 | { 64 | BatchContext* bctx; 65 | #ifdef DETECTED_OS_WINDOWS 66 | bctx = new WGLContext(width, height, color_bits, depth_bits, stencil_bits, 67 | double_buffer, visible); 68 | #elif defined(DETECTED_OS_APPLE) && defined(USE_CGL) 69 | bctx = new CGLContext(width, height, color_bits, depth_bits, stencil_bits, 70 | double_buffer, visible); 71 | #elif defined(DETECTED_OS_APPLE) 72 | bctx = new NSContext(width, height, color_bits, depth_bits, stencil_bits, 73 | double_buffer, visible); 74 | #else 75 | bctx = new GLXBatchContext(width, height, color_bits, depth_bits, stencil_bits, 76 | double_buffer, visible); 77 | #endif 78 | if (bctx->makeCurrent() == false) 79 | std::cerr << "Unable to make context current!" << std::endl; 80 | 81 | GLenum glerr = glewInit(); 82 | if (GLEW_OK != glerr) 83 | { 84 | std::cerr << "Error initializing GLEW: " << glewGetErrorString(glerr) << "\n"; 85 | throw std::runtime_error("could not initialize GLEW."); 86 | } 87 | 88 | // Tuvok specific 89 | bctx->m_pState = std::shared_ptr(new GLStateManager()); 90 | 91 | // Tuvok specific (this is really bad, but no one uses the pointer to the 92 | // context anyways...). 93 | bctx->ctx = (const void*)bctx; 94 | 95 | return bctx; 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /BatchRenderer/BatchContext.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2010 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file batchContext.cpp 31 | \author Tom Fogal 32 | SCI Institute 33 | University of Utah 34 | \brief Simple wrapper for establishing an OpenGL context. 35 | */ 36 | 37 | #ifndef BATCH_RENDERER_CONTEXT_H 38 | #define BATCH_RENDERER_CONTEXT_H 39 | 40 | #include 41 | 42 | #include "Renderer/Context.h" // Tuvok specific 43 | 44 | namespace tuvok 45 | { 46 | 47 | class BatchContext : public Context // Tuvok specific 48 | { 49 | public: 50 | /// This virtual constructor will create the appropriate context based 51 | /// on the current operating system. 52 | static BatchContext* Create(uint32_t width, uint32_t height, 53 | uint8_t color_bits=32, uint8_t depth_bits=24, 54 | uint8_t stencil_bits=8, bool double_buffer=true, 55 | bool visible=false); 56 | virtual ~BatchContext() {} 57 | 58 | virtual bool isValid() const=0; 59 | virtual bool makeCurrent()=0; 60 | virtual bool swapBuffers()=0; 61 | 62 | protected: 63 | 64 | BatchContext(); 65 | 66 | }; 67 | 68 | class NoAvailableContext : public std::exception 69 | { 70 | public: 71 | virtual ~NoAvailableContext() throw() {} 72 | virtual const char* what() const throw() 73 | { 74 | return "No context was available to utilize."; 75 | } 76 | }; 77 | 78 | } 79 | 80 | #endif // BATCH_RENDERER_CONTEXT_H 81 | -------------------------------------------------------------------------------- /BatchRenderer/BatchRenderer.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | CONFIG += exceptions qt rtti staticlib static stl warn_on 3 | DESTDIR = Build 4 | TARGET = BatchRenderer 5 | DEPENDPATH = . 6 | INCLUDEPATH = . ../Tuvok 7 | INCLUDEPATH += ../Tuvok/3rdParty 8 | INCLUDEPATH += ../Tuvok/Basics/3rdParty 9 | INCLUDEPATH += ../Tuvok/3rdParty/GLEW 10 | INCLUDEPATH += ../Tuvok/IO/3rdParty/boost/ 11 | QMAKE_LIBDIR += ../Tuvok/Build ../Tuvok/IO/expressions 12 | QT += opengl 13 | LIBS += -lTuvok -ltuvokexpr -lz 14 | !macx:unix:QMAKE_LFLAGS += -fopenmp 15 | 16 | # Operating system definitions now in the makefile instead of 17 | # a header file. 18 | unix:!macx { DEFINES += "DETECTED_OS_LINUX" } 19 | macx { DEFINES += "DETECTED_OS_APPLE" } 20 | win32 { DEFINES += "DETECTED_OS_WINDOWS" } 21 | 22 | #### 23 | # General unix configuration (including Mac OS X). 24 | #### 25 | unix:QMAKE_CXXFLAGS += -fno-strict-aliasing -g -std=c++0x 26 | unix:QMAKE_CFLAGS += -fno-strict-aliasing -g 27 | 28 | #### 29 | # Non-OSX Unix configuration 30 | #### 31 | # Note: Do NOT specific the GL linker flag (-lGL) on Mac! 32 | unix:!macx:LIBS += -lGL -lX11 -lGLU 33 | # Try to link to GLU statically. 34 | gludirs = /usr/lib /usr/lib/x86_64-linux-gnu 35 | for(d, gludirs) { 36 | if(exists($${d}/libGLU.a) && static) { 37 | LIBS -= -lGLU; 38 | LIBS += $${d}/libGLU.a 39 | } 40 | } 41 | 42 | #### 43 | # Mac OS X configuration 44 | #### 45 | macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ 46 | macx:QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.7 -std=c++0x -stdlib=libc++ 47 | macx:QMAKE_CFLAGS += -mmacosx-version-min=10.7 48 | macx:LIBS += -mmacosx-version-min=10.7 -stdlib=libc++ -framework Cocoa -framework OpenGL 49 | macx:CONFIG -= app_bundle 50 | macx:INCLUDEPATH += /usr/X11R6/include 51 | macx:QMAKE_LIBDIR += /usr/X11R6/lib 52 | 53 | ### Should we link Qt statically or as a shared lib? 54 | # Find the location of QtCore`s prl file, and include it here so we can look at 55 | # the QMAKE_PRL_CONFIG variable. 56 | TEMP = $$[QT_INSTALL_LIBS] libQtCore.prl 57 | PRL = $$[QT_INSTALL_LIBS] QtCore.framework/QtCore.prl 58 | TEMP = $$join(TEMP, "/") 59 | PRL = $$join(PRL, "/") 60 | exists($$TEMP) { 61 | include($$join(TEMP, "/")) 62 | } 63 | exists($$PRL) { 64 | include($$join(PRL, "/")) 65 | } 66 | 67 | # If that contains the `shared` configuration, the installed Qt is shared. 68 | # In that case, disable the image plugins. 69 | contains(QMAKE_PRL_CONFIG, shared) { 70 | QTPLUGIN -= qgif qjpeg 71 | } else { 72 | QTPLUGIN += qgif qjpeg 73 | } 74 | 75 | SOURCES += \ 76 | main.cpp \ 77 | BatchContext.cpp \ 78 | TuvokLuaScriptExec.cpp 79 | 80 | 81 | unix:!macx { SOURCES += GLXContext.cpp } 82 | macx { SOURCES += CGLContext.cpp } 83 | macx { OBJECTIVE_SOURCES += NSContext.mm } 84 | win32 { SOURCES += WGLContext.cpp } 85 | 86 | HEADERS += \ 87 | BatchContext.h \ 88 | CGLContext.h \ 89 | NSContext.h \ 90 | GLXContext.h \ 91 | WGLContext.h \ 92 | TuvokLuaScriptExec.h 93 | -------------------------------------------------------------------------------- /BatchRenderer/CGLContext.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2010 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef TUVOK_CGL_CONTEXT_H 29 | #define TUVOK_CGL_CONTEXT_H 30 | 31 | #include 32 | #include "BatchContext.h" 33 | 34 | namespace tuvok { 35 | 36 | struct CGLContextInfo; 37 | 38 | class CGLContext : public BatchContext { 39 | public: 40 | CGLContext(uint32_t w, uint32_t h, uint8_t color_bits, 41 | uint8_t depth_bits, uint8_t stencil_bits, 42 | bool double_buffer, bool visible); 43 | virtual ~CGLContext(); 44 | 45 | bool isValid() const; 46 | bool makeCurrent(); 47 | bool swapBuffers(); 48 | 49 | private: 50 | std::shared_ptr ci; 51 | }; 52 | 53 | } 54 | 55 | #endif /* TUVOK_CGL_CONTEXT_H */ 56 | -------------------------------------------------------------------------------- /BatchRenderer/GLXContext.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2012 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | #ifndef TUVOK_GLX_CONTEXT_H 29 | #define TUVOK_GLX_CONTEXT_H 30 | 31 | #include 32 | #include "BatchContext.h" 33 | 34 | namespace tuvok 35 | { 36 | 37 | struct xinfo; 38 | 39 | class GLXBatchContext: public BatchContext 40 | { 41 | public: 42 | GLXBatchContext(uint32_t w, uint32_t h, uint8_t color_bits, 43 | uint8_t depth_bits, uint8_t stencil_bits, 44 | bool double_buffer, 45 | bool visible); 46 | virtual ~GLXBatchContext(); 47 | 48 | bool isValid() const; 49 | bool makeCurrent(); 50 | bool swapBuffers(); 51 | 52 | private: 53 | std::shared_ptr xi; 54 | }; 55 | 56 | } 57 | 58 | #endif /* TUVOK_GLX_CONTEXT_H */ 59 | -------------------------------------------------------------------------------- /BatchRenderer/NSContext.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2012 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /// \author James Hughes 30 | /// \date December 2012 31 | 32 | #ifndef BATCHRENDERER_NSCONTEXT_H 33 | #define BATCHRENDERER_NSCONTEXT_H 34 | 35 | #include 36 | #include "BatchContext.h" 37 | 38 | namespace tuvok 39 | { 40 | 41 | struct NSContextInfo; 42 | 43 | /// Uses Objective-C to obtain a context. 44 | class NSContext : public BatchContext 45 | { 46 | public: 47 | NSContext(uint32_t w, uint32_t h, uint8_t colorBits, 48 | uint8_t depthBits, uint8_t stencilBits, 49 | bool doubleBuffer, bool visible); 50 | virtual ~NSContext(); 51 | 52 | bool isValid() const; 53 | bool makeCurrent(); 54 | bool swapBuffers(); 55 | 56 | private: 57 | 58 | std::shared_ptr mCI; 59 | }; 60 | 61 | } // namespace tuvok 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /BatchRenderer/TuvokLuaScriptExec.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2012 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /// \author James Hughes 30 | /// \date November 2012 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #include "TuvokLuaScriptExec.h" 38 | #include "Controller/Controller.h" 39 | #include "Controller/MasterController.h" 40 | 41 | namespace tuvok { 42 | 43 | //------------------------------------------------------------------------------ 44 | TuvokLuaScriptExec::TuvokLuaScriptExec() 45 | { 46 | // Register context creation function. 47 | } 48 | 49 | 50 | //------------------------------------------------------------------------------ 51 | TuvokLuaScriptExec::~TuvokLuaScriptExec() 52 | { 53 | } 54 | 55 | //------------------------------------------------------------------------------ 56 | void TuvokLuaScriptExec::execFile(const std::string& filename) 57 | { 58 | std::shared_ptr ss = Controller::Instance().LuaScript(); 59 | 60 | // Execute entire file in Lua. 61 | try 62 | { 63 | lua_State* L = ss->getLuaState(); 64 | luaL_loadfile(L, filename.c_str()); 65 | const int err = lua_pcall(L, 0, LUA_MULTRET, 0); 66 | switch(err) { 67 | case 0: /* success. */ break; 68 | case LUA_ERRRUN: 69 | std::cerr << "Error interpreting file: " << filename << std::endl; 70 | if (lua_gettop(L) != 0 && lua_isstring(L, lua_gettop(L))) 71 | std::cerr << "Error: " << lua_tostring(L, lua_gettop(L)) << std::endl; 72 | break; 73 | case LUA_ERRMEM: 74 | std::cerr << "Memory allocation error.\n"; 75 | break; 76 | case LUA_ERRERR: 77 | std::cerr << "Error running Lua error function(?!)\n"; 78 | break; 79 | default: 80 | std::cerr << "Unknown Lua error (" << err << ").\n"; 81 | break; 82 | } 83 | } 84 | catch (...) 85 | { 86 | // If an exception occurred in Lua, the description will be fairly verbose. 87 | throw; 88 | } 89 | } 90 | 91 | 92 | } // end of namespace tuvok 93 | -------------------------------------------------------------------------------- /BatchRenderer/TuvokLuaScriptExec.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2012 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /// \author James Hughes 30 | /// \date November 2012 31 | 32 | #ifndef BATCHRENDERER_TUVOKLUASCRIPTEXEC_H 33 | #define BATCHRENDERER_TUVOKLUASCRIPTEXEC_H 34 | 35 | #include 36 | #include 37 | #include "LuaScripting/LuaScripting.h" 38 | #include "BatchContext.h" 39 | 40 | namespace tuvok 41 | { 42 | 43 | /// Simple class to execute a Lua script given a rendering context. 44 | class TuvokLuaScriptExec 45 | { 46 | public: 47 | TuvokLuaScriptExec(); 48 | virtual ~TuvokLuaScriptExec(); 49 | 50 | /// Executes the file given by the parameter 'filename'. 51 | void execFile(const std::string& filename); 52 | 53 | private: 54 | 55 | }; 56 | 57 | } // namespace tuvok 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /BatchRenderer/WGLContext.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2010 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file WGLContext.cpp 31 | \author Tom Fogal 32 | SCI Institute 33 | University of Utah 34 | \brief Establishes an OpenGL context on windows. 35 | */ 36 | 37 | #ifndef TUVOK_WGL_CONTEXT_H 38 | #define TUVOK_WGL_CONTEXT_H 39 | 40 | #include 41 | #include "BatchContext.h" 42 | 43 | namespace tuvok 44 | { 45 | 46 | struct winfo; 47 | 48 | class WGLContext : public BatchContext 49 | { 50 | public: 51 | WGLContext(uint32_t w, uint32_t h, uint8_t color_bits, 52 | uint8_t depth_bits, uint8_t stencil_bits, 53 | bool double_buffer, bool visible); 54 | virtual ~WGLContext(); 55 | 56 | bool isValid() const; 57 | bool makeCurrent(); 58 | bool swapBuffers(); 59 | 60 | private: 61 | std::shared_ptr wi; 62 | }; 63 | 64 | } 65 | 66 | #endif /* TUVOK_WGL_CONTEXT_H */ 67 | -------------------------------------------------------------------------------- /BatchRenderer/testNSContext.mm: -------------------------------------------------------------------------------- 1 | // clang++ testNSContext.mm -o testNSContext -framework Cocoa -framework OpenGL 2 | 3 | // When building the batch renderer project with qmake, I found that the 4 | // OpenGL context was only usable with explicit context declaration 5 | // through CGMacros and ctx_obj. This file helps eliminate makefile 6 | // variables. 7 | // As it turns out, this is something related to the settings in qmake... 8 | 9 | #include 10 | #import 11 | #import 12 | 13 | // Simple error reporting macros to help keep the sample code clean 14 | #define REPORTGLERROR(task) { GLenum tGLErr = glGetError(); if (tGLErr != GL_NO_ERROR) { std::cout << "OpenGL error " << tGLErr << " while " << task << "\n"; } } 15 | #define REPORT_ERROR_AND_EXIT(desc) { std::cout << desc << "\n"; return 1; } 16 | #define NULL_ERROR_EXIT(test, desc) { if (!test) REPORT_ERROR_AND_EXIT(desc); } 17 | 18 | int main (int argc, char * const argv[]) 19 | { 20 | NSOpenGLPixelBuffer* pixBuf; 21 | NSOpenGLContext* openGLContext; 22 | 23 | NSOpenGLPixelFormatAttribute attributes[] = { 24 | NSOpenGLPFANoRecovery, 25 | NSOpenGLPFAAccelerated, 26 | NSOpenGLPFADepthSize, 24, 27 | (NSOpenGLPixelFormatAttribute) 0 28 | }; 29 | 30 | NSOpenGLPixelFormat* pixFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease]; 31 | 32 | // OpenGL context 33 | openGLContext = [[NSOpenGLContext alloc] initWithFormat:pixFormat shareContext:nil]; 34 | NULL_ERROR_EXIT(openGLContext, "Unable to create NSOpenGLContext"); 35 | 36 | [openGLContext makeCurrentContext]; 37 | 38 | // Test very basic calls to OpenGL 39 | const GLubyte* vendor = glGetString(GL_VENDOR); 40 | const GLubyte* renderer = glGetString(GL_RENDERER); 41 | const GLubyte* versionl = glGetString(GL_VERSION); 42 | 43 | if (vendor && renderer && versionl) 44 | std::cerr << "OpenGL initialization. Running on a " << vendor << " " 45 | << renderer << " with OpenGL version " << versionl << std::endl; 46 | else 47 | std::cerr << "Unable to obtain OpenGL strings." << std::endl; 48 | 49 | // Cleanup 50 | [openGLContext clearDrawable]; 51 | [openGLContext release]; 52 | 53 | return 0; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /CmdLineConverter/CmdLineConverter.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | win32:TEMPLATE = vcapp 3 | CONFIG += exceptions largefile qt rtti static stl warn_on 4 | macx:CONFIG += app_bundle 5 | macx:DEFINES += QT_MAC_USE_COCOA=1 6 | TARGET = Build/UVFConverter 7 | unix:TARGET = Build/uvfconvert 8 | macx { 9 | DESTDIR = Build 10 | TARGET = uvfconvert 11 | } 12 | QT = core gui opengl 13 | incpath = ../Tuvok/3rdParty/GLEW 14 | incpath += ../Tuvok/IO/3rdParty/boost/ 15 | incpath += ../Tuvok/IO/exception 16 | incpath += ../Tuvok/Basics 17 | incpath += ../Tuvok/Basics/3rdParty 18 | incpath += ../Tuvok 19 | DEPENDPATH += $$incpath 20 | INCLUDEPATH += $$incpath 21 | QMAKE_LIBDIR += ../Tuvok/Build ../Tuvok/IO/expressions 22 | LIBS += -lTuvok -ltuvokexpr 23 | unix:LIBS += -lz 24 | win32:LIBS += shlwapi.lib 25 | macx:QMAKE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7 26 | macx:QMAKE_CFLAGS += -mmacosx-version-min=10.7 27 | macx:LIBS += -stdlib=libc++ -framework CoreFoundation 28 | macx:LIBS += -mmacosx-version-min=10.7 29 | QMAKE_CXXFLAGS_WARN_ON += -Wno-unknown-pragmas 30 | !macx:unix:QMAKE_LFLAGS += -fopenmp 31 | # Try to link to GLU statically. 32 | gludirs = /usr/lib /usr/lib/x86_64-linux-gnu 33 | found=false 34 | for(d, gludirs) { 35 | if(exists($${d}/libGLU.a)) { 36 | LIBS += $${d}/libGLU.a 37 | found=true 38 | } 39 | } 40 | if(!found) { 41 | # not mac: GLU comes in the GL framework. 42 | unix:!macx:LIBS += -lGLU 43 | } 44 | unix:!macx:LIBS += -lGL 45 | 46 | # Find the location of QtGui's prl file, and include it here so we can look at 47 | # the QMAKE_PRL_CONFIG variable. 48 | TEMP = $$[QT_INSTALL_LIBS] libQtGui.prl 49 | PRL = $$[QT_INSTALL_LIBS] QtGui.framework/QtGui.prl 50 | TEMP = $$join(TEMP, "/") 51 | PRL = $$join(PRL, "/") 52 | exists($$TEMP) { 53 | include($$TEMP) 54 | } 55 | exists($$PRL) { 56 | include($$PRL) 57 | } 58 | 59 | ### Should we link Qt statically or as a shared lib? 60 | # If the PRL config contains the `shared' configuration, then the installed 61 | # Qt is shared. In that case, disable the image plugins. 62 | contains(QMAKE_PRL_CONFIG, shared) { 63 | QTPLUGIN -= qgif qjpeg qtiff 64 | } else { 65 | QTPLUGIN += qgif qjpeg qtiff 66 | } 67 | 68 | unix:QMAKE_CXXFLAGS += -std=c++0x 69 | unix:QMAKE_CXXFLAGS += -fno-strict-aliasing 70 | unix:QMAKE_CFLAGS += -fno-strict-aliasing 71 | 72 | # Input 73 | HEADERS += DebugOut/HRConsoleOut.h 74 | 75 | 76 | SOURCES += DebugOut/HRConsoleOut.cpp \ 77 | main.cpp 78 | -------------------------------------------------------------------------------- /CmdLineConverter/DebugOut/HRConsoleOut.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file HRConsoleOut.cpp 31 | \author Jens Krueger 32 | SCI Institute 33 | University of Utah 34 | \version 1.0 35 | \date August 2008 36 | */ 37 | 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #include "HRConsoleOut.h" 44 | #include "../../Tuvok/Basics/Console.h" 45 | 46 | HRConsoleOut::HRConsoleOut() : 47 | m_iLengthLastMessage(0), 48 | m_bClearOldMessage(false) 49 | { 50 | } 51 | 52 | HRConsoleOut::~HRConsoleOut() { 53 | } 54 | 55 | void HRConsoleOut::printf(enum DebugChannel channel, const char*, 56 | const char* msg) 57 | { 58 | char buff[16384]; 59 | #ifdef WIN32 60 | strncpy_s(buff, 16384, msg, 16384); 61 | #else 62 | strncpy(buff, msg, 16384); 63 | #endif 64 | 65 | if (m_bClearOldMessage) { 66 | // Remove any newlines from the string. 67 | for (size_t i=0;i 2 | 3 | 4 | 5 | {c1471151-b033-44b0-b041-38c2035de411} 6 | 7 | 8 | 9 | 10 | DebugOut 11 | 12 | 13 | 14 | 15 | 16 | DebugOut 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /DemoData/c60.uvf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/DemoData/c60.uvf -------------------------------------------------------------------------------- /ExtractDebugInfo/ExtractDebugInfo.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | win32:TEMPLATE = vcapp 3 | CONFIG += exceptions largefile rtti static stl warn_on 4 | CONFIG -= app_bundle 5 | macx:DEFINES += QT_MAC_USE_COCOA=1 6 | TARGET = Build/ExtractDebugInfo 7 | macx { 8 | DESTDIR = Build 9 | TARGET = ExtractDebugInfo 10 | } 11 | DEPENDPATH += . 12 | INCLUDEPATH += . ../ ../Tuvok/Basics/3rdParty ../Tuvok 13 | QMAKE_LIBDIR += ../Tuvok/Build ../Tuvok/IO/expressions 14 | LIBS = -lTuvok -ltuvokexpr 15 | QT += opengl 16 | unix:LIBS += -lz 17 | win32:LIBS += shlwapi.lib 18 | unix:!macx:LIBS += -lGLU 19 | QMAKE_CXXFLAGS_WARN_ON += -Wno-unknown-pragmas 20 | !macx:unix:QMAKE_LFLAGS += -fopenmp 21 | 22 | # Try to link to GLU statically. 23 | gludirs = /usr/lib /usr/lib/x86_64-linux-gnu 24 | for(d, gludirs) { 25 | if(exists($${d}/libGLU.a) && static) { 26 | LIBS -= -lGLU 27 | LIBS += $${d}/libGLU.a 28 | } 29 | } 30 | unix:QMAKE_CXXFLAGS += -std=c++0x 31 | unix:QMAKE_CXXFLAGS += -fno-strict-aliasing 32 | unix:QMAKE_CFLAGS += -fno-strict-aliasing 33 | 34 | macx:QMAKE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7 35 | macx:QMAKE_CFLAGS += -mmacosx-version-min=10.7 36 | macx:LIBS += -stdlib=libc++ -framework CoreFoundation -mmacosx-version-min=10.7 37 | 38 | # Find the location of QtGui's prl file, and include it here so we can look at 39 | # the QMAKE_PRL_CONFIG variable. 40 | TEMP = $$[QT_INSTALL_LIBS] libQtGui.prl 41 | PRL = $$[QT_INSTALL_LIBS] QtGui.framework/QtGui.prl 42 | TEMP = $$join(TEMP, "/") 43 | PRL = $$join(PRL, "/") 44 | exists($$TEMP) { 45 | include($$TEMP) 46 | } 47 | exists($$PRL) { 48 | include($$PRL) 49 | } 50 | 51 | ### Should we link Qt statically or as a shared lib? 52 | # If the PRL config contains the `shared' configuration, then the installed 53 | # Qt is shared. In that case, disable the image plugins. 54 | contains(QMAKE_PRL_CONFIG, shared) { 55 | QTPLUGIN -= qgif qjpeg qtiff 56 | } else { 57 | QTPLUGIN += qgif qjpeg qtiff 58 | } 59 | 60 | # Input 61 | 62 | SOURCES += main.cpp 63 | -------------------------------------------------------------------------------- /IV3D.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIconFile 6 | ImageVis3D.icns 7 | CFBundlePackageType 8 | APPL 9 | CFBundleGetInfoString 10 | 11 | Scientific Computing and Imaging Institute 12 | University of Utah 13 | 72 S Central Campus Drive 14 | 3750 WEB 15 | Salt Lake City, UT 84112 16 | USA 17 | 18 | CFBundleShortVersionString 19 | VERSION 20 | CFBundleSignature 21 | IV3D 22 | CFBundleExecutable 23 | ImageVis3D 24 | NOTE 25 | Please, do NOT change this file -- It was generated by Qt/QMake. 26 | 27 | 28 | -------------------------------------------------------------------------------- /ImageVis3D.pro: -------------------------------------------------------------------------------- 1 | ###################################################################### 2 | # Generated by Jens Krueger 3 | ###################################################################### 4 | 5 | SUBDIRS = Tuvok/IO/expressions Tuvok Tuvok/doc/genlua ImageVis3D CmdLineConverter ExtractDebugInfo UVFReader BatchRenderer 6 | TEMPLATE = subdirs 7 | CONFIG += ordered 8 | -------------------------------------------------------------------------------- /ImageVis3D/DebugOut/QTLabelOut.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file QTLabelOut.cpp 31 | \author Jens Krueger 32 | SCI Institute 33 | University of Utah 34 | \version 1.0 35 | \date September 2008 36 | */ 37 | 38 | #include "QTLabelOut.h" 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #ifdef WIN32 46 | #include 47 | // undef stupid windows defines to max and min 48 | #ifdef max 49 | #undef max 50 | #endif 51 | 52 | #ifdef min 53 | #undef min 54 | #endif 55 | #endif 56 | 57 | QTLabelOut::QTLabelOut(QLabel *label, QDialog *parent) : 58 | m_label(label), 59 | m_parent(parent) 60 | { 61 | } 62 | 63 | QTLabelOut::~QTLabelOut() { 64 | } 65 | 66 | void QTLabelOut::printf(enum DebugChannel, const char*, 67 | const char* buff) 68 | { 69 | if(!m_label) return; 70 | 71 | std::ostringstream text; 72 | text << buff; 73 | m_label->setText(text.str().c_str()); 74 | m_label->update(); 75 | QCoreApplication::processEvents(); 76 | } 77 | 78 | void QTLabelOut::printf(const char *s) const 79 | { 80 | if(!m_label) return; 81 | 82 | m_label->setText(s); 83 | m_label->update(); 84 | QCoreApplication::processEvents(); 85 | } 86 | -------------------------------------------------------------------------------- /ImageVis3D/DebugOut/QTLabelOut.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file QTLabelOut.h 31 | \author Jens Krueger 32 | SCI Institute 33 | University of Utah 34 | \version 1.0 35 | \date August 2008 36 | */ 37 | 38 | 39 | #pragma once 40 | 41 | #ifndef QTLABELOUT_H 42 | #define QTLABELOUT_H 43 | 44 | #include "../../Tuvok/DebugOut/AbstrDebugOut.h" 45 | #include 46 | #include 47 | 48 | class QTLabelOut : public AbstrDebugOut { 49 | public: 50 | QTLabelOut(QLabel *label, QDialog *parent); 51 | virtual ~QTLabelOut(); 52 | 53 | virtual void printf(enum DebugChannel, const char* source, 54 | const char* msg); 55 | virtual void printf(const char *s) const; 56 | 57 | private: 58 | QLabel *m_label; 59 | QDialog *m_parent; 60 | 61 | void _printf(const char* format, ...) const; 62 | }; 63 | 64 | #endif // QTLABELOUT_H 65 | -------------------------------------------------------------------------------- /ImageVis3D/DebugOut/QTOut.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file QTOut.cpp 31 | \author Jens Krueger 32 | SCI Institute 33 | University of Utah 34 | \version 1.0 35 | \date September 2008 36 | */ 37 | 38 | #include "QTOut.h" 39 | #include 40 | #include 41 | #include 42 | 43 | using namespace std; 44 | 45 | #ifdef WIN32 46 | #include 47 | // undef stupid windows defines to max and min 48 | #ifdef max 49 | #undef max 50 | #endif 51 | 52 | #ifdef min 53 | #undef min 54 | #endif 55 | #endif 56 | 57 | QTOut::QTOut(QListWidget *listWidget) : 58 | m_listWidget(listWidget) 59 | { 60 | Message("QTOut::QTOut","Starting up QTListviewDebug out"); 61 | } 62 | 63 | QTOut::~QTOut() { 64 | Message("QTOut::~QTOut","Shutting down QTListviewDebug out"); 65 | } 66 | 67 | void QTOut::printf(enum DebugChannel channel, const char* source, 68 | const char* buff) 69 | { 70 | std::ostringstream msg; 71 | msg << ChannelToString(channel) << " (" << source << "): " << buff; 72 | 73 | m_listWidget->addItem(msg.str().c_str()); 74 | 75 | if(static_cast(channel) < m_bRecordLists.size() && 76 | m_bRecordLists[channel]) { 77 | m_strLists[channel].push_back(msg.str()); 78 | } 79 | } 80 | 81 | void QTOut::printf(const char *s) const 82 | { 83 | m_listWidget->addItem(s); 84 | 85 | // Can't record on a channel.. we don't know what channel this is! 86 | } 87 | -------------------------------------------------------------------------------- /ImageVis3D/DebugOut/QTOut.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file QTOut.h 31 | \author Jens Krueger 32 | SCI Institute 33 | University of Utah 34 | \version 1.0 35 | \date August 2008 36 | */ 37 | 38 | 39 | #pragma once 40 | 41 | #ifndef QTOut_H 42 | #define QTOut_H 43 | 44 | #include "../../Tuvok/DebugOut/AbstrDebugOut.h" 45 | #include 46 | 47 | class QTOut : public AbstrDebugOut { 48 | public: 49 | QTOut(QListWidget *listWidget); 50 | virtual ~QTOut(); 51 | 52 | virtual void printf(enum DebugChannel, const char* source, 53 | const char* msg); 54 | virtual void printf(const char *s) const; 55 | 56 | private: 57 | QListWidget *m_listWidget; 58 | 59 | void _printf(const char* format, ...) const; 60 | }; 61 | 62 | #endif // QTOut_H 63 | -------------------------------------------------------------------------------- /ImageVis3D/IO/3rdParty/ioapi.h: -------------------------------------------------------------------------------- 1 | /* ioapi.h -- IO base function header for compress/uncompress .zip 2 | files using zlib + zip or unzip API 3 | 4 | Version 1.01h, December 28th, 2009 5 | 6 | Copyright (C) 1998-2009 Gilles Vollant 7 | */ 8 | 9 | #ifndef _ZLIBIOAPI_H 10 | #define _ZLIBIOAPI_H 11 | 12 | 13 | #define ZLIB_FILEFUNC_SEEK_CUR (1) 14 | #define ZLIB_FILEFUNC_SEEK_END (2) 15 | #define ZLIB_FILEFUNC_SEEK_SET (0) 16 | 17 | #define ZLIB_FILEFUNC_MODE_READ (1) 18 | #define ZLIB_FILEFUNC_MODE_WRITE (2) 19 | #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) 20 | 21 | #define ZLIB_FILEFUNC_MODE_EXISTING (4) 22 | #define ZLIB_FILEFUNC_MODE_CREATE (8) 23 | 24 | 25 | #ifndef ZCALLBACK 26 | 27 | #if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) 28 | #define ZCALLBACK CALLBACK 29 | #else 30 | #define ZCALLBACK 31 | #endif 32 | #endif 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); 39 | typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); 40 | typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); 41 | typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); 42 | typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); 43 | typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); 44 | typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); 45 | 46 | typedef struct zlib_filefunc_def_s 47 | { 48 | open_file_func zopen_file; 49 | read_file_func zread_file; 50 | write_file_func zwrite_file; 51 | tell_file_func ztell_file; 52 | seek_file_func zseek_file; 53 | close_file_func zclose_file; 54 | testerror_file_func zerror_file; 55 | voidpf opaque; 56 | } zlib_filefunc_def; 57 | 58 | 59 | 60 | void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 61 | 62 | #define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size)) 63 | #define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size)) 64 | #define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream)) 65 | #define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode)) 66 | #define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream)) 67 | #define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream)) 68 | 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | 74 | #endif 75 | 76 | -------------------------------------------------------------------------------- /ImageVis3D/IO/DialogConverter.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file DialogConverter.h 31 | \author Jens Krueger 32 | SCI Institute 33 | University of Utah 34 | \version 1.0 35 | \date December 2008 36 | */ 37 | 38 | 39 | #pragma once 40 | 41 | #ifndef DIALOGCONVERTER_H 42 | #define DIALOGCONVERTER_H 43 | 44 | #include "../Tuvok/IO/RAWConverter.h" 45 | #include 46 | 47 | class DialogConverter : public RAWConverter { 48 | public: 49 | DialogConverter(QWidget* parent); 50 | virtual ~DialogConverter() {} 51 | 52 | virtual bool ConvertToRAW(const std::string& strSourceFilename, 53 | const std::string& strTempDir, bool bNoUserInteraction, 54 | uint64_t& iHeaderSkip, unsigned& iComponentSize, uint64_t& iComponentCount, 55 | bool& bConvertEndianess, bool& bSigned, bool& bIsFloat, UINT64VECTOR3& vVolumeSize, 56 | FLOATVECTOR3& vVolumeAspect, std::string& strTitle, 57 | std::string& strIntermediateFile, 58 | bool& bDeleteIntermediateFile); 59 | 60 | protected: 61 | QWidget* m_parent; 62 | 63 | }; 64 | 65 | #endif // DIALOGCONVERTER_H 66 | -------------------------------------------------------------------------------- /ImageVis3D/IO/ZipFile.cpp: -------------------------------------------------------------------------------- 1 | #include "ZipFile.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "IO/3rdParty/zip.h" 8 | 9 | ZipFile::ZipFile() 10 | : m_zf(nullptr), m_writable(false), m_selectedFilename() 11 | { 12 | 13 | } 14 | 15 | ZipFile::~ZipFile() 16 | { 17 | close(); 18 | } 19 | 20 | bool ZipFile::openZip(std::string const& filename) 21 | { 22 | close(); 23 | 24 | m_zf = zipOpen(filename.c_str(), APPEND_STATUS_CREATE); 25 | return (m_zf != nullptr); 26 | } 27 | 28 | bool ZipFile::selectFileInZip(std::string const& filename) 29 | { 30 | if (m_zf == nullptr) 31 | return m_writable = false; 32 | 33 | if (m_writable) { 34 | // close previously opened file in zip 35 | int err = zipCloseFileInZip(m_zf); 36 | if (err != ZIP_OK) 37 | return m_writable = false; 38 | } 39 | 40 | std::time_t t = std::time(nullptr); // now 41 | std::tm * now = std::localtime(&t); 42 | 43 | zip_fileinfo fi; 44 | fi.tmz_date.tm_sec = now->tm_sec; 45 | fi.tmz_date.tm_min = now->tm_min; 46 | fi.tmz_date.tm_hour = now->tm_hour; 47 | fi.tmz_date.tm_mday = now->tm_mday; 48 | fi.tmz_date.tm_mon = now->tm_mon; 49 | fi.tmz_date.tm_year = now->tm_year; 50 | fi.dosDate = 0; 51 | fi.internal_fa = 0; 52 | fi.external_fa = 0; 53 | 54 | int err = zipOpenNewFileInZip(m_zf, filename.c_str(), &fi, nullptr, 0, nullptr, 0, nullptr, Z_DEFLATED, Z_DEFAULT_COMPRESSION); 55 | 56 | if (err == ZIP_OK) 57 | m_selectedFilename = filename; 58 | 59 | return m_writable = (err == ZIP_OK); 60 | } 61 | 62 | bool ZipFile::copyFileToZip(std::string const& srcFilename, std::string const& dstFilename) 63 | { 64 | if (!selectFileInZip(dstFilename.empty() ? srcFilename : dstFilename)) 65 | return false; 66 | 67 | std::ifstream fs; 68 | fs.open(srcFilename.c_str(), std::fstream::in | std::fstream::binary); 69 | 70 | bool success = false; 71 | 72 | if (fs.is_open()) 73 | { 74 | success = true; 75 | fs.seekg(0, fs.end); 76 | size_t fileSize = fs.tellg(); 77 | fs.seekg(0, fs.beg); 78 | 79 | const size_t bufferSize = std::min(size_t(1024 * 1024 * 10), fileSize); 80 | char * buffer = new char[bufferSize]; 81 | size_t bytesTotal = 0; 82 | 83 | while (fs.good()) 84 | { 85 | fs.read(buffer, bufferSize); 86 | size_t readBytes = fs.gcount(); 87 | if (!writeToZip(buffer, (uint32_t)readBytes)) 88 | { 89 | success = false; 90 | break; 91 | } 92 | bytesTotal += readBytes; 93 | } 94 | 95 | fs.close(); 96 | success = (fileSize == bytesTotal); 97 | 98 | // clean up 99 | if (buffer != nullptr) { 100 | delete[] buffer; 101 | buffer = nullptr; 102 | } 103 | } 104 | return success; 105 | } 106 | 107 | bool ZipFile::writeToZip(char const * const bytes, uint32_t length) 108 | { 109 | if (m_zf == nullptr || m_writable == false) 110 | return false; 111 | 112 | int err = zipWriteInFileInZip(m_zf, bytes, length); 113 | return (err == ZIP_OK); 114 | } 115 | 116 | bool ZipFile::close() 117 | { 118 | if (m_zf == nullptr) 119 | return false; 120 | 121 | int err = 0; 122 | 123 | if (m_writable) { 124 | err = zipCloseFileInZip(m_zf); 125 | m_writable = false; 126 | m_selectedFilename = ""; 127 | } 128 | 129 | err = zipClose(m_zf, nullptr); 130 | m_zf = nullptr; 131 | 132 | return (err == ZIP_OK); 133 | } 134 | -------------------------------------------------------------------------------- /ImageVis3D/IO/ZipFile.h: -------------------------------------------------------------------------------- 1 | #ifndef IV3D_ZIP_FILE_H 2 | #define IV3D_ZIP_FILE_H 3 | 4 | #include 5 | #include 6 | 7 | typedef void * zipFile; 8 | 9 | class ZipFile { 10 | public: 11 | ZipFile(); 12 | ~ZipFile(); 13 | bool openZip(std::string const& filename); 14 | bool selectFileInZip(std::string const& filename); 15 | bool copyFileToZip(std::string const& srcfilename, std::string const& dstFilename = ""); 16 | bool writeToZip(char const * const bytes, uint32_t length); 17 | bool close(); 18 | std::string const& getSelectedFilenameInZip() const { return m_selectedFilename; } 19 | private: 20 | zipFile m_zf; 21 | bool m_writable; 22 | std::string m_selectedFilename; 23 | }; 24 | 25 | #endif /* IV3D_ZIP_FILE_H */ 26 | 27 | /* 28 | The MIT License 29 | 30 | Copyright (c) 2011 Interactive Visualization and Data Analysis Group 31 | 32 | Permission is hereby granted, free of charge, to any person obtaining a 33 | copy of this software and associated documentation files (the "Software"), 34 | to deal in the Software without restriction, including without limitation 35 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 36 | and/or sell copies of the Software, and to permit persons to whom the 37 | Software is furnished to do so, subject to the following conditions: 38 | 39 | The above copyright notice and this permission notice shall be included 40 | in all copies or substantial portions of the Software. 41 | 42 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 43 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 44 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 45 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 46 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 47 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 48 | DEALINGS IN THE SOFTWARE. 49 | */ 50 | -------------------------------------------------------------------------------- /ImageVis3D/ImageVis3D.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Resources/imagevis3dmini.png 4 | Resources/imagevis3d.png 5 | Resources/icon_16.png 6 | Resources/icon_32.png 7 | Resources/icon_64.png 8 | Resources/icon_Update.png 9 | Resources/bug.png 10 | 11 | -------------------------------------------------------------------------------- /ImageVis3D/Resources/ImageVis3D.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/ImageVis3D.icns -------------------------------------------------------------------------------- /ImageVis3D/Resources/ImageVis3D.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/ImageVis3D.ico -------------------------------------------------------------------------------- /ImageVis3D/Resources/ImageVis3D.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "ImageVis3D.ico" -------------------------------------------------------------------------------- /ImageVis3D/Resources/bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/bug.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/icon_128.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/icon_16.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/icon_256.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/icon_32.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/icon_512.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/icon_64.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/icon_Update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/icon_Update.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/imagevis3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/imagevis3d.png -------------------------------------------------------------------------------- /ImageVis3D/Resources/imagevis3dmini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/Resources/imagevis3dmini.png -------------------------------------------------------------------------------- /ImageVis3D/StdDefines.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \file StdDefines.h 31 | \author Jens Krueger 32 | SCI Institute 33 | University of Utah 34 | \date October 2008 35 | */ 36 | 37 | #pragma once 38 | 39 | #ifndef STDIMAGEVISDEFINES_H 40 | #define STDIMAGEVISDEFINES_H 41 | 42 | #include "../Tuvok/StdTuvokDefines.h" 43 | 44 | #define IV3D_MAJOR 3 45 | #define IV3D_MINOR 1 46 | #define IV3D_PATCH 0 47 | 48 | #define IV3D_VERSION "3.1.0+" 49 | #define IV3D_VERSION_TYPE "Developer Build" 50 | 51 | #define MANUAL_NAME "ImageVis3D.pdf" 52 | #define HELP_URL "http://hpc.uni-due.de/data/IV3D/ImageVis3D.pdf" 53 | #define TUTORIAL_URL "http://www.imagevis3d.org/" 54 | #define DEMO_DATA_URL "http://www.sci.utah.edu/download/IV3DData.html" 55 | #define DEBUG_DUMP_SERVER "ftp://ftp.sci.utah.edu" 56 | #define DEBUG_DUMP_PATH "upload/ImageVis3D/" 57 | #define UPDATE_VERSION_PATH "http://www.sci.utah.edu/devbuilds/imagevis3d/" 58 | #define UPDATE_NIGHTLY_PATH "http://www.sci.utah.edu/devbuilds/imagevis3d/" 59 | #define UPDATE_STABLE_PATH "http://www.sci.utah.edu/download/imagevis3d.html" 60 | #define SCI_ORGANIZATION_DOMAIN "http://software.sci.utah.edu/" 61 | #ifdef DETECTED_OS_WINDOWS 62 | #define UPDATE_FILE "ImageVis3D-Windows-Latest.zip" 63 | #define UPDATE_VERSION_FILE "Windows_Latest_Version.txt" 64 | #endif 65 | 66 | #ifdef DETECTED_OS_APPLE 67 | #define UPDATE_FILE "ImageVis3D-OSX-10.5-Latest.zip" 68 | #define UPDATE_VERSION_FILE "OSX_Latest_Version.txt" 69 | #endif 70 | 71 | #ifdef DETECTED_OS_LINUX 72 | #define UPDATE_FILE "ImageVis3D-Linux-Latest.zip" 73 | #define UPDATE_VERSION_FILE "Linux_Latest_Version.txt" 74 | #endif 75 | 76 | // make sure they have a definition, so code that uses the defines always 77 | // compiles... even if that definition doesn't exactly make sense. 78 | #ifndef UPDATE_FILE 79 | # define UPDATE_FILE "ImageVis3D-Unsupported-Latest.zip" 80 | #endif 81 | #ifndef UPDATE_VERSION_FILE 82 | # define UPDATE_VERSION_FILE "Unsupported-Latest-Version.txt" 83 | #endif 84 | 85 | #endif // STDIMAGEVISDEFINES_H 86 | -------------------------------------------------------------------------------- /ImageVis3D/UI/AboutDlg.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : AboutDlg.cpp 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2009 SCI Institute 37 | 38 | #include "AboutDlg.h" 39 | 40 | AboutDlg::AboutDlg(QString title, QString desc, QWidget* parent, Qt::WindowFlags flags) : 41 | QDialog(parent, flags) 42 | { 43 | setupUi(this); 44 | label_logo->setPixmap(QPixmap::fromImage(QImage(":/Resources/imagevis3d.png"))); 45 | setWindowTitle(title); 46 | label_AboutText->setText(desc); 47 | } 48 | 49 | AboutDlg::~AboutDlg(void) 50 | { 51 | } 52 | 53 | void AboutDlg::CheckUpdates() 54 | { 55 | accept(); 56 | emit CheckUpdatesClicked(); 57 | } 58 | 59 | void AboutDlg::OnlineVideoTut() 60 | { 61 | accept(); 62 | emit OnlineVideoTutClicked(); 63 | } 64 | 65 | void AboutDlg::OnlineHelp() 66 | { 67 | accept(); 68 | emit OnlineHelpClicked(); 69 | } 70 | 71 | void AboutDlg::ReportABug() 72 | { 73 | accept(); 74 | emit ReportABugClicked(); 75 | } 76 | -------------------------------------------------------------------------------- /ImageVis3D/UI/AboutDlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : AboutDlg.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef ABOUTDLG_H 39 | #define ABOUTDLG_H 40 | 41 | #include "AutoGen/ui_About.h" 42 | #include 43 | #include 44 | #include 45 | 46 | class AboutDlg : public QDialog, protected Ui_About 47 | { 48 | Q_OBJECT 49 | public: 50 | AboutDlg(QString title, QString desc, QWidget* parent, Qt::WindowFlags flags = Qt::Tool); 51 | virtual ~AboutDlg(); 52 | 53 | 54 | protected slots: 55 | virtual void CheckUpdates(); 56 | virtual void OnlineVideoTut(); 57 | virtual void OnlineHelp(); 58 | virtual void ReportABug(); 59 | 60 | signals: 61 | void CheckUpdatesClicked(); 62 | void OnlineVideoTutClicked(); 63 | void OnlineHelpClicked(); 64 | void ReportABugClicked(); 65 | 66 | }; 67 | 68 | #endif // ABOUTDLG_H 69 | -------------------------------------------------------------------------------- /ImageVis3D/UI/BrowseData.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | //! File : BrowseData.h 29 | //! Author : Jens Krueger 30 | //! SCI Institute 31 | //! University of Utah 32 | //! Date : September 2008 33 | // 34 | //! Copyright (C) 2008 SCI Institute 35 | #pragma once 36 | 37 | #ifndef BROWSEDATA_H 38 | #define BROWSEDATA_H 39 | 40 | #include 41 | #include "AutoGen/ui_BrowseData.h" 42 | #include "../Tuvok/Controller/MasterController.h" 43 | #include "QDataRadioButton.h" 44 | 45 | using namespace tuvok; 46 | 47 | class BrowseData : public QDialog, protected Ui_BrowseData 48 | { 49 | Q_OBJECT 50 | public: 51 | BrowseData(MasterController& pMasterController, QDialog* pleaseWaitDialog, QString strDir, QWidget* parent = 0, Qt::WindowFlags flags = 0); 52 | virtual ~BrowseData(); 53 | 54 | bool DataFound() {return m_bDataFound;} 55 | 56 | std::shared_ptr GetStackInfo() { 57 | return m_dirInfo[m_iSelected]; 58 | } 59 | 60 | protected slots: 61 | virtual void accept(); 62 | virtual void SetBrightness(int iScale); 63 | 64 | private: 65 | MasterController& m_MasterController; 66 | bool m_bDataFound; 67 | QString m_strDir; 68 | std::vector m_vRadioButtons; 69 | std::vector> m_dirInfo; 70 | size_t m_iSelected; 71 | 72 | bool FillTable(QDialog* pleaseWaitDialog); 73 | virtual void showEvent (QShowEvent* event); 74 | }; 75 | #endif // BROWSEDATA_H 76 | -------------------------------------------------------------------------------- /ImageVis3D/UI/BugRepDlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : BugRepDlg.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef BUGREPDLG_H 39 | #define BUGREPDLG_H 40 | 41 | #include "AutoGen/ui_BugRepDlg.h" 42 | #include 43 | #include 44 | #include 45 | 46 | class BugRepDlg : public QDialog, protected Ui_BugRepDlg 47 | { 48 | Q_OBJECT 49 | public: 50 | BugRepDlg(QWidget* parent, Qt::WindowFlags flags = Qt::Tool, const std::string& strSubmitFile=""); 51 | virtual ~BugRepDlg(); 52 | 53 | std::string GetDescription() const; 54 | bool SubmitSysinfo() const; 55 | bool SubmitLog() const; 56 | std::string GetUsername() const; 57 | std::string GetUserMail() const; 58 | std::vector GetDataFilenames() const; 59 | 60 | void SetSubmitSysinfo(bool bSubmitSysinfo); 61 | void SetSubmitLog(bool bSubmitLog); 62 | void SetUsername(std::string strName); 63 | void SetUserMail(std::string strMail); 64 | 65 | /// @return false if the data to submit are invalid. 66 | bool Validate(std::string &err) const; 67 | 68 | protected slots: 69 | void AddFiles(); 70 | void RemoveFile(); 71 | 72 | }; 73 | 74 | #endif // BUGREPDLG_H 75 | -------------------------------------------------------------------------------- /ImageVis3D/UI/CrashDetDlg.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : CrashDetDlg.cpp 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #include "CrashDetDlg.h" 39 | 40 | CrashDetDlg::CrashDetDlg(QString title, QString desc, bool bDontShowAgain, QWidget* parent, Qt::WindowFlags flags) : 41 | QDialog(parent, flags) 42 | { 43 | setupUi(this); 44 | checkBox_DontShowAgain->setChecked(bDontShowAgain); 45 | setWindowTitle(title); 46 | label_desc->setText(desc); 47 | } 48 | 49 | CrashDetDlg::~CrashDetDlg(void) 50 | { 51 | } 52 | 53 | -------------------------------------------------------------------------------- /ImageVis3D/UI/CrashDetDlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : CrashDetDlg.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef CRASHDETDLG_H 39 | #define CRASHDETDLG_H 40 | 41 | #include "AutoGen/ui_CrashDetDlg.h" 42 | #include 43 | #include 44 | #include 45 | 46 | class CrashDetDlg : public QDialog, protected Ui_CrashDetDlg 47 | { 48 | Q_OBJECT 49 | public: 50 | CrashDetDlg(QString title, QString desc, bool bDontShowAgain, QWidget* parent, Qt::WindowFlags flags = Qt::Tool); 51 | virtual ~CrashDetDlg(); 52 | 53 | bool GetDontShowAgain() {return checkBox_DontShowAgain->isChecked();} 54 | }; 55 | 56 | #endif // CRASHDETDLG_H 57 | -------------------------------------------------------------------------------- /ImageVis3D/UI/DatasetServerDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : DatasetServerDialog.h 31 | //! Author : Jens Krueger 32 | //! DFKI & MMCI, Saarbruecken 33 | //! SCI Institute, University of Utah 34 | //! Date : March 2010 35 | // 36 | //! Copyright (C) 2010 DFKI, MMCI, SCI Institute 37 | 38 | #pragma once 39 | 40 | #ifndef DATASETSERVERDIALOG_H 41 | #define DATASETSERVERDIALOG_H 42 | 43 | #include 44 | 45 | QT_BEGIN_NAMESPACE 46 | class QLineEdit; 47 | class QLabel; 48 | class QPushButton; 49 | class QTcpServer; 50 | class QListWidget; 51 | class QToolButton; 52 | QT_END_NAMESPACE 53 | 54 | #include 55 | #include 56 | #include 57 | 58 | class DatasetServerDialog : public QDialog 59 | { 60 | Q_OBJECT 61 | 62 | public: 63 | DatasetServerDialog(std::string strTempDir, QWidget *parent = 0); 64 | ~DatasetServerDialog(); 65 | 66 | private slots: 67 | void toggleServers(); 68 | void addDataset(); 69 | void removeDataset(); 70 | void select1DTFile(); 71 | void selectVolFile(); 72 | 73 | private: 74 | QListWidget* datasetList; 75 | QLabel *statusLabel; 76 | QPushButton *startButton; 77 | QPushButton *quitButton; 78 | QLabel *labelPort; 79 | QLabel *labelVolFile; 80 | QLabel *label1DTFile; 81 | QLineEdit *editPort; 82 | QLineEdit *editVolFile; 83 | QLineEdit *edit1DTFile; 84 | QPushButton *addButton; 85 | QPushButton *removeButton; 86 | QToolButton *pickVolFile; 87 | QToolButton *pick1DTFile; 88 | 89 | std::vector< DatasetTFPair > aDatasets; 90 | std::string m_strTempDir; 91 | bool m_bRunning; 92 | DatasetServer server; 93 | 94 | void updateListWidgetAndButtons(); 95 | void startServers(); 96 | void stopServers(); 97 | 98 | }; 99 | 100 | #endif //DATASETSERVERDIALOG_H 101 | -------------------------------------------------------------------------------- /ImageVis3D/UI/DebugScriptWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2012 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \brief Combination of the debug window and a new scripting window. 31 | */ 32 | 33 | #ifndef DEBUGSCRIPTWINDOW_H_ 34 | #define DEBUGSCRIPTWINDOW_H_ 35 | 36 | #include 37 | #include "../Tuvok/Controller/MasterController.h" 38 | #include "../Tuvok/LuaScripting/LuaMemberReg.h" 39 | 40 | class QVBoxLayout; 41 | class QTabWidget; 42 | class QPushButton; 43 | class QComboBox; 44 | class QTextEdit; 45 | class QLineEdit; 46 | class QListWidget; 47 | 48 | class DebugScriptWindow: public QDockWidget 49 | { 50 | Q_OBJECT 51 | public: 52 | 53 | DebugScriptWindow(tuvok::MasterController& controller, QWidget* parent); 54 | virtual ~DebugScriptWindow(); 55 | 56 | protected slots: 57 | 58 | void execClicked(); 59 | void oneLineEditOnReturnPressed(); 60 | void oneLineEditOnEdited(const QString&); 61 | void exampComboIndexChanged(int index); 62 | void fixFont(); 63 | 64 | protected: 65 | 66 | bool eventFilter(QObject *obj, QEvent *event); 67 | 68 | private: 69 | 70 | void setupUI(); 71 | void hookLuaFunctions(); 72 | void execLua(const std::string& cmd); 73 | 74 | // Lua registered function hooks. 75 | void hook_logInfo(std::string info); 76 | void hook_logWarning(std::string warn); 77 | void hook_logError(std::string error); 78 | 79 | QVBoxLayout* mMainLayout; 80 | QComboBox* mScriptExamplesBox; 81 | QPushButton* mExecButton; 82 | QListWidget* mListWidget; 83 | 84 | QTextEdit* mScriptTextEdit; 85 | QLineEdit* mScriptOneLineEdit; 86 | 87 | std::vector mSavedInput; 88 | int mSavedInputPos; 89 | 90 | tuvok::MasterController& mController; 91 | tuvok::LuaMemberReg mMemReg; 92 | std::shared_ptr mLua; 93 | 94 | bool mInFixFont; 95 | 96 | 97 | }; 98 | #endif /* DEBUGSCRIPTWINDOW_H_ */ 99 | -------------------------------------------------------------------------------- /ImageVis3D/UI/FTPDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : FTPDialog.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : December 2008 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef FTPDIALOG_H 39 | #define FTPDIALOG_H 40 | 41 | #include "UI/AutoGen/ui_FTPDialog.h" 42 | #include 43 | #include 44 | #include "../Tuvok/Basics/Vectors.h" 45 | 46 | class QFtp; 47 | class QUrlInfo; 48 | class QFile; 49 | 50 | class FTPDialog : public QDialog, protected Ui_FTPDialog 51 | { 52 | Q_OBJECT 53 | public: 54 | FTPDialog(const std::string& strSource, const std::string& strTargetServer, const std::string& strTargetPath, QWidget* parent = 0, Qt::WindowFlags flags = 0); 55 | virtual ~FTPDialog(); 56 | 57 | void Start(); 58 | 59 | protected slots: 60 | void ftpCommandFinished(int commandId, bool error); 61 | void updateDataTransferProgress(qint64 readBytes, qint64 totalBytes); 62 | void AbortTransfer(); 63 | void finished(bool); 64 | 65 | signals: 66 | void TransferFailure(); 67 | void TransferSuccess(); 68 | 69 | private: 70 | std::string m_strSource; 71 | std::string m_strTargetServer; 72 | std::string m_strTargetPath; 73 | QFtp* m_pFtp; 74 | QFile* m_pFile; 75 | 76 | void Disconnect(); 77 | }; 78 | 79 | #endif // FTPDIALOG_H 80 | -------------------------------------------------------------------------------- /ImageVis3D/UI/ImageVis3D.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/UI/ImageVis3D.cpp -------------------------------------------------------------------------------- /ImageVis3D/UI/ImageVis3D_Capturing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/UI/ImageVis3D_Capturing.cpp -------------------------------------------------------------------------------- /ImageVis3D/UI/LODDlg.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : LODDlg.cpp 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #include "LODDlg.h" 39 | 40 | LODDlg::LODDlg(QString title, int iMinLOD, int iMaxLOD, const std::vector< QString >& vvLODs, QWidget* parent, Qt::WindowFlags flags) : 41 | QDialog(parent, flags), 42 | m_vvLODs(vvLODs) 43 | { 44 | setupUi(this); 45 | label_Title->setText(title); 46 | verticalSlider_LOD->setMinimum(iMinLOD); 47 | verticalSlider_LOD->setMaximum(iMaxLOD); 48 | verticalSlider_LOD->setValue(iMinLOD); 49 | ChangeLOD(iMinLOD); 50 | label_lowres->setText(tr("%1 %2").arg(label_lowres->text()).arg(m_vvLODs[m_vvLODs.size()-1])); 51 | label_highres->setText(tr("%1 %2").arg(label_highres->text()).arg(m_vvLODs[0])); 52 | } 53 | 54 | LODDlg::~LODDlg(void) 55 | { 56 | } 57 | 58 | void LODDlg::ChangeLOD(int iLOD) 59 | { 60 | label_selectRes->setText(tr("Selected Resolution %1").arg(m_vvLODs[iLOD-verticalSlider_LOD->minimum()])); 61 | } 62 | -------------------------------------------------------------------------------- /ImageVis3D/UI/LODDlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : LODDlg.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef LODDLG_H 39 | #define LODDLG_H 40 | 41 | #include "AutoGen/ui_LODDlg.h" 42 | #include 43 | #include 44 | 45 | class LODDlg : public QDialog, protected Ui_LODDlg 46 | { 47 | Q_OBJECT 48 | public: 49 | LODDlg(QString title, int iMinLOD, int iMaxLOD, const std::vector< QString >& vvLODs, QWidget* parent, Qt::WindowFlags flags = Qt::Tool); 50 | virtual ~LODDlg(); 51 | 52 | int GetLOD() {return verticalSlider_LOD->value();} 53 | private slots: 54 | void ChangeLOD(int iLOD); 55 | 56 | private: 57 | const std::vector< QString > m_vvLODs; 58 | }; 59 | 60 | #endif // LODDLG_H 61 | -------------------------------------------------------------------------------- /ImageVis3D/UI/MDIRenderWin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2012 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \brief Subclasses QMdiSubWindow so that we have more complete control over 31 | the destruction of a render window. Necessary so that undo functions 32 | properly when the window is destroyed. 33 | */ 34 | 35 | #include "../Tuvok/StdTuvokDefines.h" 36 | #include 37 | #include 38 | #include 39 | #include "GL/glew.h" 40 | #if defined(__GNUC__) && defined(DETECTED_OS_LINUX) 41 | # pragma GCC visibility push(default) 42 | #endif 43 | #include 44 | #if defined(__GNUC__) && defined(DETECTED_OS_LINUX) 45 | # pragma GCC visibility pop 46 | #endif 47 | 48 | #include "MDIRenderWin.h" 49 | #include "RenderWindow.h" 50 | 51 | using namespace tuvok; 52 | 53 | MDIRenderWin::MDIRenderWin(MasterController& masterController, 54 | RenderWindow* renderWin, 55 | QWidget *parent, 56 | Qt::WindowFlags flags) 57 | : QMdiSubWindow(parent, flags) 58 | , mMasterController(masterController) 59 | , mRenderWindow(renderWin) 60 | { 61 | setWidget(renderWin->GetQtWidget()); 62 | } 63 | 64 | MDIRenderWin::~MDIRenderWin() 65 | { 66 | 67 | } 68 | 69 | 70 | void MDIRenderWin::closeEvent(QCloseEvent* event) 71 | { 72 | QMdiSubWindow::closeEvent(event); 73 | 74 | // Kill off our child widget (in this case, the render window that was 75 | // given to us). 76 | mMasterController.LuaScript()->cexec("deleteClass", 77 | mRenderWindow->GetLuaInstance()); 78 | } 79 | 80 | 81 | -------------------------------------------------------------------------------- /ImageVis3D/UI/MDIRenderWin.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2012 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | /** 30 | \brief Subclasses QMdiSubWindow so that we have more complete control over 31 | the destruction of a render window. Necessary so that undo functions 32 | properly when the window is destroyed. 33 | */ 34 | 35 | #ifndef MDIRENDERWIN_H_ 36 | #define MDIRENDERWIN_H_ 37 | 38 | #include 39 | #include 40 | #include "../Tuvok/Controller/MasterController.h" 41 | #include "../Tuvok/LuaScripting/LuaScripting.h" 42 | #include "../Tuvok/LuaScripting/LuaClassRegistration.h" 43 | 44 | class RenderWindow; 45 | 46 | class MDIRenderWin : public QMdiSubWindow 47 | { 48 | public: 49 | MDIRenderWin(tuvok::MasterController& masterController, 50 | RenderWindow* renderWin, 51 | QWidget *parent = 0, 52 | Qt::WindowFlags flags = 0); 53 | virtual ~MDIRenderWin(); 54 | 55 | protected: 56 | 57 | /// Used to explicitly kill off our child render window. 58 | void closeEvent(QCloseEvent *closeEvent); 59 | 60 | private: 61 | 62 | tuvok::MasterController& mMasterController; 63 | RenderWindow* mRenderWindow; 64 | }; 65 | 66 | #endif /* MDIRENDERWIN_H_ */ 67 | -------------------------------------------------------------------------------- /ImageVis3D/UI/MIPRotDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SCIInstitute/ImageVis3D/32a794acf8d1e1785679c3249373e096ecabb99e/ImageVis3D/UI/MIPRotDialog.cpp -------------------------------------------------------------------------------- /ImageVis3D/UI/MIPRotDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : MIPRotDialog.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : December 2008 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef MIPROTDIALOG_H 39 | #define MIPROTDIALOG_H 40 | 41 | #include 42 | #include "UI/AutoGen/ui_MIPRotDialog.h" 43 | 44 | class MIPRotDialog : public QDialog, protected Ui_MIPRotDialog 45 | { 46 | Q_OBJECT 47 | public: 48 | MIPRotDialog(uint32_t iImages, bool bOrthoView, bool bStereo, bool bUseLOD, uint32_t iEyeDist, QWidget* parent = 0, Qt::WindowFlags flags = 0); 49 | virtual ~MIPRotDialog(); 50 | 51 | uint32_t GetNumImages() const; 52 | bool GetUseOrtho() const; 53 | bool GetUseStereo() const; 54 | bool GetUseLOD() const; 55 | uint32_t GetEyeDist() const; 56 | 57 | protected slots: 58 | void UpdateDegreeLabel(); 59 | void UpdateStereoCheckbox(); 60 | void UpdateEyeDistLabel(); 61 | 62 | 63 | private: 64 | void setupUi(QDialog *MIPRotDialog, uint32_t iImages, bool bOrthoView, bool bStereo, bool bUseLOD, uint32_t iEyeDist); 65 | 66 | }; 67 | 68 | #endif // MIPROTDIALOG_H 69 | -------------------------------------------------------------------------------- /ImageVis3D/UI/MetadataDlg.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : MetadataDlg.cpp 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #include "MetadataDlg.h" 39 | 40 | MetadataDlg::MetadataDlg(QWidget* parent, Qt::WindowFlags flags /* = 0 */) : 41 | QDialog(parent, flags) 42 | { 43 | setupUi(this); 44 | } 45 | 46 | MetadataDlg::~MetadataDlg(void) 47 | { 48 | } 49 | 50 | void MetadataDlg::SetFilename(const QString& strFilename) { 51 | TextLabel_Metadata->setText("Metadata for " + strFilename); 52 | } 53 | 54 | void MetadataDlg::SetMetadata(const std::vector>& metadata) { 55 | listWidget_metadata->clear(); 56 | 57 | for (size_t i = 0;iaddItem(s); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ImageVis3D/UI/MetadataDlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : MetadataDlg.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef METADATADLG_H 39 | #define METADATADLG_H 40 | 41 | #include "AutoGen/ui_Metadata.h" 42 | 43 | 44 | 45 | class MetadataDlg : public QDialog, protected Ui_MetadataDlg 46 | { 47 | Q_OBJECT 48 | public: 49 | MetadataDlg(QWidget* parent, Qt::WindowFlags flags = Qt::Tool); 50 | virtual ~MetadataDlg(); 51 | 52 | void SetFilename(const QString& strFilename); 53 | void SetMetadata(const std::vector>& metadata); 54 | 55 | }; 56 | 57 | #endif // METADATADLG_H 58 | -------------------------------------------------------------------------------- /ImageVis3D/UI/PleaseWait.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : PleaseWait.cpp 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : July 2008 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #include "PleaseWait.h" 39 | #include 40 | 41 | PleaseWaitDialog::PleaseWaitDialog(QWidget* parent, Qt::WindowFlags flags, 42 | bool bHasCancelButton) : 43 | QDialog(parent, flags), 44 | m_pMasterController(NULL), 45 | m_pLabelOut(NULL), 46 | m_ButtonCancel(NULL), 47 | m_bCanceled(false) 48 | { 49 | setupUi(this); 50 | 51 | if (bHasCancelButton) { 52 | m_ButtonCancel = new QPushButton(this); 53 | m_ButtonCancel->setText(QString::fromUtf8("Cancel")); 54 | verticalLayout->addWidget(m_ButtonCancel); 55 | 56 | QObject::connect(m_ButtonCancel, SIGNAL(clicked()), this, 57 | SLOT(CancelClicked())); 58 | } 59 | } 60 | 61 | PleaseWaitDialog::~PleaseWaitDialog(void) 62 | { 63 | DetachLabel(); 64 | delete m_ButtonCancel; 65 | } 66 | 67 | void PleaseWaitDialog::CancelClicked() 68 | { 69 | m_ButtonCancel->setText(QString::fromUtf8("Cancelling ...")); 70 | m_ButtonCancel->setEnabled(false); 71 | m_ButtonCancel->update(); 72 | m_bCanceled = true; 73 | emit Canceled(); 74 | } 75 | 76 | QTLabelOut* PleaseWaitDialog::AttachLabel(MasterController* pMasterController) { 77 | if (m_pLabelOut) return m_pLabelOut; 78 | 79 | m_pMasterController = pMasterController; 80 | 81 | m_pLabelOut = new QTLabelOut(label_Status, this); 82 | m_pLabelOut->SetOutput(true, true, true, false); 83 | m_pMasterController->AddDebugOut(m_pLabelOut); 84 | 85 | return m_pLabelOut; 86 | } 87 | 88 | void PleaseWaitDialog::DetachLabel() { 89 | if(m_pMasterController) { 90 | m_pMasterController->RemoveDebugOut(m_pLabelOut); 91 | } 92 | m_pLabelOut = NULL; 93 | } 94 | 95 | void PleaseWaitDialog::closeEvent(QCloseEvent *) 96 | { 97 | DetachLabel(); 98 | } 99 | -------------------------------------------------------------------------------- /ImageVis3D/UI/PleaseWait.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : PleaseWait.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : July 2008 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef PLEASEWAIT_H 39 | #define PLEASEWAIT_H 40 | 41 | #include "AutoGen/ui_PleaseWait.h" 42 | #include "DebugOut/QTLabelOut.h" 43 | #include "../Tuvok/Controller/MasterController.h" 44 | 45 | using namespace tuvok; 46 | class QPushButton; 47 | 48 | class PleaseWaitDialog : public QDialog, protected Ui_PleaseWaitDialog 49 | { 50 | Q_OBJECT 51 | public: 52 | PleaseWaitDialog(QWidget* parent, 53 | Qt::WindowFlags flags = Qt::Tool, 54 | bool bHasCancelButton= false); 55 | virtual ~PleaseWaitDialog(); 56 | 57 | QTLabelOut* AttachLabel(MasterController* pMasterController); 58 | void DetachLabel(); 59 | 60 | void SetText(QString text) { 61 | label->setText(text); 62 | if(this->isHidden()) { 63 | this->show(); 64 | } 65 | } 66 | QLabel* GetStatusLabel() const {return label_Status;} 67 | 68 | void closeEvent(QCloseEvent *event); 69 | 70 | bool Canceled() const { return m_bCanceled; } 71 | private slots: 72 | void CancelClicked(); 73 | 74 | signals: 75 | void CancelSignal(); 76 | 77 | protected: 78 | MasterController* m_pMasterController; 79 | QTLabelOut* m_pLabelOut; 80 | QPushButton* m_ButtonCancel; 81 | bool m_bCanceled; 82 | }; 83 | 84 | #endif // PLEASEWAIT_H 85 | -------------------------------------------------------------------------------- /ImageVis3D/UI/QDataRadioButton.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : QDataRadioButton.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : September 2008 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #pragma once 39 | 40 | #ifndef QDATARADIOBUTTON_H 41 | #define QDATARADIOBUTTON_H 42 | 43 | #include "StdDefines.h" 44 | #include 45 | #include 46 | #include <../Tuvok/IO/DirectoryParser.h> 47 | 48 | class QDataRadioButton : public QRadioButton 49 | { 50 | public: 51 | QDataRadioButton(std::shared_ptr stack, 52 | QWidget* parent=0); 53 | QDataRadioButton(std::shared_ptr stack, 54 | const QString &text, QWidget *parent=0); 55 | virtual ~QDataRadioButton() {} 56 | 57 | void SetBrightness(float fScale); 58 | 59 | protected: 60 | unsigned int m_iCurrentImage; 61 | std::shared_ptr m_stackInfo; 62 | float m_fScale; 63 | 64 | virtual void leaveEvent ( QEvent * event ); 65 | virtual void mouseMoveEvent(QMouseEvent *event); 66 | 67 | void SetupInfo(); 68 | void SetStackImage(unsigned int i, bool bForceUpdate = false); 69 | }; 70 | 71 | #endif // QDATARADIOBUTTON_H 72 | -------------------------------------------------------------------------------- /ImageVis3D/UI/QLightPreview.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : QLightPreview.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : November 2009 35 | // 36 | //! Copyright (C) 2009 SCI Institute 37 | 38 | #pragma once 39 | 40 | #ifndef QLIGHTPREVIEW_H 41 | #define QLIGHTPREVIEW_H 42 | 43 | #include 44 | #include "../Tuvok/Basics/Vectors.h" 45 | 46 | class QLightPreview : public QWidget 47 | { 48 | Q_OBJECT 49 | public: 50 | 51 | QLightPreview(QWidget *parent=0); 52 | virtual ~QLightPreview(void); 53 | 54 | void SetData(const FLOATVECTOR4& ambient, 55 | const FLOATVECTOR4& diffuse, 56 | const FLOATVECTOR4& specular, 57 | const FLOATVECTOR3& lightDir); 58 | 59 | FLOATVECTOR4 GetAmbient() const; 60 | FLOATVECTOR4 GetDiffuse() const; 61 | FLOATVECTOR4 GetSpecular()const; 62 | FLOATVECTOR3 GetLightDir()const; 63 | 64 | signals: 65 | void lightMoved(); 66 | 67 | protected: 68 | virtual void paintEvent(QPaintEvent *event); 69 | virtual void mouseMoveEvent(QMouseEvent *event); 70 | virtual void mousePressEvent(QMouseEvent *event); 71 | virtual void mouseReleaseEvent(QMouseEvent *event); 72 | 73 | private: 74 | FLOATVECTOR4 m_cAmbient; 75 | FLOATVECTOR4 m_cDiffuse; 76 | FLOATVECTOR4 m_cSpecular; 77 | FLOATVECTOR3 m_vLightDir; 78 | 79 | unsigned int m_iCachedHeight; 80 | unsigned int m_iCachedWidth; 81 | QImage* m_pCachedImage; 82 | bool m_bBackdropCacheUptodate; 83 | bool m_bMousePressed; 84 | 85 | void DrawSphere(QImage* sphereImage); 86 | }; 87 | 88 | #endif // QLIGHTPREVIEW_H 89 | -------------------------------------------------------------------------------- /ImageVis3D/UI/QTransferFunction.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : QTransferFunction.cpp 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : July 2008 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #include "../Tuvok/StdTuvokDefines.h" 39 | #include "QTransferFunction.h" 40 | 41 | using namespace std; 42 | 43 | QTransferFunction::QTransferFunction(MasterController& masterController, 44 | QWidget *parent) : 45 | QWidget(parent), 46 | m_MasterController(masterController), 47 | m_eExecutionMode(CONTINUOUS), 48 | m_fHistfScale(1.0f), 49 | m_bBackdropCacheUptodate(false), 50 | m_bHistogramChanged(false) 51 | { 52 | } 53 | -------------------------------------------------------------------------------- /ImageVis3D/UI/QTransferFunction.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : QTransferFunction.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : July 2008 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #pragma once 39 | 40 | #ifndef QTRANSFERFUNCTION_H 41 | #define QTRANSFERFUNCTION_H 42 | 43 | #include 44 | #include "../Tuvok/Controller/MasterController.h" 45 | 46 | using namespace tuvok; 47 | 48 | class QTransferFunction : public QWidget 49 | { 50 | Q_OBJECT 51 | 52 | public: 53 | 54 | enum executionMode { UNKNOWN=0, CONTINUOUS=1, ONRELEASE=2, MANUAL=4 }; 55 | 56 | public: 57 | QTransferFunction(MasterController& masterController, QWidget *parent=0); 58 | 59 | virtual void SetExecutionMode(executionMode iExecutionMode) { 60 | m_eExecutionMode = iExecutionMode; 61 | } 62 | 63 | public slots: 64 | virtual void SetHistogramScale(int iScale) { 65 | SetHistogramScale(float(iScale)); 66 | } 67 | 68 | virtual void SetHistogramScale(float fScale) { 69 | m_fHistfScale = fScale; 70 | m_bBackdropCacheUptodate = false; 71 | m_bHistogramChanged = true; 72 | update(); 73 | } 74 | 75 | float GetHistogramScale() { 76 | return m_fHistfScale; 77 | } 78 | 79 | virtual void ApplyFunction() = 0; 80 | 81 | protected: 82 | MasterController& m_MasterController; 83 | executionMode m_eExecutionMode; 84 | float m_fHistfScale; 85 | bool m_bBackdropCacheUptodate; 86 | bool m_bHistogramChanged; 87 | }; 88 | 89 | 90 | #endif // QTRANSFERFUNCTION_H 91 | -------------------------------------------------------------------------------- /ImageVis3D/UI/RAWDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : RAWDialog.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : December 2008 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef RAWDIALOG_H 39 | #define RAWDIALOG_H 40 | 41 | #include "UI/AutoGen/ui_RAWDialog.h" 42 | #include 43 | #include 44 | #include "../Tuvok/Basics/Vectors.h" 45 | 46 | class RAWDialog : public QDialog, protected Ui_RAWDialog 47 | { 48 | Q_OBJECT 49 | public: 50 | RAWDialog(const std::string& strFilename, uint64_t iFileSize, QWidget* parent = 0, Qt::WindowFlags flags = 0); 51 | virtual ~RAWDialog(); 52 | 53 | UINT64VECTOR3 GetSize() const; 54 | FLOATVECTOR3 GetAspectRatio() const; 55 | unsigned int GetBitWidth() const; 56 | unsigned int GetEncoding() const; 57 | unsigned int GetHeaderSize() const; 58 | bool IsBigEndian() const; 59 | bool IsSigned() const; 60 | bool IsFloat() const; 61 | 62 | uint64_t ComputeExpectedSize() const; 63 | 64 | protected slots: 65 | void CheckValues(); 66 | void ToggleEndianessDialog(); 67 | void GuessHeaderSize(); 68 | 69 | private: 70 | std::string m_strFilename; 71 | uint64_t m_iFileSize; 72 | void setupUi(QDialog *RAWDialog); 73 | 74 | }; 75 | 76 | #endif // RAWDIALOG_H 77 | -------------------------------------------------------------------------------- /ImageVis3D/UI/UI/CrashDetDlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | CrashDetDlg 4 | 5 | 6 | Qt::WindowModal 7 | 8 | 9 | 10 | 0 11 | 0 12 | 523 13 | 159 14 | 15 | 16 | 17 | Crash Recovery 18 | 19 | 20 | true 21 | 22 | 23 | true 24 | 25 | 26 | 27 | 28 | 29 | Either ImageVis3D crashed or it is currently running in a second process. If it crashed do you want to submit the logfile? 30 | 31 | 32 | Qt::AlignJustify|Qt::AlignVCenter 33 | 34 | 35 | true 36 | 37 | 38 | 39 | 40 | 41 | 42 | Qt::Vertical 43 | 44 | 45 | 46 | 20 47 | 1 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Do not show this dialog again (can be changed in the preferences) 56 | 57 | 58 | 59 | 60 | 61 | 62 | Qt::Horizontal 63 | 64 | 65 | QDialogButtonBox::No|QDialogButtonBox::Yes 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | buttonBox 75 | accepted() 76 | CrashDetDlg 77 | accept() 78 | 79 | 80 | 248 81 | 254 82 | 83 | 84 | 157 85 | 274 86 | 87 | 88 | 89 | 90 | buttonBox 91 | rejected() 92 | CrashDetDlg 93 | reject() 94 | 95 | 96 | 316 97 | 260 98 | 99 | 100 | 286 101 | 274 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /ImageVis3D/UI/UI/FTPDialog.ui: -------------------------------------------------------------------------------- 1 | 2 | FTPDialog 3 | 4 | 5 | Qt::WindowModal 6 | 7 | 8 | 9 | 0 10 | 0 11 | 400 12 | 131 13 | 14 | 15 | 16 | FTP Transfer 17 | 18 | 19 | 20 | 21 | 22 | true 23 | 24 | 25 | 26 | 27 | 28 | Current Transfer 29 | 30 | 31 | 32 | 33 | 34 | TextLabel 35 | 36 | 37 | 38 | 39 | 40 | 41 | 24 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | QFrame::NoFrame 52 | 53 | 54 | QFrame::Raised 55 | 56 | 57 | 0 58 | 59 | 60 | 61 | 0 62 | 63 | 64 | 65 | 66 | Qt::Horizontal 67 | 68 | 69 | 70 | 40 71 | 20 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | Abort 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | Qt::Vertical 90 | 91 | 92 | 93 | 20 94 | 40 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | pushButton 105 | clicked() 106 | FTPDialog 107 | AbortTransfer() 108 | 109 | 110 | 355 111 | 98 112 | 113 | 114 | 271 115 | 88 116 | 117 | 118 | 119 | 120 | 121 | AbortTransfer() 122 | 123 | 124 | -------------------------------------------------------------------------------- /ImageVis3D/UI/UI/PleaseWait.ui: -------------------------------------------------------------------------------- 1 | 2 | PleaseWaitDialog 3 | 4 | 5 | Qt::WindowModal 6 | 7 | 8 | true 9 | 10 | 11 | 12 | 0 13 | 0 14 | 593 15 | 151 16 | 17 | 18 | 19 | 20 | 0 21 | 0 22 | 23 | 24 | 25 | 26 | 500 27 | 150 28 | 29 | 30 | 31 | Qt::NoContextMenu 32 | 33 | 34 | Please wait .... 35 | 36 | 37 | false 38 | 39 | 40 | true 41 | 42 | 43 | 44 | 45 | 46 | 47 | 12 48 | 75 49 | true 50 | 51 | 52 | 53 | Please wait .. 54 | 55 | 56 | Qt::AlignCenter 57 | 58 | 59 | true 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | false 70 | 71 | 72 | Qt::AlignCenter 73 | 74 | 75 | true 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /ImageVis3D/UI/URLDlg.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : URLDlg.cpp 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #include 39 | #include 40 | 41 | #include "URLDlg.h" 42 | 43 | #ifdef DETECTED_OS_WINDOWS 44 | #include 45 | #endif 46 | 47 | URLDlg::URLDlg(QString title, QString desc, QString url, QWidget* parent, Qt::WindowFlags flags) : 48 | QDialog(parent, flags), 49 | m_strURL(url) 50 | { 51 | setupUi(this); 52 | setWindowTitle(title); 53 | QPixmap p = QPixmap::fromImage(QImage(":/Resources/icon_Update.png")); 54 | label_updateIcon->setPixmap(p); 55 | 56 | label_desc->setText(desc); 57 | label_url->setText(url); 58 | } 59 | 60 | URLDlg::~URLDlg(void) 61 | { 62 | } 63 | 64 | void URLDlg::Download() 65 | { 66 | accept(); 67 | QDesktopServices::openUrl(m_strURL); 68 | } 69 | -------------------------------------------------------------------------------- /ImageVis3D/UI/URLDlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : URLDlg.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef URLDLG_H 39 | #define URLDLG_H 40 | 41 | #include "AutoGen/ui_URLDlg.h" 42 | #include 43 | #include 44 | #include 45 | 46 | class URLDlg : public QDialog, protected Ui_URLDlg 47 | { 48 | Q_OBJECT 49 | public: 50 | URLDlg(QString title, QString desc, QString url, QWidget* parent, Qt::WindowFlags flags = Qt::Tool); 51 | virtual ~URLDlg(); 52 | 53 | 54 | protected slots: 55 | virtual void Download(); 56 | 57 | private: 58 | QString m_strURL; 59 | }; 60 | 61 | #endif // URLDLG_H 62 | -------------------------------------------------------------------------------- /ImageVis3D/UI/Welcome.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : Welcome.cpp 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #include "Welcome.h" 39 | 40 | WelcomeDialog::WelcomeDialog(QWidget* parent, Qt::WindowFlags flags /* = 0 */) : 41 | QDialog(parent, flags) 42 | { 43 | setupUi(this); 44 | label_logo->setPixmap(QPixmap::fromImage(QImage(":/Resources/imagevis3dmini.png"))); 45 | } 46 | 47 | WelcomeDialog::~WelcomeDialog(void) 48 | { 49 | } 50 | 51 | void WelcomeDialog::CheckUpdates() 52 | { 53 | 54 | emit CheckUpdatesClicked(); 55 | } 56 | 57 | void WelcomeDialog::OnlineVideoTut() 58 | { 59 | 60 | emit OnlineVideoTutClicked(); 61 | } 62 | 63 | void WelcomeDialog::OnlineHelp() 64 | { 65 | emit OnlineHelpClicked(); 66 | } 67 | 68 | void WelcomeDialog::GetExampleData() 69 | { 70 | emit GetExampleDataClicked(); 71 | } 72 | 73 | void WelcomeDialog::OpenManual() 74 | { 75 | emit OpenManualClicked(); 76 | } 77 | 78 | void WelcomeDialog::OpenFromFile() 79 | { 80 | accept(); 81 | emit OpenFromFileClicked(); 82 | } 83 | 84 | void WelcomeDialog::OpenFromDir() 85 | { 86 | accept(); 87 | emit OpenFromDirClicked(); 88 | } 89 | 90 | void WelcomeDialog::OpenMRU() 91 | { 92 | MRUButton* button = (MRUButton*)qobject_cast(sender()); 93 | accept(); 94 | 95 | emit OpenFromFileClicked(button->strFilename); 96 | } 97 | 98 | 99 | void WelcomeDialog::ClearMRUItems() { 100 | for (size_t i = 0;iremoveWidget(m_vMRUItems[i]); 102 | disconnect(m_vMRUItems[i], SIGNAL(clicked()), this, SLOT(OpenMRU())); 103 | delete m_vMRUItems[i]; 104 | } 105 | 106 | m_vMRUItems.clear(); 107 | } 108 | 109 | void WelcomeDialog::AddMRUItem(std::string strDesc, std::string strFilename) { 110 | MRUButton* b = new MRUButton(groupBox_OpenFile); 111 | b->setText(strDesc.c_str()); 112 | b->setMinimumHeight(23); // to make buttons work on the MAC 113 | b->strFilename = strFilename; 114 | 115 | connect(b, SIGNAL(clicked()), this, SLOT(OpenMRU())); 116 | verticalLayout_OpenFile->addWidget(b); 117 | m_vMRUItems.push_back(b); 118 | } 119 | -------------------------------------------------------------------------------- /ImageVis3D/UI/Welcome.h: -------------------------------------------------------------------------------- 1 | /* 2 | For more information, please see: http://software.sci.utah.edu 3 | 4 | The MIT License 5 | 6 | Copyright (c) 2008 Scientific Computing and Imaging Institute, 7 | University of Utah. 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | */ 28 | 29 | 30 | //! File : Welcome.h 31 | //! Author : Jens Krueger 32 | //! SCI Institute 33 | //! University of Utah 34 | //! Date : January 2009 35 | // 36 | //! Copyright (C) 2008 SCI Institute 37 | 38 | #ifndef WELCOME_H 39 | #define WELCOME_H 40 | 41 | #include "AutoGen/ui_Welcome.h" 42 | #include 43 | #include 44 | #include 45 | 46 | class MRUButton : public QPushButton { 47 | public: 48 | explicit MRUButton(QWidget *parent=0) : QPushButton(parent) {} 49 | explicit MRUButton(const QString &text, QWidget *parent=0) : QPushButton(text, parent) {} 50 | MRUButton(const QIcon& icon, const QString &text, QWidget *parent=0) : QPushButton(icon, text, parent) {} 51 | virtual ~MRUButton() {} 52 | 53 | std::string strFilename; 54 | }; 55 | 56 | 57 | class WelcomeDialog : public QDialog, protected Ui_Welcome 58 | { 59 | Q_OBJECT 60 | public: 61 | WelcomeDialog(QWidget* parent, Qt::WindowFlags flags = Qt::Tool); 62 | virtual ~WelcomeDialog(); 63 | 64 | void ClearMRUItems(); 65 | void AddMRUItem(std::string strDesc, std::string strFilename); 66 | void SetShowAtStartup(bool bShow) {checkBox_ShowAtStartup->setChecked(!bShow);} 67 | bool ShowAtStartup() const {return !checkBox_ShowAtStartup->isChecked();} 68 | 69 | protected slots: 70 | virtual void CheckUpdates(); 71 | virtual void OnlineVideoTut(); 72 | virtual void OnlineHelp(); 73 | virtual void OpenFromFile(); 74 | virtual void OpenFromDir(); 75 | virtual void OpenMRU(); 76 | virtual void OpenManual(); 77 | virtual void GetExampleData(); 78 | 79 | signals: 80 | void CheckUpdatesClicked(); 81 | void OnlineVideoTutClicked(); 82 | void OnlineHelpClicked(); 83 | void OpenManualClicked(); 84 | void GetExampleDataClicked(); 85 | void OpenFromFileClicked(); 86 | void OpenFromFileClicked(std::string filename); 87 | void OpenFromDirClicked(); 88 | void OpenMRU(int iID); 89 | 90 | private: 91 | std::vector m_vMRUItems; 92 | 93 | 94 | }; 95 | 96 | #endif // WELCOME_H 97 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | For more information, please see: http://software.sci.utah.edu 2 | 3 | The MIT License 4 | 5 | Copyright (c) 2008-2014 Scientific Computing and Imaging Institute, 6 | University of Utah & High Performance Computing Group at the University 7 | of Duisburg-Essen, Germany 8 | 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a 11 | copy of this software and associated documentation files (the "Software"), 12 | to deal in the Software without restriction, including without limitation 13 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 14 | and/or sell copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 23 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 | DEALINGS IN THE SOFTWARE. 27 | 28 | 29 | Additionally, this program utilizes code from the Qt software package. 30 | Qt may be downloaded at: http://www.qtsoftware.com/. You may also 31 | contact the ImageVis3D team on the `iv3d-users@sci.utah.edu' mailing 32 | list to request the Qt package in source form. 33 | 34 | 35 | 36 | Hilbert Curve implementation copyright 1998, Rice University. 37 | 38 | 39 | 40 | LZ4 - Fast LZ compression algorithm 41 | Copyright (C) 2011-2012, Yann Collet. 42 | BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 43 | 44 | Redistribution and use in source and binary forms, with or without 45 | modification, are permitted provided that the following conditions are 46 | met: 47 | 48 | * Redistributions of source code must retain the above copyright 49 | notice, this list of conditions and the following disclaimer. 50 | * Redistributions in binary form must reproduce the above 51 | copyright notice, this list of conditions and the following disclaimer 52 | in the documentation and/or other materials provided with the 53 | distribution. 54 | 55 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 56 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 57 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 58 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 59 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 60 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 61 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 62 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 63 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 64 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 65 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /LuaScripts/BatchRenderer.lua: -------------------------------------------------------------------------------- 1 | description = [[ 2 | ******************************************************************************** 3 | 4 | Brief: Example ImageVis3D batch renderer. 5 | Author: James Hughes 6 | Date: December 2012 7 | 8 | ******************************************************************************** 9 | ]] 10 | 11 | print(description) 12 | 13 | -- Program arguments? 14 | dataset = "/Users/jhughes/sci/datasets/c60.uvf" 15 | outputDir = "/Users/jhughes/sci/output/BatchRenderer" 16 | shadersDir = "/Users/jhughes/sci/imagevis3d/Tuvok/Shaders" 17 | 18 | -- Build 3D slice based volume renderer. 19 | -- Parameters are: renderer type, use only power of two textures, downsample to 8 bits, 20 | -- disable border, bias and scale TF. 21 | print("Initializing renderer") 22 | renderer = tuvok.renderer.new(tuvok.renderer.types.OpenGL_SBVR, false, false, false, false, false) 23 | 24 | -- Both load dataset and add shader path must be done before passing the context. 25 | renderer.loadDataset(dataset) 26 | renderer.addShaderPath(shadersDir) 27 | 28 | -- tuvok.createContext() is a function that is bound in BatchRenderer. 29 | -- Parameters are: Framebuffer width and height, color bits, depth bits, stencil 30 | -- bits, double buffer, and if visible. 31 | context = tuvok.createContext(640,480, 32,24,8, true, false) 32 | renderer.initialize(context) 33 | renderer.resize({640, 480}) 34 | renderer.setRendererTarget(tuvok.renderer.types.RT_Headless) 35 | renderer.paint() 36 | 37 | renderer.setRendererTarget(tuvok.renderer.types.RT_Capture) 38 | renderer.captureSingleFrame(outputDir .. '/render.png', true) 39 | 40 | renderer.cleanup() 41 | deleteClass(renderer) 42 | 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ImageVis3D 2 | ========== 3 | 4 | [![Build Status](https://travis-ci.org/SCIInstitute/ImageVis3D.svg?branch=master)](https://travis-ci.org/SCIInstitute/ImageVis3D) 5 | 6 | ImageVis3D is an out-of-core volume rendering application. See: 7 | http://www.imagevis3d.org . 8 | -------------------------------------------------------------------------------- /Scripts/Linux-StaticQt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | VERSION=4.8.1 4 | PREFIX="${HOME}/sw" 5 | QTDIR="qt-everywhere-opensource-src-${VERSION}" 6 | echo "Removing old build..." 7 | rm -fr ${QTDIR} 8 | 9 | tarball="${QTDIR}.tar" 10 | 11 | echo "Extracting..." 12 | # Do they have a bzip'd or a gzip'd tarball? 13 | if test -f ${tarball}.bz2 ; then 14 | tar jxf ${tarball}.bz2 15 | elif test -f ${tarball}.gz ; then 16 | tar zxf ${tarball}.gz 17 | else 18 | echo "${tarball}.gz not found; Downloading Qt..." 19 | wget -q http://get.qt.nokia.com/qt/source/${tarball}.gz 20 | tar zxf ${tarball}.gz 21 | fi 22 | pushd ${QTDIR} || exit 1 23 | echo "yes" | \ 24 | ./configure \ 25 | -prefix ${HOME}/sw \ 26 | -buildkey "imagevis3d" \ 27 | -static \ 28 | -release \ 29 | -opensource \ 30 | -fast \ 31 | -largefile \ 32 | -exceptions \ 33 | -no-accessibility \ 34 | -stl \ 35 | -no-qt3support \ 36 | -no-xmlpatterns \ 37 | -no-multimedia \ 38 | -no-audio-backend \ 39 | -no-phonon \ 40 | -no-phonon-backend \ 41 | -no-webkit \ 42 | -no-javascript-jit \ 43 | -no-scripttools \ 44 | -no-declarative \ 45 | -no-declarative-debug \ 46 | -graphicssystem opengl \ 47 | -no-gif \ 48 | -qt-libtiff \ 49 | -qt-libpng \ 50 | -qt-libmng \ 51 | -qt-libjpeg \ 52 | -no-openssl \ 53 | -no-nis \ 54 | -no-cups \ 55 | -no-iconv \ 56 | -no-nas-sound \ 57 | -opengl desktop \ 58 | -no-openvg \ 59 | -no-sm \ 60 | -make libs \ 61 | -make tools \ 62 | -nomake examples \ 63 | -nomake demos \ 64 | -nomake docs \ 65 | -nomake translations 66 | if test $? -ne 0; then 67 | echo "configure failed" 68 | exit 1 69 | fi 70 | 71 | nice make -j2 || exit 1 72 | 73 | rm -fr ${PREFIX}/bin/qmake ${PREFIX}/lib/libQt* ${PREFIX}/lib/Qt* 74 | rm -fr ${PREFIX}/include/Qt* 75 | 76 | nice make install || exit 1 77 | 78 | popd 79 | -------------------------------------------------------------------------------- /Scripts/Mac-DynamicQt-Cocoa.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | MAJOR=4 3 | MINOR=8 4 | PATCH=6 5 | VERSION=${MAJOR}.${MINOR}.${PATCH} 6 | SOURCEDIR="${HOME}/Qt/Source" 7 | BUILDDIR="${HOME}/Qt/Build" 8 | PREFIX=${BUILDDIR}/${VERSION} 9 | QTDIR="qt-everywhere-opensource-src-${VERSION}" 10 | 11 | mkdir -p ${SOURCEDIR} 12 | mkdir -p ${BUILDDIR} 13 | 14 | pushd ${SOURCEDIR} || exit 1 15 | 16 | echo "Removing old sources and build..." 17 | rm -fr ${QTDIR} 18 | 19 | TARBALL="${QTDIR}.tar" 20 | 21 | # Do they have a bzip'd or a gzip'd tarball? 22 | if test -f ${TARBALL}.bz2 ; then 23 | echo "Extracting..." 24 | tar jxf ${TARBALL}.bz2 25 | elif test -f ${TARBALL}.gz ; then 26 | echo "Extracting..." 27 | tar zxf ${TARBALL}.gz 28 | else 29 | echo "${TARBALL}.gz not found; Downloading Qt..." 30 | curl -kLO http://download.qt-project.org/archive/qt/${MAJOR}.${MINOR}/${VERSION}/${TARBALL}.gz 31 | echo "Extracting..." 32 | tar zxf ${TARBALL}.gz 33 | fi 34 | 35 | pushd ${QTDIR} || exit 1 36 | echo "yes" | \ 37 | ./configure \ 38 | -prefix ${PREFIX} \ 39 | -buildkey "imagevis3d" \ 40 | -release \ 41 | -opensource \ 42 | -largefile \ 43 | -exceptions \ 44 | -fast \ 45 | -stl \ 46 | -no-qt3support \ 47 | -no-xmlpatterns \ 48 | -no-multimedia \ 49 | -no-audio-backend \ 50 | -no-phonon \ 51 | -no-phonon-backend \ 52 | -no-svg \ 53 | -no-webkit \ 54 | -no-javascript-jit \ 55 | -no-script \ 56 | -no-scripttools \ 57 | -no-declarative \ 58 | -no-declarative-debug \ 59 | -platform unsupported/macx-clang \ 60 | -no-scripttools \ 61 | -system-zlib \ 62 | -no-gif \ 63 | -qt-libtiff \ 64 | -qt-libpng \ 65 | -qt-libmng \ 66 | -qt-libjpeg \ 67 | -no-openssl \ 68 | -make libs \ 69 | -make tools \ 70 | -nomake examples \ 71 | -nomake demos \ 72 | -nomake docs \ 73 | -nomake translations \ 74 | -no-nis \ 75 | -no-cups \ 76 | -no-iconv \ 77 | -no-pch \ 78 | -no-dbus \ 79 | -arch "x86 x86_64" 80 | 81 | if test $? -ne 0; then 82 | echo "configure failed" 83 | exit 1 84 | fi 85 | 86 | nice make -j6 || exit 1 87 | 88 | echo "Removing old install..." 89 | rm -fr ${PREFIX} 90 | 91 | nice make install || exit 1 92 | 93 | echo "Creating symlink to last install..." 94 | ln -s ${PREFIX} ${BUILDDIR}/Current 95 | 96 | popd 97 | popd 98 | -------------------------------------------------------------------------------- /Scripts/Win-StaticQt-4.8.bat: -------------------------------------------------------------------------------- 1 | nmake clean 2 | configure ^ 3 | -buildkey "imagevis3d" ^ 4 | -debug-and-release ^ 5 | -opensource ^ 6 | -confirm-license ^ 7 | -static ^ 8 | -ltcg ^ 9 | -exceptions ^ 10 | -stl ^ 11 | -no-sql-sqlite ^ 12 | -no-sql-sqlite2 ^ 13 | -no-qt3support ^ 14 | -platform win32-msvc2015 ^ 15 | -largefile ^ 16 | -no-gif ^ 17 | -qt-libpng ^ 18 | -no-libmng ^ 19 | -qt-libtiff ^ 20 | -qt-libjpeg ^ 21 | -no-incredibuild-xge ^ 22 | -no-phonon ^ 23 | -no-phonon-backend ^ 24 | -no-multimedia ^ 25 | -no-audio-backend ^ 26 | -no-webkit ^ 27 | -no-script ^ 28 | -no-scripttools ^ 29 | -no-declarative ^ 30 | -no-declarative-debug ^ 31 | -mp ^ 32 | -nomake examples ^ 33 | -nomake demos ^ 34 | -nomake docs 35 | 36 | nmake sub-src 37 | -------------------------------------------------------------------------------- /Scripts/argon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd ${HOME}/imagevis3d 3 | source Scripts/util.sh 4 | 5 | export PATH="${HOME}/sw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" 6 | 7 | echo "Using compiler version:" > ${status} 8 | g++ --version >> ${status} 9 | echo "" >> ${status} 10 | 11 | echo "On system:" >> ${status} 12 | uname -a >> ${status} 13 | echo "" >> ${status} 14 | 15 | echo "-------------------------------------" >> ${status} 16 | 17 | mailtry cd ${HOME}/imagevis3d 18 | rm -f *.tar.gz *.zip *.dmg warnings 19 | mailtry sh Scripts/nightly.sh 20 | touch warnings # we assume the file exists. 21 | grep -v "IO/3rdParty" warnings > warn_no_3rd 22 | mv warn_no_3rd warnings 23 | cat warnings >> ${status} 24 | subj="" 25 | if test `file warnings | awk '{print $2}'` = "empty" ; then 26 | subj="Argon nightly (clean) -- `date`" 27 | else 28 | subj="Argon nightly (warnings) -- `date`" 29 | fi 30 | if test "$1" != "-q" ; then 31 | cat ${status} | mail -s "${subj}" ${full_em} 32 | fi 33 | devb="/usr/sci/projects/sciweb/devbuilds/imagevis3d/" 34 | mailtry scp *.zip tfogal@shell.sci.utah.edu:${devb} 35 | mailtry scp *.dmg tfogal@shell.sci.utah.edu:${devb} 36 | 37 | # Now update the `latest version' symlink. 38 | fn_zip=$(nm_zipfile) 39 | fn_zip="${devb}/${fn_zip}" 40 | fn_latest="${devb}/ImageVis3D-OSX-10.5-Latest.zip" 41 | mailtry ssh tfogal@shell.sci.utah.edu rm -f ${fn_latest} 42 | mailtry ssh tfogal@shell.sci.utah.edu rm -f ${fn_latest%%zip}dmg 43 | mailtry ssh tfogal@shell.sci.utah.edu ln -s ${fn_zip} ${fn_latest} 44 | mailtry ssh tfogal@shell.sci.utah.edu ln -s ${fn_zip%%zip}dmg \ 45 | ${fn_latest%%zip}dmg 46 | 47 | # Update the text file for determining the latest version. 48 | mailtry mv latest OSX_Latest_Version.txt 49 | mailtry scp OSX_Latest_Version.txt tfogal@shell.sci.utah.edu:${devb} 50 | -------------------------------------------------------------------------------- /Scripts/build-4.6.0.bat: -------------------------------------------------------------------------------- 1 | set VER=4.6.0 2 | rmdir /S /Q qt-%VER% qt-%VER%-64bit 3 | "C:/program files/7-zip/7z.exe" x qt-everywhere-opensource-src-%VER%.zip 4 | move /Y qt-everywhere-opensource-src-%VER% qt-%VER%-64bit 5 | cd qt-%VER%-64bit 6 | copy /Y ..\Win-StaticQt-%VER%.bat . 7 | Win-StaticQt-%VER%.bat 8 | -------------------------------------------------------------------------------- /Scripts/deb-vm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd ${HOME}/imagevis3d 3 | source Scripts/util.sh 4 | 5 | export PATH="${HOME}/sw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" 6 | 7 | rm -f ${status} warnings 8 | echo "Using compiler version:" > ${status} 9 | g++ --version >> ${status} 10 | echo "" >> ${status} 11 | 12 | echo "On system:" >> ${status} 13 | uname -a >> ${status} 14 | echo "" >> ${status} 15 | 16 | echo "-------------------------------------" >> ${status} 17 | 18 | mailtry cd ${HOME}/imagevis3d 19 | rm -f *.tar.gz *.zip warnings 20 | mailtry sh Scripts/nightly.sh 21 | touch warnings # we assume the file exists. 22 | grep -v "IO/3rdParty" warnings > warn_no_3rd 23 | mv warn_no_3rd warnings 24 | cat warnings >> ${status} 25 | subj="" 26 | if test `file warnings | awk '{print $2}'` = "empty" ; then 27 | subj="deb-vm nightly (clean) -- `date`" 28 | else 29 | subj="deb-vm nightly (warnings) -- `date`" 30 | fi 31 | if test "$1" != "-q" ; then 32 | cat ${status} | mail -s "${subj}" ${full_em} 33 | fi 34 | 35 | devbuilds="/usr/sci/projects/sciweb/devbuilds/imagevis3d" 36 | devb_host="shell.sci.utah.edu" 37 | mailtry scp *.tar.gz tfogal@${devb_host}:${devbuilds} 38 | 39 | # Update `latest version' symlink. 40 | fn_tarball=$(nm_tarball) 41 | fn_tarball="${devbuilds}/${fn_tarball}" 42 | fn_latest="${devbuilds}/ImageVis3D-Linux-Latest.tar.gz" 43 | mailtry ssh tfogal@${devb_host} rm -f ${fn_latest} 44 | mailtry ssh tfogal@${devb_host} ln -s ${fn_tarball} ${fn_latest} 45 | 46 | # Update the text file for automagic version checks. 47 | mailtry mv latest Linux_Latest_Version.txt 48 | mailtry scp Linux_Latest_Version.txt tfogal@${devb_host}:${devbuilds} 49 | -------------------------------------------------------------------------------- /Scripts/debian.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # A script to checkout and create .debs of the ImageVis3D repository. 3 | . util.sh || . Scripts/util.sh 4 | 5 | mode="debian" 6 | if test "$1" = "--ubuntu-ppa" ; then 7 | mode="ubuntu-ppa" 8 | fi 9 | 10 | version 11 | VER="${IV3D_MAJOR}.${IV3D_MINOR}.${IV3D_PATCH}" 12 | DEB_VER=1 13 | REPO=https://github.com/SCIInstitute/ImageVis3D.git 14 | 15 | function die { 16 | echo "$@" 17 | exit 1 18 | } 19 | 20 | rm -fr imagevis3d-${VER}* 21 | rm -f ./*.changes ./*.deb ./*.tar.gz ./*.dsc ./*.diff.gz ./*_source.upload \ 22 | ./*_source.changes 23 | 24 | rm -fr ImageVis3D # kill previous clone 25 | git clone --depth 1 ${REPO} > /dev/null || die "clone failed" 26 | (cd ImageVis3D && git submodule init) || die "could not init submodules" 27 | (cd ImageVis3D && git submodule update) || die "submodules couldn't be updated" 28 | 29 | if test "${mode}" = "ubuntu-ppa" ; then 30 | VER="${VER}~ppa" 31 | else 32 | VER="${VER}~git" 33 | fi 34 | 35 | rm -fr "imagevis3d-${VER}" 36 | mv ImageVis3D "imagevis3d-${VER}" || die "could not move dir" 37 | export GZIP="--best" 38 | tar zcf imagevis3d_${VER}.orig.tar.gz imagevis3d-${VER} 39 | 40 | pushd imagevis3d-${VER} || die "imagevis3d-${VER} directory does not exist" 41 | if test -d ../../notdebian ; then 42 | echo "Running from Scripts/? Using local debian dir." 43 | cp -R ../../notdebian debian || die "couldn't copy debian dir" 44 | else 45 | echo "Not running from scripts; using in-repo debian dir." 46 | ln -s notdebian debian || die "couldn't symlink debian dir" 47 | fi 48 | 49 | # Generate a valid changelog. 50 | pushd debian || die "no debian dir." 51 | if test "${mode}" = "ubuntu-ppa" ; then 52 | distroseries="saucy" 53 | else 54 | distroseries="unstable" 55 | fi 56 | echo "imagevis3d (${VER}-${DEB_VER}) ${distroseries}; urgency=low" > ncl 57 | echo "" >> ncl 58 | echo " * Nightly build." >> ncl 59 | echo "" >> ncl 60 | echo " -- Thomas Fogal $(date -R)" >> ncl 61 | echo "" >> ncl 62 | cat changelog >> ncl 63 | mv ncl changelog 64 | # So one can review what that generated: 65 | echo "changelog:" 66 | head changelog 67 | popd 68 | if test "${mode}" = "ubuntu-ppa" ; then 69 | dpkg-buildpackage -rfakeroot -sgpg -S -sa || die "buildpackage failed." 70 | else 71 | dpkg-buildpackage -rfakeroot -sgpg -sa -j4 || die "buildpackage failed" 72 | fi 73 | popd 74 | 75 | if test "${mode}" = "ubuntu-ppa" ; then 76 | lintian -I -i imagevis3d_${VER}-${DEB_VER}_source.changes | less 77 | read -p "dput to launchpad? " upload 78 | if test "${upload}" = "y"; then 79 | dput -f sci-ppa imagevis3d_${VER}-${DEB_VER}_source.changes 80 | fi 81 | else 82 | lintian -I -i imagevis3d_${VER}-${DEB_VER}_amd64.changes 83 | fi 84 | -------------------------------------------------------------------------------- /Scripts/dl.ps1: -------------------------------------------------------------------------------- 1 | cd Scripts 2 | $manual="http://www.sci.utah.edu/images/docs/imagevis3d.pdf" 3 | $mdata="http://ci.sci.utah.edu:8011/devbuilds/GettingDataIntoImageVis3D.pdf" 4 | $webClient = New-Object System.Net.WebClient 5 | $webClient.DownloadFile($manual, $pwd.path+"\installer\ImageVis3D.pdf") 6 | $webClient.DownloadFile($mdata, $pwd.path+"\installer\GettingDataIntoImageVis3D.pdf") 7 | -------------------------------------------------------------------------------- /Scripts/download-test-data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test -z "${IV3D_DATA_ROOT}" ; then 4 | echo "IV3D_DATA_ROOT environment variable not set. Bailing." 5 | exit 1 6 | fi 7 | 8 | unison \ 9 | -batch \ 10 | ${IV3D_DATA_ROOT} \ 11 | socket://155.98.20.225:43212/iv3d-test-data || exit 1 12 | -------------------------------------------------------------------------------- /Scripts/gcc-dev-cfg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #-D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED 4 | VIS="-fvisibility=hidden" 5 | INL="-fvisibility-inlines-hidden" 6 | DEBUG="-Wall -Wextra -D_DEBUG -O0 -ggdb3" 7 | CF="${DEBUG} -fstack-protector" 8 | CXF="${DEBUG} -D_GLIBCXX_CONCEPT_CHECK -fstack-protector" 9 | LF="" 10 | MKSPEC="" 11 | if test `uname -s` != "Darwin" ; then 12 | CF="${CF} -ggdb3 --param ssp-buffer-size=4" 13 | CXF="${CXF} -D_GLIBCXX_DEBUG -Werror --param ssp-buffer-size=4" 14 | CXF="${CXF} -D_GLIBCXX_DEBUG_PEDANTIC" 15 | LF="${LF}" 16 | else 17 | ALLWARN="" 18 | #ALLWARN='-Werror -Wno-padded -Wno-weak-vtables -Weverything' 19 | # -Wno-#warnings: Temporarily disable #warnings until a new release of QT is issued. 20 | # -Wno-padded: Don't care about 'adding bytes' to ensure byte alignment. 21 | # -Wno-weak-vtables: We have several classes which do not have out-of-line virtual 22 | # method definitions (resulting in the vtable being emitted in 23 | # every translation unit). Examples: Exception ( 24 | CF="${CF}" 25 | CXF="${CXF} ${ALLWARN}" 26 | MKSPEC="-spec unsupported/macx-clang" 27 | fi 28 | if test -n "${QT_BIN}" ; then 29 | echo "Using custom qmake..." 30 | qm="${QT_BIN}/qmake" 31 | else 32 | qm="qmake" 33 | fi 34 | for d in . tuvok/IO/test ; do 35 | pushd ${d} &>/dev/null 36 | ${qm} \ 37 | ${MKSPEC} \ 38 | QMAKE_CONFIG="debug" \ 39 | CONFIG="debug" \ 40 | QMAKE_CFLAGS+="${VIS} ${CF}" \ 41 | QMAKE_CXXFLAGS+="${VIS} ${INL} ${CF} ${CXF}" \ 42 | QMAKE_CFLAGS_RELEASE="-O0" \ 43 | QMAKE_CXXFLAGS_RELEASE="-O0" \ 44 | QMAKE_LFLAGS+="${LF}" \ 45 | -recursive || exit 1 46 | popd &>/dev/null 47 | done 48 | 49 | echo "Configure succeeded." 50 | exit 0 51 | -------------------------------------------------------------------------------- /Scripts/iv3d-arch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This exists so that CI can easily grab the arch string we'll embed into 3 | # tarballs and the like. 4 | source Scripts/util.sh 2>/dev/null|| source util.sh || exit 1 5 | 6 | sci_arch 7 | -------------------------------------------------------------------------------- /Scripts/mk_app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if test ! -z "$1" ; then 3 | IV3D_BUILD_TYPE=$1 4 | fi 5 | source Scripts/util.sh || source util.sh 6 | 7 | TARGETPATH=Build 8 | TARGETAPP=ImageVis3D.app 9 | PREFIX="${TARGETPATH}/${TARGETAPP}" 10 | 11 | if test -n "$1" -a -d "$1" ; then 12 | echo "Using '$1' as .app directory." 13 | PREFIX="$1" 14 | fi 15 | 16 | if ! test -d "${PREFIX}" ; then 17 | die "$PREFIX does not exist, build the application first!" 18 | fi 19 | 20 | echo "Copying Shaders ..." 21 | rm -f "${PREFIX}/Contents/Resources/*.glsl" 22 | mkdir -p "${PREFIX}/Contents/Resources" 23 | cp tuvok/Shaders/* "${PREFIX}/Contents/Resources" 24 | 25 | echo "Removing subversion garbage ..." 26 | find "${PREFIX}" -iname .svn -exec rm -fr {} + 27 | echo "done!" 28 | 29 | macdeployqt="macdeployqt" 30 | if test -n "${QT_BIN}" -a -x "${QT_BIN}/macdeployqt" ; then 31 | macdeployqt="${QT_BIN}/macdeployqt" 32 | fi 33 | echo "Running Qt's mac deployment tool." 34 | ${macdeployqt} ${PREFIX} 35 | 36 | version 37 | revision 38 | 39 | echo "Copying ImageVis3D Manual into app..." 40 | man=$(manual) 41 | import=$(import_data_manual) 42 | pushd ${PREFIX}/Contents/Resources 43 | rm -f ImageVis3D.pdf 44 | echo "Downloading manual from: ${man}" 45 | curl -skLO "${man}" 46 | mv $(basename "${man}") ImageVis3D.pdf 47 | echo "Downloading import data manual from: ${import}" 48 | curl -skLO "${import}" 49 | popd 50 | 51 | tarball=$(nm_tarball) 52 | zipfile=$(nm_zipfile) 53 | pushd Build/ &>/dev/null 54 | ver="${IV3D_MAJOR}.${IV3D_MINOR}.${IV3D_PATCH}" 55 | sed -i -e "s,VERSION,${ver}," \ 56 | ImageVis3D.app/Contents/Info.plist 57 | tar zcf ${tarball} ImageVis3D.app 58 | zip -9r ${zipfile} ImageVis3D.app 59 | popd &>/dev/null 60 | mv Build/${tarball} Build/${zipfile} . 61 | mkdir -p staging 62 | cp -R CmdLineConverter/Build/uvfconvert.app staging/ 63 | cp -R Build/ImageVis3D.app staging/ 64 | echo "Running Qt's mac deployment tool on uvfconvert..." 65 | pushd staging/ &>/dev/null 66 | ${macdeployqt} uvfconvert.app 67 | popd &>/dev/null 68 | echo "Copying manuals into root of dmg..." 69 | pushd staging/ &>/dev/null 70 | ln ImageVis3D.app/Contents/Resources/ImageVis3D.pdf 71 | ln ImageVis3D.app/Contents/Resources/$(basename "${import}") 72 | popd &>/dev/null 73 | hdiutil create \ 74 | -volname "ImageVis3D" \ 75 | -srcfolder staging/ \ 76 | -format UDZO \ 77 | -imagekey zlib-level=9 \ 78 | ${zipfile%%zip}dmg 79 | rm -fr staging/ 80 | hdiutil internet-enable -yes ${zipfile%%zip}dmg 81 | -------------------------------------------------------------------------------- /Scripts/mk_tarball.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Creates a tarball binary of ImageVis3D. 3 | if test ! -z "$1" ; then 4 | IV3D_BUILD_TYPE=$1 5 | fi 6 | source Scripts/util.sh 7 | 8 | tarball=$(nm_tarball) 9 | mkdir staging 10 | man=$(manual) 11 | import=$(import_data_manual) 12 | version 13 | pushd staging >/dev/null 14 | ver="${IV3D_MAJOR}.${IV3D_MINOR}.${IV3D_PATCH}" 15 | dir="ImageVis3D-${ver}" 16 | mkdir "${dir}" 17 | cp ../Build/ImageVis3D ./${dir} 18 | cp ../CmdLineConverter/Build/uvfconvert ${dir} 19 | cp -R ../Tuvok/Shaders ./${dir} 20 | rm -fr ${dir}/Shaders/.svn # remove dumb svn crap 21 | 22 | # grab manuals 23 | wget -q --no-check-certificate "${man}" 24 | mv $(basename "${man}") ImageVis3D.pdf # uppercase it. 25 | mv ImageVis3D.pdf ${dir} 26 | wget -q --no-check-certificate "${import}" 27 | mv $(basename "${import}") ${dir} 28 | 29 | # tar it all up 30 | GZIP="--best" tar zcf "${tarball}" ${dir} 31 | mv "${tarball}" ../ 32 | popd >/dev/null 33 | rm -fr staging 34 | -------------------------------------------------------------------------------- /Scripts/neon.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd ${HOME}/imagevis3d 3 | source Scripts/util.sh 4 | 5 | export PATH="${HOME}/sw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" 6 | # this affects what BSD mail uses for the Reply-To header: 7 | export REPLYTO="tfogal@sci.utah.edu" 8 | 9 | # if something should fail: 10 | em="tfogal@sci.utah.edu" 11 | # warnings and other information: 12 | full_em="tfogal@sci.utah.edu" 13 | 14 | status="status-neon" 15 | # like 'try' but sends an email if it fails. 16 | function mailtry 17 | { 18 | $@ 19 | if test $? -ne 0 ; then 20 | echo "'$@' failed, bailing .." 21 | echo "Command: '$@' failed..." >> ${status} 22 | cat ${status} | mail -s "Neon nightly FAILED" ${em} 23 | exit 1 24 | fi 25 | } 26 | 27 | echo "Using compiler version:" > ${status} 28 | g++ --version >> ${status} 29 | echo "" >> ${status} 30 | 31 | echo "On system:" >> ${status} 32 | uname -a >> ${status} 33 | echo "" >> ${status} 34 | 35 | echo "-------------------------------------" >> ${status} 36 | 37 | try cd ${HOME}/imagevis3d 38 | rm -f *.tar.gz *.zip *.dmg warnings 39 | 40 | mailtry sh Scripts/nightly.sh 41 | grep -v "IO/3rdParty" warnings > warn_no_3rd 42 | mv warn_no_3rd warnings 43 | cat warnings >> ${status} 44 | subj="" 45 | if test `file warnings | awk '{print $2}'` = "empty" ; then 46 | subj="Neon nightly (clean) -- `date`" 47 | else 48 | subj="Neon nightly (warnings) -- `date`" 49 | fi 50 | if test "$1" != "-q" ; then 51 | cat ${status} | mail -s "${subj}" ${full_em} 52 | fi 53 | devb="/usr/sci/projects/sciweb/devbuilds/imagevis3d/" 54 | mailtry scp *.zip tfogal@shell.sci.utah.edu:${devb} 55 | mailtry scp *.dmg tfogal@shell.sci.utah.edu:${devb} 56 | 57 | # Now update the `latest version' symlink. 58 | fn_zip=$(nm_zipfile) 59 | fn_zip="${devb}/${fn_zip}" 60 | fn_latest="${devb}/ImageVis3D-OSX-10.5-Latest.zip" 61 | mailtry ssh tfogal@shell.sci.utah.edu rm -f ${fn_latest} 62 | mailtry ssh tfogal@shell.sci.utah.edu rm -f ${fn_latest%%zip}dmg 63 | mailtry ssh tfogal@shell.sci.utah.edu ln -s ${fn_zip} ${fn_latest} 64 | mailtry ssh tfogal@shell.sci.utah.edu ln -s ${fn_zip%%zip}dmg \ 65 | ${fn_latest%%zip}dmg 66 | 67 | # Update the text file for determining the latest version. 68 | mailtry mv latest OSX_Latest_Version.txt 69 | mailtry scp OSX_Latest_Version.txt tfogal@shell.sci.utah.edu:${devb} 70 | -------------------------------------------------------------------------------- /Scripts/nightly.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source Scripts/util.sh 3 | 4 | spec="linux-g++" 5 | if test `uname` = "Darwin" ; then 6 | spec="macx-g++" 7 | fi 8 | vcs_update 9 | 10 | version 11 | revision 12 | 13 | if test "x$1" != "x--dirty" ; then 14 | make clean &>/dev/null 15 | # manual clean, just in case Qt's clean isn't good enough (it isn't.) 16 | find . \( -iname \*.o -or -iname moc_\*.cpp -or -iname ui_\*.h \) -delete 17 | fi 18 | rm -fr Build/ImageVis3D.app 19 | rm -f Build/ImageVis3D warnings 20 | 21 | # Find qmake -- expect it in PATH, but the user can set QT_BIN to pick a 22 | # specific Qt. 23 | if test -n "${QT_BIN}" -a -x "${QT_BIN}/qmake" ; then 24 | qmake="${QT_BIN}/qmake" 25 | echo "QT_BIN set; using ${qmake} instead of `which qmake`" 26 | else 27 | qmake="qmake" 28 | fi 29 | # use qmake to generate makefiles, potentially in debug mode. 30 | D_TUVOK="-DTUVOK_SVN_VERSION=${R_TUVOK}" 31 | D_IV3D="-DIV3D_SVN_VERSION=${R_IMAGEVIS3D}" 32 | CF="-fno-strict-aliasing ${D_TUVOK} ${D_IV3D} -U_DEBUG -DNDEBUG" 33 | CFG="release" 34 | if test "x$1" = "x-debug"; then 35 | CF="${CF} -Wextra -D_GLIBCXX_DEBUG -D_DEBUG -UNDEBUG -g" 36 | CFG="debug" 37 | fi 38 | ${qmake} \ 39 | QMAKE_CONFIG=${CFG} \ 40 | QMAKE_CFLAGS="${CF}" \ 41 | QMAKE_CXXFLAGS+="${CF}" \ 42 | QMAKE_LFLAGS="${CF} ${LDF} ${LDFLAGS}" \ 43 | -spec ${spec} \ 44 | -recursive 45 | if test $? -ne 0 ; then 46 | die "qmake failed." 47 | fi 48 | make -j3 2> warnings 49 | try make 50 | 51 | tarball=$(nm_tarball) 52 | zipfile=$(nm_zipfile) 53 | if test `uname` = "Darwin" ; then 54 | echo "Building app file ..." 55 | try bash Scripts/mk_app.sh 56 | elif test `uname` = "Linux" ; then 57 | echo "Packaging ..." 58 | try bash Scripts/mk_tarball.sh 59 | fi 60 | rm -f latest 61 | echo "${IV3D_MAJOR}.${IV3D_MINOR}.${IV3D_PATCH}" > latest 62 | echo "${R_IMAGEVIS3D}" >> latest 63 | echo "${TUVOK_MAJOR}.${TUVOK_MINOR}.${TUVOK_PATCH}" >> latest 64 | echo "${R_TUVOK}" >> latest 65 | 66 | if test -f warnings ; then 67 | echo "Warnings:" 68 | cat warnings 69 | fi 70 | -------------------------------------------------------------------------------- /Scripts/oneshot-debug.bat: -------------------------------------------------------------------------------- 1 | REM Script to build everything we can in a single invocation, using 2 | REM a set of options which is appropriate for creating debug builds. 3 | 4 | set w32_cf="-D_CRT_SECURE_NO_WARNINGS=1 -D_SCL_SECURE_NO_WARNINGS=1" 5 | REM qmake -tp vc ^ 6 | REM QMAKE_CFLAGS+=%w32_cf% ^ 7 | REM QMAKE_CXXFLAGS+=%w32_cf% ^ 8 | REM -recursive ^ 9 | REM ImageVis3d.pro 10 | 11 | set bld="msbuild" 12 | IF "%1"=="x64" ( 13 | REM Handle 64 bit compilation 14 | call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x64 15 | %bld% ^ 16 | ImageVis3D-2010.sln ^ 17 | /nologo ^ 18 | /p:Configuration="Debug",Platform=x64 ^ 19 | /t:Build ^ 20 | /m:2 21 | ) ELSE ( 22 | REM Handle 32 bit compilation 23 | call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" 24 | %bld% ^ 25 | ImageVis3D-2010.sln ^ 26 | /nologo ^ 27 | /p:Configuration="Debug",Platform=Win32 ^ 28 | /t:Build ^ 29 | /m:2 30 | ) 31 | 32 | pushd Tuvok\IO\test 33 | python ../3rdParty/cxxtest/cxxtestgen.py ^ 34 | --no-static-init ^ 35 | --error-printer ^ 36 | -o alltests.cpp ^ 37 | quantize.h ^ 38 | jpeg.h 39 | 40 | qmake -tp vc ^ 41 | QMAKE_CFLAGS+=%w32_cf% ^ 42 | QMAKE_CXXFLAGS+=%w32_cf% ^ 43 | -recursive ^ 44 | test.pro 45 | 46 | %bld% ^ 47 | cxxtester.vcproj ^ 48 | /nologo ^ 49 | /t:Build 50 | popd 51 | 52 | REM download documentation 53 | set manual="http://www.sci.utah.edu/images/docs/imagevis3d.pdf" 54 | set mdata="http://ci.sci.utah.edu:8011/devbuilds/GettingDataIntoImageVis3D.pdf" 55 | wget --no-check-certificate -q %manual% 56 | wget --no-check-certificate -q %mdata% 57 | 58 | REM bundle it. 59 | IF "%1"=="x64" ( 60 | iscc Scripts/installer/64-debug.iss 61 | ) ELSE ( 62 | iscc Scripts/installer/32-debug.iss 63 | ) 64 | -------------------------------------------------------------------------------- /Scripts/oneshot-debug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Script to build everything we can in a single invocation, using 3 | # a set of options which is appropriate for creating debug builds. 4 | 5 | IV3D_BUILD_TYPE="debug" 6 | VIS="-fvisibility=hidden" 7 | INL="-fvisibility-inlines-hidden" 8 | if test `uname -s` != "Darwin"; then 9 | if test "${CXX}" != "clang++"; then 10 | COVERAGE="-fprofile-arcs -ftest-coverage" 11 | fi 12 | else 13 | COVERAGE="" 14 | fi 15 | CF="-g -Wall -Wextra -O0 -D_DEBUG -fstack-protector ${COVERAGE}" 16 | CXF="-D_GLIBCXX_CONCEPT_CHECK -fstack-protector ${COVERAGE}" 17 | MKSPEC="" 18 | LDFLAGS="${COVERAGE}" 19 | 20 | if test "$1" == "32" ; then 21 | CF="${CF} -m32" 22 | CXF="${CXF} -m32" 23 | LDFLAGS="${LDFLAGS} -m32" 24 | fi 25 | 26 | # Darwin's debug STL support is broken. 27 | # Ditto: OpenMP 28 | if test `uname -s` != "Darwin"; then 29 | if test "${CXX}" == "clang++"; then 30 | # We are using clang on a linux system. Set Qt mkspec appropriately. 31 | MKSPEC="-spec unsupported/linux-clang" 32 | CXF="${CXF} -D_GLIBCXX_DEBUG" 33 | else 34 | CXF="${CXF} -D_GLIBCXX_DEBUG --param ssp-buffer-size=4 -Werror" 35 | LDFLAGS="${LDFLAGS} --param ssp-buffer-size=4" 36 | fi 37 | else 38 | # We don't turn -Werror on because of warnings that deal 39 | # with generated code, and some unused template specialization 40 | # warnings. 41 | MKSPEC="-spec unsupported/macx-clang" 42 | fi 43 | 44 | # Users can set the QT_BIN env var to point at a different Qt implementation. 45 | if test -n "${QT_BIN}" ; then 46 | echo "Using qmake from '${QT_BIN}' instead of the default from PATH." 47 | qm="${QT_BIN}/qmake" 48 | else 49 | qm="qmake" 50 | fi 51 | 52 | dirs="." 53 | dirs="$dirs Tuvok/IO/test" 54 | echo "Configuring..." 55 | for d in $dirs ; do 56 | pushd ${d} &> /dev/null || exit 1 57 | ${qm} \ 58 | -makefile \ 59 | ${MKSPEC} \ 60 | CONFIG+="debug" \ 61 | QMAKE_CFLAGS+="${VIS} ${CF}" \ 62 | QMAKE_CXXFLAGS+="${VIS} ${INL} ${CF} ${CXF}" \ 63 | QMAKE_LFLAGS+="${VIS} ${LDFLAGS}" \ 64 | -recursive || exit 1 65 | popd &> /dev/null 66 | done 67 | 68 | # Unless the user gave us input as to options to use, default to a small-scale 69 | # parallel build. 70 | if test -z "${MAKE_OPTIONS}" ; then 71 | MAKE_OPTIONS="-j2 -l 2.0" 72 | fi 73 | 74 | echo "BUILDING Tuvok..." 75 | make --no-print-directory ${MAKE_OPTIONS} || exit 1 76 | 77 | pushd Tuvok/IO/test &> /dev/null || exit 1 78 | make --no-print-directory ${MAKE_OPTIONS} || exit 1 79 | popd &> /dev/null 80 | 81 | echo "Bundling..." 82 | if test `uname -s` = "Darwin" ; then 83 | bash Scripts/mk_app.sh $IV3D_BUILD_TYPE 84 | else 85 | bash Scripts/mk_tarball.sh $IV3D_BUILD_TYPE 86 | fi 87 | -------------------------------------------------------------------------------- /Scripts/oneshot-release.bat: -------------------------------------------------------------------------------- 1 | REM IV3D release build 2 | 3 | set w32_cf="-D_CRT_SECURE_NO_WARNINGS=1 -D_SCL_SECURE_NO_WARNINGS=1" 4 | 5 | set bld="msbuild" 6 | IF "%1"=="x64" ( 7 | REM Handle 64 bit compilation 8 | call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x64 9 | %bld% ^ 10 | ImageVis3D-2010.sln ^ 11 | /nologo ^ 12 | /p:Configuration="Release (with DirectX)",Platform=x64 ^ 13 | /t:Build ^ 14 | /m:2 15 | ) ELSE ( 16 | REM Handle 32 bit compilation 17 | call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" 18 | %bld% ^ 19 | ImageVis3D-2010.sln ^ 20 | /nologo ^ 21 | /p:Configuration="Release (with DirectX)",Platform=Win32 ^ 22 | /t:Build ^ 23 | /m:2 24 | ) 25 | 26 | REM download documentation 27 | powershell -ExecutionPolicy Unrestricted -file Scripts\dl.ps1 28 | 29 | REM bundle it 30 | IF "%1"=="x64" ( 31 | iscc Scripts/installer/64.iss 32 | ) ELSE ( 33 | iscc Scripts/installer/32.iss 34 | ) 35 | 36 | -------------------------------------------------------------------------------- /Scripts/oneshot-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Script to build everything we can in a single invocation, using 3 | # a set of options which is appropriate for creating release builds. 4 | 5 | IV3D_BUILD_TYPE="release" 6 | VIS="-fvisibility=hidden" 7 | INL="-fvisibility-inlines-hidden" 8 | COVERAGE="" 9 | CF="-Wall -Wextra -O2 -fstack-protector ${COVERAGE}" 10 | CXF="-D_GLIBCXX_CONCEPT_CHECK -fstack-protector -DQT_NODEBUG ${COVERAGE}" 11 | QLF="" 12 | MKSPEC="" 13 | 14 | if test "$1" == "32" ; then 15 | CF="$CF -m32" 16 | COVERAGE="$COVERAGE -m32" 17 | fi 18 | 19 | LDFLAGS="${COVERAGE}" 20 | 21 | # Users can set the QT_BIN env var to point at a different Qt implementation. 22 | if test -n "${QT_BIN}" ; then 23 | echo "Using qmake from '${QT_BIN}' instead of the default from PATH." 24 | qm="${QT_BIN}/qmake" 25 | else 26 | qm="qmake" 27 | fi 28 | 29 | dirs="." 30 | if test `uname` != "Darwin" ; then 31 | dirs="$dirs Tuvok/IO/test" 32 | CXF="${CXF} -Werror --param ssp-buffer-size=4" 33 | CF="${CF} --param ssp-buffer-size=4" 34 | QLF="${QLF}" 35 | else 36 | # We don't turn -Werror on because of warnings that deal 37 | # with generated code, and some unused template specialization 38 | # warnings. 39 | MKSPEC="-spec unsupported/macx-clang" 40 | fi 41 | echo "Configuring..." 42 | for d in $dirs ; do 43 | pushd ${d} &> /dev/null || exit 1 44 | ${qm} \ 45 | -makefile \ 46 | ${MKSPEC} \ 47 | CONFIG+="release" \ 48 | QMAKE_CFLAGS+="${VIS} ${CF}" \ 49 | QMAKE_CXXFLAGS+="${VIS} ${INL} ${CF} ${CXF}" \ 50 | QMAKE_LFLAGS+="${VIS} ${COVERAGE} ${QLF}" \ 51 | -recursive || exit 1 52 | popd &> /dev/null 53 | done 54 | 55 | # Unless the user gave us input as to options to use, default to a small-scale 56 | # parallel build. 57 | if test -z "${MAKE_OPTIONS}" ; then 58 | MAKE_OPTIONS="-j2 -l 2.0" 59 | fi 60 | 61 | echo "BUILDING Tuvok..." 62 | make --no-print-directory ${MAKE_OPTIONS} || exit 1 63 | 64 | # Darwin's compiler is broken w.r.t. tr1, our IO tests won't work. 65 | if test `uname -s` != "Darwin" ; then 66 | pushd Tuvok/IO/test &> /dev/null || exit 1 67 | make --no-print-directory ${MAKE_OPTIONS} || exit 1 68 | popd &> /dev/null 69 | fi 70 | 71 | echo "Bundling..." 72 | if test `uname -s` = "Darwin" ; then 73 | bash Scripts/mk_app.sh $IV3D_BUILD_TYPE 74 | else 75 | bash Scripts/mk_tarball.sh $IV3D_BUILD_TYPE 76 | fi 77 | -------------------------------------------------------------------------------- /Scripts/revision.py: -------------------------------------------------------------------------------- 1 | # A replacement for "svn info . | grep Revision | awk '{print $2}', 2 | # because windows' shell is worthless. 3 | import subprocess 4 | import sys 5 | import os 6 | 7 | p1 = subprocess.Popen(["svn", "info", "%s" % sys.argv[1]], stdout=subprocess.PIPE) 8 | p2 = subprocess.Popen(["grep", "Revision"], stdin=p1.stdout, stdout=subprocess.PIPE) 9 | if os.name == "nt": 10 | p3 = subprocess.Popen(["gawk", "{print $2}"], stdin=p2.stdout, stdout=subprocess.PIPE) 11 | else: 12 | p3 = subprocess.Popen(["awk", "{print $2}"], stdin=p2.stdout, stdout=subprocess.PIPE) 13 | output = p3.communicate()[0] 14 | print output.rstrip() 15 | -------------------------------------------------------------------------------- /Scripts/version.py: -------------------------------------------------------------------------------- 1 | # A replacement for "grep IV3D_MAJOR StdDefines.h | awk "{print $3}" 2 | # because windows' shell is worthless. 3 | import subprocess 4 | import sys 5 | 6 | p1 = subprocess.Popen(["grep", "%s" % sys.argv[1], "ImageVis3D/StdDefines.h"], 7 | stdout=subprocess.PIPE) 8 | output = p1.communicate()[0] 9 | ver = output.split() 10 | print ver[2] 11 | -------------------------------------------------------------------------------- /Scripts/vg-nightly.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run valgrind on the converter. Intended for automatic operation. 3 | . Scripts/util.sh 4 | 5 | if ! test -f aneur.nrrd ; then 6 | wget http://www.sci.utah.edu/~tfogal/aneur.nrrd 7 | fi 8 | 9 | revs=$(revision) 10 | echo "revision: ${revs}" 11 | valgrind --leak-check=no --undef-value-errors=yes \ 12 | --log-file="vg-log-${revs}" \ 13 | CmdLineConverter/Build/UVFConverter \ 14 | -f aneur.nrrd \ 15 | -out tmp.uvf 16 | if test $? -ne 0 ; then 17 | echo "Abnormal termination." 18 | fi 19 | 20 | rm -f tmp.uvf 21 | -------------------------------------------------------------------------------- /StandaloneTuvok/3rdParty/compress.c: -------------------------------------------------------------------------------- 1 | /* compress.c -- compress a memory buffer 2 | * Copyright (C) 1995-2003 Jean-loup Gailly. 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id$ */ 7 | 8 | #define ZLIB_INTERNAL 9 | #include "zlib.h" 10 | 11 | /* =========================================================================== 12 | Compresses the source buffer into the destination buffer. The level 13 | parameter has the same meaning as in deflateInit. sourceLen is the byte 14 | length of the source buffer. Upon entry, destLen is the total size of the 15 | destination buffer, which must be at least 0.1% larger than sourceLen plus 16 | 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 17 | 18 | compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 19 | memory, Z_BUF_ERROR if there was not enough room in the output buffer, 20 | Z_STREAM_ERROR if the level parameter is invalid. 21 | */ 22 | int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) 23 | Bytef *dest; 24 | uLongf *destLen; 25 | const Bytef *source; 26 | uLong sourceLen; 27 | int level; 28 | { 29 | z_stream stream; 30 | int err; 31 | 32 | stream.next_in = (Bytef*)source; 33 | stream.avail_in = (uInt)sourceLen; 34 | #ifdef MAXSEG_64K 35 | /* Check for source > 64K on 16-bit machine: */ 36 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 37 | #endif 38 | stream.next_out = dest; 39 | stream.avail_out = (uInt)*destLen; 40 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; 41 | 42 | stream.zalloc = (alloc_func)0; 43 | stream.zfree = (free_func)0; 44 | stream.opaque = (voidpf)0; 45 | 46 | err = deflateInit(&stream, level); 47 | if (err != Z_OK) return err; 48 | 49 | err = deflate(&stream, Z_FINISH); 50 | if (err != Z_STREAM_END) { 51 | deflateEnd(&stream); 52 | return err == Z_OK ? Z_BUF_ERROR : err; 53 | } 54 | *destLen = stream.total_out; 55 | 56 | err = deflateEnd(&stream); 57 | return err; 58 | } 59 | 60 | /* =========================================================================== 61 | */ 62 | int Q_ZEXPORT compress (dest, destLen, source, sourceLen) 63 | Bytef *dest; 64 | uLongf *destLen; 65 | const Bytef *source; 66 | uLong sourceLen; 67 | { 68 | return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); 69 | } 70 | 71 | /* =========================================================================== 72 | If the default memLevel or windowBits for deflateInit() is changed, then 73 | this function needs to be updated. 74 | */ 75 | uLong ZEXPORT compressBound (sourceLen) 76 | uLong sourceLen; 77 | { 78 | return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; 79 | } 80 | -------------------------------------------------------------------------------- /StandaloneTuvok/3rdParty/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /StandaloneTuvok/3rdParty/inftrees.h: -------------------------------------------------------------------------------- 1 | /* inftrees.h -- header to use inftrees.c 2 | * Copyright (C) 1995-2005 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | /* Structure for decoding tables. Each entry provides either the 12 | information needed to do the operation requested by the code that 13 | indexed that table entry, or it provides a pointer to another 14 | table that indexes more bits of the code. op indicates whether 15 | the entry is a pointer to another table, a literal, a length or 16 | distance, an end-of-block, or an invalid code. For a table 17 | pointer, the low four bits of op is the number of index bits of 18 | that table. For a length or distance, the low four bits of op 19 | is the number of extra bits to get after the code. bits is 20 | the number of bits in this code or part of the code to drop off 21 | of the bit buffer. val is the actual byte to output in the case 22 | of a literal, the base length or distance, or the offset from 23 | the current table to the next table. Each entry is four bytes. */ 24 | typedef struct { 25 | unsigned char op; /* operation, extra bits, table bits */ 26 | unsigned char bits; /* bits in this part of the code */ 27 | unsigned short val; /* offset in table or code value */ 28 | } code; 29 | 30 | /* op values as set by inflate_table(): 31 | 00000000 - literal 32 | 0000tttt - table link, tttt != 0 is the number of table index bits 33 | 0001eeee - length or distance, eeee is the number of extra bits 34 | 01100000 - end of block 35 | 01000000 - invalid code 36 | */ 37 | 38 | /* Maximum size of dynamic tree. The maximum found in a long but non- 39 | exhaustive search was 1444 code structures (852 for length/literals 40 | and 592 for distances, the latter actually the result of an 41 | exhaustive search). The true maximum is not known, but the value 42 | below is more than safe. */ 43 | #define ENOUGH 2048 44 | #define MAXD 592 45 | 46 | /* Type of code to build for inftable() */ 47 | typedef enum { 48 | CODES, 49 | LENS, 50 | DISTS 51 | } codetype; 52 | 53 | extern int inflate_table OF((codetype type, unsigned short FAR *lens, 54 | unsigned codes, code FAR * FAR *table, 55 | unsigned FAR *bits, unsigned short FAR *work)); 56 | -------------------------------------------------------------------------------- /StandaloneTuvok/3rdParty/uncompr.c: -------------------------------------------------------------------------------- 1 | /* uncompr.c -- decompress a memory buffer 2 | * Copyright (C) 1995-2003 Jean-loup Gailly. 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id$ */ 7 | 8 | #define ZLIB_INTERNAL 9 | #include "zlib.h" 10 | 11 | /* =========================================================================== 12 | Decompresses the source buffer into the destination buffer. sourceLen is 13 | the byte length of the source buffer. Upon entry, destLen is the total 14 | size of the destination buffer, which must be large enough to hold the 15 | entire uncompressed data. (The size of the uncompressed data must have 16 | been saved previously by the compressor and transmitted to the decompressor 17 | by some mechanism outside the scope of this compression library.) 18 | Upon exit, destLen is the actual size of the compressed buffer. 19 | This function can be used to decompress a whole file at once if the 20 | input file is mmap'ed. 21 | 22 | uncompress returns Z_OK if success, Z_MEM_ERROR if there was not 23 | enough memory, Z_BUF_ERROR if there was not enough room in the output 24 | buffer, or Z_DATA_ERROR if the input data was corrupted. 25 | */ 26 | int Q_ZEXPORT uncompress (dest, destLen, source, sourceLen) 27 | Bytef *dest; 28 | uLongf *destLen; 29 | const Bytef *source; 30 | uLong sourceLen; 31 | { 32 | z_stream stream; 33 | int err; 34 | 35 | stream.next_in = (Bytef*)source; 36 | stream.avail_in = (uInt)sourceLen; 37 | /* Check for source > 64K on 16-bit machine: */ 38 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 39 | 40 | stream.next_out = dest; 41 | stream.avail_out = (uInt)*destLen; 42 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; 43 | 44 | stream.zalloc = (alloc_func)0; 45 | stream.zfree = (free_func)0; 46 | 47 | err = inflateInit(&stream); 48 | if (err != Z_OK) return err; 49 | 50 | err = inflate(&stream, Z_FINISH); 51 | if (err != Z_STREAM_END) { 52 | inflateEnd(&stream); 53 | if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) 54 | return Z_DATA_ERROR; 55 | return err; 56 | } 57 | *destLen = stream.total_out; 58 | 59 | err = inflateEnd(&stream); 60 | return err; 61 | } 62 | -------------------------------------------------------------------------------- /StandaloneTuvok/GLContext.h: -------------------------------------------------------------------------------- 1 | #ifndef __GL_CONTEXT 2 | #define __GL_CONTEXT 3 | 4 | #include 5 | #include 6 | 7 | #ifdef DETECTED_OS_WINDOWS 8 | #include 9 | #endif 10 | 11 | class GLContext 12 | { 13 | public: 14 | GLContext(UINT32 width, UINT32 height, BYTE colorBits = 32, BYTE depthBits = 24, BYTE stencilBits = 8, bool useDoubleBuffer = true, std::wostream * errorOutput = NULL); 15 | ~GLContext(); 16 | 17 | bool isValid() const { return valid; } 18 | bool set(); 19 | bool restorePrevious(); 20 | bool copyState(const GLContext & fromContext); 21 | bool swapBuffers(); 22 | 23 | private: 24 | #ifdef DETECTED_OS_WINDOWS 25 | HDC deviceContext, previousDeviceContext; 26 | HGLRC renderingContext, previousRenderingContext; 27 | HWND window; 28 | #else 29 | Window window, previousWindow; 30 | GLXContext renderingContext, previousRenderingContext; 31 | Display * display; 32 | #endif 33 | 34 | bool valid; 35 | std::wostream * errorStream; 36 | 37 | void outputWarning(const std::wstring & warning) const; 38 | void outputError(const std::wstring & error) const; 39 | void outputLastError() const; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /StandaloneTuvok/SmallImage.h: -------------------------------------------------------------------------------- 1 | #ifndef SMALLIMAGE_H 2 | #define SMALLIMAGE_H 3 | 4 | #include "StdTuvokDefines.h" 5 | #include 6 | #include 7 | #include "Basics/Vectors.h" 8 | 9 | typedef VECTOR3 Color; 10 | 11 | class SmallImage 12 | { 13 | public: 14 | SmallImage(unsigned int width, unsigned int height, unsigned int iComponentCount); 15 | SmallImage(const std::string& filename); 16 | virtual ~SmallImage(void); 17 | 18 | static bool PeekBMPHeader(const std::string& filename, UINTVECTOR2& size, unsigned int& iComponentCount); 19 | 20 | bool SaveToRAWFile(const std::string& filename) const; 21 | bool SaveToBMPFile(const std::string& filename) const; 22 | 23 | void SetPixel(unsigned int x, unsigned int y, uint8_t r, uint8_t g, uint8_t b, uint8_t a); 24 | void SetPixel(unsigned int x, unsigned int y, uint8_t r, uint8_t g, uint8_t b); 25 | void SetPixel(unsigned int x, unsigned int y, uint8_t grey); 26 | void SetPixel(unsigned int x, unsigned int y, const Color& c); 27 | 28 | void GetPixel(unsigned int x, unsigned int y, uint8_t& r, uint8_t& g, uint8_t& b, uint8_t& a) const; 29 | void GetPixel(unsigned int x, unsigned int y, uint8_t& r, uint8_t& g, uint8_t& b) const; 30 | void GetPixel(unsigned int x, unsigned int y, uint8_t& grey) const; 31 | void GetPixel(unsigned int x, unsigned int y, Color& c) const; 32 | Color GetPixel(unsigned int x, unsigned int y) const; 33 | 34 | int ComponentCount() const {return m_iComponentCount;} 35 | int Height() const {return m_size.y;} 36 | int Width() const {return m_size.x;} 37 | int Area() const {return m_size.area();} 38 | const UINTVECTOR2& GetSize() const {return m_size;} 39 | 40 | void ForceComponentCount(unsigned int newCompCount, uint8_t padValue=255); 41 | void Resample(unsigned int newWidth, unsigned int newHeight, bool bKeepAspect=false); 42 | SmallImage* GeneratePreviewImage(unsigned int newWidth, unsigned int newHeight, bool bKeepAspect=false); 43 | 44 | const uint8_t* GetDataPtr() const { return m_pData;} 45 | uint8_t* GetDataPtrRW() { return m_pData;} 46 | 47 | 48 | private: 49 | UINTVECTOR2 m_size; 50 | unsigned int m_iComponentCount; 51 | uint8_t *m_pData; 52 | 53 | static bool PeekBMPHeader(const std::string& filename, UINTVECTOR2& size, unsigned int& iComponentCount, bool& bUpsideDown, int& iOffsetToData); 54 | 55 | void InitData(); 56 | bool LoadFromBMP(const std::string& filename); 57 | 58 | size_t OneDIndex(unsigned int x, unsigned int y) const { return size_t(m_iComponentCount*(x+y*m_size.x)); } 59 | void Resample(uint8_t* pTarget, unsigned int newWidth, unsigned int newHeight); 60 | void AdjustToAspect(unsigned int& newWidth, unsigned int& newHeight); 61 | }; 62 | 63 | #endif // SMALLIMAGE_H 64 | -------------------------------------------------------------------------------- /StandaloneTuvok/StandaloneTuvok.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30110.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StandaloneTuvok", "StandaloneTuvok.vcxproj", "{D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {D474A1E1-2ED3-42E6-826C-372430E549B9} = {D474A1E1-2ED3-42E6-826C-372430E549B9} 9 | EndProjectSection 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tuvok", "..\Tuvok\Tuvok.vcxproj", "{D474A1E1-2ED3-42E6-826C-372430E549B9}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Win32 = Debug|Win32 16 | Debug|x64 = Debug|x64 17 | Release|Win32 = Release|Win32 18 | Release|x64 = Release|x64 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}.Debug|Win32.Build.0 = Debug|Win32 23 | {D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}.Debug|x64.ActiveCfg = Debug|x64 24 | {D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}.Debug|x64.Build.0 = Debug|x64 25 | {D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}.Release|Win32.ActiveCfg = Release|Win32 26 | {D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}.Release|Win32.Build.0 = Release|Win32 27 | {D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}.Release|x64.ActiveCfg = Release|x64 28 | {D1D7C8D7-C8E8-4A36-A049-FFBDEB742875}.Release|x64.Build.0 = Release|x64 29 | {D474A1E1-2ED3-42E6-826C-372430E549B9}.Debug|Win32.ActiveCfg = Debug (No Qt)|Win32 30 | {D474A1E1-2ED3-42E6-826C-372430E549B9}.Debug|Win32.Build.0 = Debug (No Qt)|Win32 31 | {D474A1E1-2ED3-42E6-826C-372430E549B9}.Debug|x64.ActiveCfg = Debug (No Qt)|x64 32 | {D474A1E1-2ED3-42E6-826C-372430E549B9}.Debug|x64.Build.0 = Debug (No Qt)|x64 33 | {D474A1E1-2ED3-42E6-826C-372430E549B9}.Release|Win32.ActiveCfg = Release (No Qt)|Win32 34 | {D474A1E1-2ED3-42E6-826C-372430E549B9}.Release|Win32.Build.0 = Release (No Qt)|Win32 35 | {D474A1E1-2ED3-42E6-826C-372430E549B9}.Release|x64.ActiveCfg = Release (No Qt)|x64 36 | {D474A1E1-2ED3-42E6-826C-372430E549B9}.Release|x64.Build.0 = Release (No Qt)|x64 37 | EndGlobalSection 38 | GlobalSection(SolutionProperties) = preSolution 39 | HideSolutionNode = FALSE 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /StandaloneTuvok/readme.txt: -------------------------------------------------------------------------------- 1 | Compiling the Tuvok without ImageVis3D demo: 2 | 3 | 1) compile Tuvok with the TUVOK_NO_QT macro in StdTuvokDefines.h enabled 4 | making sure you use the same profile (DEBUG vs. RELEASE) as for this project 5 | 2) copy the library to this directory 6 | 3) copy the Tuvok Shaders directory to this directory 7 | 4) Build this Program 8 | 5) Run the program with -d "datafilename" 9 | 6) a single bmp image "image.bmp" will be created -------------------------------------------------------------------------------- /UVFReader/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /UVFReader/TuvokReader.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {f868371d-022b-43ef-878e-a34d9e84f6d7} 6 | 7 | 8 | 9 | 10 | DebugOut 11 | 12 | 13 | 14 | 15 | 16 | DebugOut 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /UVFReader/UVFReader.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | win32:TEMPLATE = vcapp 3 | CONFIG += exceptions largefile qt rtti static stl warn_on 4 | CONFIG -= app_bundle 5 | macx:DEFINES += QT_MAC_USE_COCOA=1 6 | TARGET = Build/UVFReader 7 | unix:TARGET = Build/uvf 8 | macx { 9 | DESTDIR = Build 10 | TARGET = uvf 11 | } 12 | QT += opengl 13 | DEPENDPATH += . 14 | INCLUDEPATH += . 15 | INCLUDEPATH += ../Tuvok/IO/3rdParty/boost 16 | INCLUDEPATH += ../Tuvok/3rdParty/GLEW 17 | INCLUDEPATH += ../Tuvok 18 | INCLUDEPATH += ../Tuvok/Basics/3rdParty 19 | INCLUDEPATH += ../Tuvok/Basics 20 | QMAKE_LIBDIR += ../Tuvok/Build 21 | QMAKE_LIBDIR += ../Tuvok/IO/expressions 22 | LIBS = -lTuvok -ltuvokexpr 23 | unix:LIBS += -lz 24 | win32:LIBS += shlwapi.lib 25 | QMAKE_CXXFLAGS_WARN_ON += -Wno-unknown-pragmas 26 | unix:QMAKE_CXXFLAGS += -std=c++0x 27 | unix:QMAKE_CXXFLAGS += -fno-strict-aliasing 28 | unix:QMAKE_CFLAGS += -fno-strict-aliasing 29 | !macx:unix:QMAKE_LFLAGS += -fopenmp 30 | 31 | # Try to link to GLU statically. 32 | gludirs = /usr/lib /usr/lib/x86_64-linux-gnu 33 | found=false 34 | for(d, gludirs) { 35 | if(exists($${d}/libGLU.a)) { 36 | LIBS += $${d}/libGLU.a 37 | found=true 38 | } 39 | } 40 | if(!found) { 41 | # not mac: GLU comes in the GL framework. 42 | unix:!macx:LIBS += -lGLU 43 | } 44 | unix:!macx:LIBS += -lGL 45 | 46 | macx:QMAKE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=10.7 47 | macx:QMAKE_CFLAGS += -mmacosx-version-min=10.7 48 | macx:LIBS += -stdlib=libc++ -framework CoreFoundation -mmacosx-version-min=10.7 49 | 50 | # Find the location of QtGui's prl file, and include it here so we can look at 51 | # the QMAKE_PRL_CONFIG variable. 52 | TEMP = $$[QT_INSTALL_LIBS] libQtGui.prl 53 | PRL = $$[QT_INSTALL_LIBS] QtGui.framework/QtGui.prl 54 | TEMP = $$join(TEMP, "/") 55 | PRL = $$join(PRL, "/") 56 | exists($$TEMP) { 57 | include($$TEMP) 58 | } 59 | exists($$PRL) { 60 | include($$PRL) 61 | } 62 | 63 | ### Should we link Qt statically or as a shared lib? 64 | # If the PRL config contains the `shared' configuration, then the installed 65 | # Qt is shared. In that case, disable the image plugins. 66 | contains(QMAKE_PRL_CONFIG, shared) { 67 | QTPLUGIN -= qgif qjpeg qtiff 68 | } else { 69 | QTPLUGIN += qgif qjpeg qtiff 70 | } 71 | 72 | # Input 73 | HEADERS += ../CmdLineConverter/DebugOut/HRConsoleOut.h \ 74 | DataSource.h \ 75 | BlockInfo.h 76 | 77 | 78 | SOURCES += ../CmdLineConverter/DebugOut/HRConsoleOut.cpp \ 79 | main.cpp 80 | -------------------------------------------------------------------------------- /doc/helium.py: -------------------------------------------------------------------------------- 1 | db = "/path/to/dataset.silo" 2 | OpenDatabase(db) 3 | 4 | AddPlot("Pseudocolor", "helium") 5 | AddOperator("Resample") 6 | ra = ResampleAttributes() 7 | ra.samplesX = 512 8 | ra.samplesY = 512 9 | ra.samplesZ = 512 10 | ra.distributedResample = False 11 | SetOperatorOptions(ra) 12 | 13 | DrawPlots() 14 | dbAtts = ExportDBAttributes() 15 | dbAtts.db_type = "BOV" 16 | dbAtts.filename = "singlehelium" 17 | dbAtts.variables = ("helium") 18 | ExportDatabase(dbAtts) 19 | 20 | RemoveAllOperators() 21 | DeleteAllPlots() 22 | 23 | CloseDatabase(db) 24 | 25 | import sys 26 | sys.exit(0) 27 | -------------------------------------------------------------------------------- /doc/imagevis3d.1: -------------------------------------------------------------------------------- 1 | .TH IMAGEVIS3D "1" "May 19, 2009" "SCI" "User Commands" 2 | .\" Please adjust this date whenever revising the manpage. 3 | .\" 4 | .\" Some roff macros, for reference: 5 | .\" .nh disable hyphenation 6 | .\" .hy enable hyphenation 7 | .\" .ad l left justify 8 | .\" .ad b justify to both left and right margins 9 | .\" .nf disable filling 10 | .\" .fi enable filling 11 | .\" .br insert line break 12 | .\" .sp insert n+1 empty lines 13 | .\" for manpage-specific macros, see man(7) 14 | .SH NAME 15 | imagevis3d \- desktop out of core volume rendering application. 16 | .SH SYNOPSIS 17 | .B imagevis3d 18 | .RI [ options ] " files" ... 19 | .SH DESCRIPTION 20 | \fBimagevis3d\fP 21 | is a volume rendering application designed to handle extremely large data. By 22 | bricking a dataset (splitting it into constant-sized chunks) and only requiring 23 | one chunk to be resident in main memory, ImageVis3D's memory usage remains 24 | constant across dataset sizes. 25 | .PP 26 | ImageVis3D uses Tuvok to render and composite the bricks. Tuvok relies heavily 27 | on GLSL to provide accelerated volume rendering. As such, a somewhat recent 28 | video card is required. In practice, this effectively means that Linux systems 29 | currently require a nvidia card with nvidia's drivers. 30 | .SH OPTIONS 31 | The command line options of \fBimagevis3d\fP are: 32 | .TP 33 | .B \-script \fIfilename\fP 34 | Runs the script file given in \fIfilename\fP. 35 | .TP 36 | .B \-log [\fIfilename\fP, \fI\-\fP] 37 | Logs debug information \fIfilename\fP, or stdout (\fI\-\fP) 38 | .TP 39 | .B \-loglevel [\fI0\fP, \fI1\fP, \fI2\fP] 40 | Changes the verbosity of the log. 41 | .SH AUTHOR 42 | imagevis3d was written by the SCI Institute, with support from the NIH NCRR and 43 | DOE VACET programs. 44 | -------------------------------------------------------------------------------- /doc/uvfconvert.1: -------------------------------------------------------------------------------- 1 | .TH uvfconvert "1" "May 3, 2010" "SCI" "User Commands" 2 | .\" Please adjust this date whenever revising the manpage. 3 | .\" 4 | .\" Some roff macros, for reference: 5 | .\" .nh disable hyphenation 6 | .\" .hy enable hyphenation 7 | .\" .ad l left justify 8 | .\" .ad b justify to both left and right margins 9 | .\" .nf disable filling 10 | .\" .fi enable filling 11 | .\" .br insert line break 12 | .\" .sp insert n+1 empty lines 13 | .\" for manpage-specific macros, see man(7) 14 | .SH NAME 15 | uvfconvert \- convert files to UVF. 16 | .SH SYNOPSIS 17 | .B uvfconvert 18 | .RI \-i 19 | .RI \fIfile\fP 20 | [ options ] \-o \fIoutput\fP 21 | .SH DESCRIPTION 22 | \fBuvfconvert\fP 23 | is a command line tool to convert data into UVF, the native format for the 24 | desktop volume rendering program 25 | \fBimagevis3d\fP. 26 | Unlike ImageVis3D, the tool can be run on headless nodes with no GPUs 27 | installed, and utilizes very little memory even for extremely large 28 | data. 29 | .SH OPTIONS 30 | The command line options of \fBuvfconvert\fP are: 31 | .TP 32 | .B \-i \fIfilename\fP, \-\-input \fIfilename\fP 33 | The input data set to convert. Must be in one of ImageVis3D's supported file 34 | formats (see the "Getting Data Into ImageVis3D" manual). For merging multiple 35 | data sets, this option is accepted multiple times. 36 | .TP 37 | .B \-d \fIpath\fP, \-\-directory \fIpath\fP 38 | Input data to convert, if stored as a stack in a directory. Sets of images or 39 | DICOMs commonly come in this format. 40 | 41 | One of \-i or \-d is required. 42 | .TP 43 | .B \-s \fIfloating point number\fP, \-\-scale \fIfloating point number\fP 44 | Optional. When merging multiple data sets, this scaling factor will be 45 | applied to all values in the second file. Defaults to 0.0. 46 | .TP 47 | .B \-b \fIfloating point number\fP, \-\-bias \fIfloating point number\fP 48 | Optional. When merging multiple data sets, this bias factor will be 49 | applied to all values in the second file. Defaults to 0.0. 50 | .TP 51 | .B \-o \fIfilename\fP, \-\-output \fIfilename\fP 52 | Required. The filename which will be generated. 53 | .TP 54 | .B \-\-version 55 | Optional. Display a version number and then exit. 56 | .TP 57 | .B \-\-, \-\-ignore-rest 58 | Optional. Any arguments following these flags will be ignored by the program. 59 | .TP 60 | .SH AUTHOR 61 | ImageVis3D and all associated software was written at the SCI Institute, with 62 | support from the NIH NCRR and DoE VACET programs. 63 | 64 | Our primary source of funding comes from demonstrating that our 65 | software enables research. Please contact us if you find ImageVis3D 66 | beneficial. 67 | -------------------------------------------------------------------------------- /notdebian/README.Debian: -------------------------------------------------------------------------------- 1 | imagevis3d for Debian 2 | --------------------- 3 | 4 | The builtin autoupdate feature will at best not work, and at worst be 5 | unreliable, using the Debianized version of ImageVis3D. Use your package 6 | manager to manage new versions. 7 | 8 | -- Tom Fogal Tue, 19 May 2009 13:34:29 -0600 9 | -------------------------------------------------------------------------------- /notdebian/changelog: -------------------------------------------------------------------------------- 1 | imagevis3d (2.1.1-1.0) unstable; urgency=low 2 | 3 | * Non-maintainer upload. 4 | * New upstream release. 5 | 6 | -- Thomas Fogal Mon, 20 Aug 2012 18:03:56 -0600 7 | 8 | imagevis3d (2.1.0-1.0) unstable; urgency=low 9 | 10 | * Non-maintainer upload. 11 | * New upstream release. 12 | 13 | -- Thomas Fogal Thu, 12 Jul 2012 15:42:21 -0600 14 | 15 | 16 | imagevis3d (1.1.1-1.0) unstable; urgency=low 17 | 18 | * Non-maintainer upload. 19 | * New upstream release. 20 | 21 | -- Thomas Fogal Fri, 26 Jun 2009 17:42:33 -0600 22 | 23 | imagevis3d (1.1-1.0) unstable; urgency=low 24 | 25 | * Non-maintainer upload. 26 | * New upstream release. 27 | 28 | -- Thomas Fogal Sat, 06 Jun 2009 16:49:49 -0600 29 | 30 | imagevis3d (1.0-1.1) unstable; urgency=low 31 | 32 | * Non-maintainer upload. 33 | * New upstream release. 34 | 35 | -- Thomas Fogal Fri, 29 May 2009 17:34:41 -0600 36 | 37 | imagevis3d (1.0rc1-1.1) unstable; urgency=low 38 | 39 | * Non-maintainer upload. 40 | * Fixed some typos in the long description. 41 | 42 | -- Thomas Fogal Tue, 26 May 2009 19:35:50 -0600 43 | 44 | imagevis3d (1.0rc1-1.0) unstable; urgency=low 45 | 46 | * Non-maintainer upload. 47 | * Initial release (Closes: #530666) 48 | 49 | -- Thomas Fogal Tue, 19 May 2009 13:34:29 -0600 50 | -------------------------------------------------------------------------------- /notdebian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /notdebian/control: -------------------------------------------------------------------------------- 1 | Source: imagevis3d 2 | Section: x11 3 | Priority: optional 4 | Maintainer: Thomas Fogal 5 | Build-Depends: debhelper (>= 7), bison, flex, libqt4-dev, qt4-dev-tools, libqt4-opengl-dev, zlib1g-dev, libbz2-dev 6 | Standards-Version: 3.9.4 7 | Homepage: http://www.imagevis3d.org/ 8 | 9 | Package: imagevis3d 10 | Architecture: any 11 | Depends: ${shlibs:Depends}, libqtcore4, libqtgui4, libqt4-opengl, libqt4-network, zlib1g, libbz2 12 | Description: desktop volume rendering application for large data 13 | ImageVis3D is a volume rendering application specifically designed to 14 | render large data. This is achieved by splitting the dataset into 15 | multiple levels of detail (LoD), with each level itself decomposed 16 | into multiple bricks (atomic rendering primitive). Interaction occurs 17 | at the coarsest LoD, which can be rendered instantaneously on almost 18 | all modern systems. After a configurable delay, ImageVis3D will 19 | successively render finer levels of detail, until the data are visible 20 | at their native resolution. 21 | . 22 | Development of ImageVis3D is sponsored by the NIH/NCRR Center for Integrative 23 | Biomedical Computing (CIBC), and the DOE Visualization And Analytics Center 24 | for Enabling Technologies (VACET). 25 | -------------------------------------------------------------------------------- /notdebian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Tom Fogal on 2 | Tue, 19 May 2009 13:34:29 -0600. 3 | 4 | It was downloaded from https://gforge.sci.utah.edu/svn/imagevis3d 5 | 6 | Upstream Authors: 7 | 8 | Tom Fogal 9 | Jens Krueger 10 | 11 | Copyright: 12 | 13 | Copyright (C) 2008-2009 SCI Institute 14 | 15 | License: 16 | 17 | MIT 18 | 19 | The Debian packaging is (C) 2009, Tom Fogal and 20 | is licensed under the GPL, see `/usr/share/common-licenses/GPL'. 21 | -------------------------------------------------------------------------------- /notdebian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | -------------------------------------------------------------------------------- /notdebian/imagevis3d.substvars: -------------------------------------------------------------------------------- 1 | shlibs:Depends=libc6 (>= 2.7-1), libgcc1 (>= 1:4.1.1), libgl1-mesa-glx | libgl1, libglu1-mesa | libglu1, libqt4-network (>= 4.4.3), libqt4-opengl (>= 4.4.3), libqtcore4 (>= 4.4.3), libqtgui4 (>= 4.4.3), libstdc++6 (>= 4.1.1), zlib1g (>= 1:1.1.4) 2 | -------------------------------------------------------------------------------- /notdebian/menu: -------------------------------------------------------------------------------- 1 | ?package(imagevis3d):needs="X11|vc|wm" section="Science/Data Analysis"\ 2 | title="ImageVis3D" command="/usr/bin/imagevis3d" 3 | -------------------------------------------------------------------------------- /notdebian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | 3 | # Site Directory Pattern Version Script 4 | software.sci.utah.edu / ImageVis3D-(.*)\.tar.gz debian uupdate 5 | -------------------------------------------------------------------------------- /pre-commit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # See: http://longair.net/blog/2011/04/09/missing-git-hooks-documentation/ 4 | 5 | # Check to see if there are any modifications in the ./Tuvok directory. 6 | unset GIT_DIR 7 | unset GIT_INDEX_FILE 8 | CHANGES=`git --git-dir=Tuvok/.git --work-tree=Tuvok status --porcelain` 9 | 10 | if [ "$CHANGES" == "" ]; then 11 | exit 0 12 | else 13 | echo "[POLICY] You cannot make changes to Tuvok in the ImageVis3D repo.\n" 14 | echo "Please clone Tuvok separately, make your changes, then update\nthe Tuvok submodule in ImageVis3D. To update the submodule,\nuse 'git checkout master' followed by 'git pull' in the Tuvok\nsubmodule directory." 15 | exit 1 16 | fi 17 | 18 | -------------------------------------------------------------------------------- /ui_files.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 5 | Midl 6 | CustomBuild 7 | 8 | 9 | _SelectedFiles;$(UIDependsOn) 11 | 12 | 13 | 14 | $(QTDIR32)\bin\uic.exe "%(FullPath)" -o "%(RootDir)%(Directory)..\AutoGen\ui_%(Filename).h" 15 | %(RootDir)%(Directory)..\AutoGen\ui_%(Filename).h 16 | Creating UI File ui_%(Filename).h ... 17 | 18 | 19 | 21 | Midl 22 | CustomBuild 23 | 24 | 25 | _SelectedFiles;$(QRCDependsOn) 27 | 28 | 29 | 30 | $(QTDIR32)\bin\rcc.exe "%(FullPath)" -o "$(OutDir)..\..\rcc\qrc_%(Filename).cpp" 31 | $(OutDir)..\..\rcc\qrc_%(Filename).cpp 32 | Creating CPP File from resource %(Filename).rcc ... 33 | 34 | 35 | -------------------------------------------------------------------------------- /ui_files.rules: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 15 | 16 | 17 | 18 | 26 | 27 | 28 | 29 | 30 | 31 | --------------------------------------------------------------------------------