Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opj_flviewer-0.2.10 supersedes #744 #756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,18 @@ mark_as_advanced(BUILD_VIEWER)
mark_as_advanced(BUILD_JAVA)
mark_as_advanced(BUILD_JP3D)

option(BUILD_FLVIEWER "Build the flviewer executable (C++)" OFF)
option(BUILD_FLVIEWER_WITH_JPWL_LIB "Build the flviewer with JPWL library" OFF)
option(FLTK_SKIP_OPENGL "Build flviewer without OPENGL support" ON)
option(BUILD_WITH_GERMAN "Build flviewer with GERMAN language" OFF)
if(FLTK_SKIP_OPENGL)
SET(FLTK_GL_LIBRARY "")
endif()
mark_as_advanced(BUILD_FLVIEWER)
mark_as_advanced(BUILD_FLVIEWER_WITH_JPWL_LIB)
mark_as_advanced(FLTK_SKIP_OPENGL)
mark_as_advanced(BUILD_WITH_GERMAN)

if(BUILD_CODEC OR BUILD_MJ2)
# OFF: It will only build 3rd party libs if they are not found on the system
# ON: 3rd party libs will ALWAYS be build, and used
Expand Down
8 changes: 6 additions & 2 deletions src/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ endif()
if(BUILD_JP3D)
add_subdirectory(jp3d)
endif()

if(BUILD_VIEWER)
# wx apps:
add_subdirectory(wx)
add_subdirectory(wx)
endif()
if(BUILD_FLVIEWER)
add_subdirectory(fltk)
endif()
4 changes: 4 additions & 0 deletions src/bin/fltk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if(BUILD_FLVIEWER)
add_subdirectory(flviewer)
endif()

90 changes: 90 additions & 0 deletions src/bin/fltk/README.flviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
**If you want to use 'flviewer' for LINUX, APPLE, MS-WINDOWS:**

* Download the FLTK library from

http://www.fltk.org

e.g. fltk-1.3.x-r10813.tar.bz2
and expand it.

* For versions < r10813 MANUALLY uncomment in

FL/Enumerations.H

the line

//#define FL_ABI_VERSION 10304

If you do not

#define FL_ABI_VERSION 10304

the horizontal BAR of the tree window is not activated.

* For versions >= r10813, you can do:

either: configure --with-abiversion=10304
or : cmake -DFL_ABI_VERSION:string="10304"

NOTE: this may be changed.

* MS-WINDOWS may need in-source configuration/compilation.

MS-WINDOWS out-source configuration/compilation may need
'-DOPTION_BUILD_EXAMPLES:bool=off'.

* Compile and install the FLTK library.

* For FLVIEWER, CMAKE arguments for the OPENJPEG library may be:

-DBUILD_SHARED_LIBS:bool=on
-DBUILD_FLVIEWER:bool=on
-DFLTK_SKIP_OPENGL:bool=on
-DBUILD_WITH_GERMAN:bool=off

* Compile the OPENJPEG library.

* Call 'bin/flviewer --version'.

* Call 'bin/flviewer' to test the application.

* Some files with a large number of SOP markers, e.g.

'openjpeg-data/input/conformance/p0_07.j2k'

with 256 tiles, may need some time. On my computer about 2 minutes.
The SOP markers are therefore ON only on demand (read_jpeg2000.cxx).

* The FLVIEWER menu has some buttons, inputs and outputs:

**Tracks, Frames, Threads :** for MJ2
**Stop, Go on, Restart, Close, <-Step, Step-> :** for MJ2, JPX, JPM
**Tile, Reduction and Area :** for JP2/J2K, JPM, JPX
**Section and Browse :** for all file types
**Layer and Component :** for resp. files

**To use 'Section':**
Push the left mouse button and draw a rectangle
Press 'Section'
To remove the rectangle, click into the main window

In the section window use the right mouse button to select an action.

Only one section window can be open.

Use the right mouse button to close the section window.

If you handle an animation of type MJ2 you must first press
the 'Stop' button to stop the movie before you can get a section.

* Install the OPENJPEG library.

* JPM and JPX files can be found on:

http://home.arcor.de/szukw000

or (possibly) on

https://share.openanalytics.eu/data/public/76cb6a.php
https://share.openanalytics.eu/data/public/1e7708.php

27 changes: 27 additions & 0 deletions src/bin/fltk/flviewer/CMake/FindNPTH.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# - Find NPTH library
#
# NPTH_INCLUDE_DIR
# NPTH_LIBRARIES
# NPTH_FOUND
#
# also defined, but not for general use are
# NPTH_LIBRARY

FIND_PATH(NPTH_INCLUDE_DIR npth.h
PATHS /usr/include /usr/local/include /opt/include /opt/local/include)

SET(NPTH_NAMES ${NPTH_NAMES} npth libnpth libnpth_static)

FIND_LIBRARY(NPTH_LIBRARY NAMES ${NPTH_NAMES} )

MARK_AS_ADVANCED(NPTH_INCLUDE_DIR NPTH_LIBRARY)

# handle the QUIETLY and REQUIRED arguments and set NPTH_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NPTH DEFAULT_MSG NPTH_LIBRARY NPTH_INCLUDE_DIR)

IF(NPTH_FOUND)
SET(NPTH_INCLUDE_DIRS ${NPTH_INCLUDE_DIR})
SET(NPTH_LIBRARIES ${NPTH_LIBRARY} )
ENDIF(NPTH_FOUND)
124 changes: 124 additions & 0 deletions src/bin/fltk/flviewer/CMake/defs.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#
INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
CHECK_FUNCTION_EXISTS(_fseeki64 HAVE_FSEEKI64)
CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO)
#
INCLUDE(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
#
CHECK_TYPE_SIZE("ptrdiff_t" PTRDIFF_HAS_SIZE)
IF(PTRDIFF_HAS_SIZE)
SET(PTRDIFF_S "#define PTRDIFF_T ptrdiff_t")
IF(UNIX)
SET(PTRDIFF_FORMAT_S "#define PTRDIFF_FORMAT \"%ld\"")
ELSE()
IF(PTRDIFF_HAS_SIZE EQUAL 8)
SET(PTRDIFF_FORMAT_S "#define PTRDIFF_FORMAT \"%I64d\"")
ELSE()
SET(PTRDIFF_FORMAT_S "#define PTRDIFF_FORMAT \"%ld\"")
ENDIF()
ENDIF()
ELSE()
SET(PTRDIFF_S "/* #undef PTRDIFF_T */")
SET(PTRDIFF_FORMAT_S "/* #undef PTRDIFF_FORMAT */")
ENDIF()
#
CHECK_TYPE_SIZE("size_t" SIZE_T_HAS_SIZE)
IF(SIZE_T_HAS_SIZE)
SET(SIZE_T_S "size_t")
ENDIF()
#
IF(UNIX)
CHECK_TYPE_SIZE("int64_t" INT64_HAS_SIZE)
IF(INT64_HAS_SIZE EQUAL 8)
SET(INT64_S "int64_t")
SET(INT64_FORMAT_S "\"%ld\"")
ENDIF()
CHECK_TYPE_SIZE("uint64_t" UINT64_HAS_SIZE)
IF(UINT64_HAS_SIZE EQUAL 8)
SET(UINT64_S "uint64_t")
SET(UINT64_FORMAT_S "\"%lu\"")
ENDIF()
ELSE()
CHECK_TYPE_SIZE("signed __int64" INT64_HAS_SIZE)
IF(INT64_HAS_SIZE EQUAL 8)
SET(INT64_S "signed __int64")
SET(INT64_FORMAT_S "\"%I64d\"")
ENDIF()
CHECK_TYPE_SIZE("unsigned __int64" UINT64_HAS_SIZE)
IF(UINT64_HAS_SIZE EQUAL 8)
SET(UINT64_S "unsigned __int64")
SET(UINT64_FORMAT_S "\"%I64u\"")
ENDIF()
ENDIF()
#
IF(INT64_HAS_SIZE LESS 8)
CHECK_TYPE_SIZE("signed long" INT64_HAS_SIZE)
IF(INT64_HAS_SIZE EQUAL 8)
SET(INT64_S "signed long")
SET(INT64_FORMAT_S "\"%ld\"")
ENDIF()
ENDIF()
#
IF(UINT64_HAS_SIZE LESS 8)
CHECK_TYPE_SIZE("unsigned long" UINT64_HAS_SIZE)
IF(UINT64_HAS_SIZE EQUAL 8)
SET(UINT64_S "unsigned long")
SET(UINT64_FORMAT_S "\"%lu\"")
ENDIF()
ENDIF()
#
IF(INT64_HAS_SIZE LESS 8)
IF(UNIX)
CHECK_TYPE_SIZE("signed long long" LONG_LONG_HAS_SIZE)
IF(LONG_LONG_HAS_SIZE EQUAL 8)
SET(INT64_S "signed long long")
SET(INT64_FORMAT_S "\"%lld\"")
SET(INT64_HAS_SIZE 8)
ENDIF()
ELSE()
CHECK_TYPE_SIZE("signed long long" LONG_LONG_HAS_SIZE)
IF(LONG_LONG_HAS_SIZE EQUAL 8)
SET(INT64_S "signed long long")
SET(INT64_FORMAT_S "\"%I64d\"")
SET(INT64_HAS_SIZE 8)
ENDIF()
ENDIF()
ENDIF()
#
IF(UINT64_HAS_SIZE LESS 8)
IF(UNIX)
CHECK_TYPE_SIZE("unsigned long long" ULONG_LONG_HAS_SIZE)
IF(ULONG_LONG_HAS_SIZE EQUAL 8)
SET(UINT64_S "unsigned long long")
SET(UINT64_FORMAT_S "\"%llu\"")
SET(UINT64_HAS_SIZE 8)
ENDIF()
ELSE()
CHECK_TYPE_SIZE("unsigned long long" ULONG_LONG_HAS_SIZE)
IF(ULONG_LONG_HAS_SIZE EQUAL 8)
SET(UINT64_S "unsigned long long")
SET(UINT64_FORMAT_S "\"%I64u\"")
SET(UINT64_HAS_SIZE 8)
ENDIF()
ENDIF()
ENDIF()
#
IF(INT64_HAS_SIZE LESS 8)
CHECK_TYPE_SIZE("signed long" INT64_HAS_SIZE)
IF(INT64_HAS_SIZE)
SET(INT64_S "signed long")
SET(INT64_FORMAT_S "\"%ld\"")
ENDIF()
ENDIF()
#
IF(UINT64_HAS_SIZE LESS 8)
CHECK_TYPE_SIZE("unsigned long" UINT64_HAS_SIZE)
IF(UINT64_HAS_SIZE)
SET(UINT64_S "unsigned long")
SET(UINT64_FORMAT_S "\"%lu\"")
ENDIF()
ENDIF()
#
#MESSAGE(STATUS "INT64_HAS_SIZE => ${INT64_HAS_SIZE}")
#MESSAGE(STATUS "UINT64_HAS_SIZE => ${UINT64_HAS_SIZE}")
#
3 changes: 3 additions & 0 deletions src/bin/fltk/flviewer/CMake/vers.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SET(FLVIEWER_VERSION_MAJOR 0)
SET(FLVIEWER_VERSION_MINOR 2)
SET(FLVIEWER_VERSION_PATCH 10)
Loading