Hi Marco,
on the flight home, I tested the OpenCV version on Mac Mavericks (see diff.txt).
It worked, apart from the movie was upside down.
Im not quite sure how you might want to fix the instantiation, or if you want
to flip the video.
Let me know, and I can raise bug.
Matt
diff --git a/Modules/AlgorithmsExt/mitkMovieGenerator.cpp
b/Modules/AlgorithmsExt/mitkMovieGenerator.cpp
index 5c5791f..5232dea 100755
--- a/Modules/AlgorithmsExt/mitkMovieGenerator.cpp
+++ b/Modules/AlgorithmsExt/mitkMovieGenerator.cpp
@@ -20,15 +20,6 @@ See LICENSE.txt or http://www.mitk.org for details.
#include "mitkGL.h"
#include "mitkConfig.h"
-#if WIN32
-#ifndef __GNUC__
-//#if ! (_MSC_VER >= 1400)
-#include "mitkMovieGeneratorWin32.h"
-//#endif
-#else
-#include "GL/glext.h"
-#endif
-#endif
#ifndef GL_BGR
#define GL_BGR GL_BGR_EXT
#endif
@@ -45,28 +36,6 @@ m_FrameRate(20)
}
-mitk::MovieGenerator::Pointer mitk::MovieGenerator::New()
-{
- Pointer smartPtr;
- MovieGenerator *rawPtr = ::itk::ObjectFactory<MovieGenerator>::Create();
- if(rawPtr == NULL) {
-
-
-#ifdef WIN32
-#ifndef __GNUC__
-//#if ! (_MSC_VER >= 1400)
- mitk::MovieGenerator::Pointer wp =
static_cast<mitk::MovieGenerator*>(mitk::MovieGeneratorWin32::New());
- return wp;
-//#endif
-#endif
-#endif
- }
- smartPtr = rawPtr;
- if(rawPtr != NULL) rawPtr->UnRegister();
- return smartPtr;
-}
-
-
bool mitk::MovieGenerator::WriteMovie()
{
bool ok = false;
diff --git a/Modules/AlgorithmsExt/mitkMovieGenerator.h
b/Modules/AlgorithmsExt/mitkMovieGenerator.h
index 945245d..5cc31c2 100755
--- a/Modules/AlgorithmsExt/mitkMovieGenerator.h
+++ b/Modules/AlgorithmsExt/mitkMovieGenerator.h
@@ -33,9 +33,6 @@ public:
mitkClassMacro(MovieGenerator, itk::LightObject);
- // delivers Win32 or Linux-versions of MovieGenerator
- static Pointer New(void);
-
//! stepper used to control movie generation
virtual void SetStepper( Stepper *stepper ) { m_stepper = stepper; }
diff --git a/Plugins/org.mitk.gui.qt.moviemaker/CMakeLists.txt
b/Plugins/org.mitk.gui.qt.moviemaker/CMakeLists.txt
index 9abc0db..70466e0 100644
--- a/Plugins/org.mitk.gui.qt.moviemaker/CMakeLists.txt
+++ b/Plugins/org.mitk.gui.qt.moviemaker/CMakeLists.txt
@@ -5,6 +5,6 @@ project(org_mitk_gui_qt_moviemaker)
MACRO_CREATE_MITK_CTK_PLUGIN(
EXPORT_DIRECTIVE MOVIEMAKER_EXPORT
EXPORTED_INCLUDE_SUFFIXES src
- MODULE_DEPENDS MitkQtWidgetsExt
+ MODULE_DEPENDS MitkQtWidgetsExt MitkOpenCVVideoSupport
PACKAGE_DEPENDS VTK|vtkTestingCore
)
diff --git
a/Plugins/org.mitk.gui.qt.moviemaker/src/internal/QmitkMovieMaker.cpp
b/Plugins/org.mitk.gui.qt.moviemaker/src/internal/QmitkMovieMaker.cpp
index 0d78c15..19e15a3 100644
--- a/Plugins/org.mitk.gui.qt.moviemaker/src/internal/QmitkMovieMaker.cpp
+++ b/Plugins/org.mitk.gui.qt.moviemaker/src/internal/QmitkMovieMaker.cpp
@@ -56,6 +56,11 @@ See LICENSE.txt or http://www.mitk.org for details.
#include <vtkRenderWindow.h>
#include "vtkRenderWindowInteractor.h"
#include <qradiobutton.h>
+#ifdef WIN32
+ #include <mitkMovieGeneratorWin32.h>
+#else
+ #include <mitkMovieGeneratorOpenCV.h>
+#endif
QmitkMovieMaker::QmitkMovieMaker(QObject *parent, const char * /*name*/)
@@ -72,8 +77,12 @@ QmitkMovieMaker::QmitkMovieMaker(QObject *parent, const char
* /*name*/)
m_FocusManagerCallback = MemberCommand::New();
m_FocusManagerCallback->SetCallbackFunction(this,
&QmitkMovieMaker::FocusChange);
-
- m_movieGenerator = mitk::MovieGenerator::New();
+
+#ifdef WIN32
+ m_movieGenerator = mitk::MovieGeneratorWin32::New();
+#else
+ m_movieGenerator = mitk::MovieGeneratorOpenCV::New();
+#endif
if (m_movieGenerator.IsNull())
{
On 4 Jun 2014, at 13:20, Marco Nolden <[email protected]> wrote:
> On 06/04/2014 01:09 PM, Clarkson, Matt wrote:
>> Hi there,
>>
>> Quick query: Why does the Movie Maker plugin only run on Windows?
>> (I havent looked at the code yet).
>>
>> Are their any plans to make it Linux/Mac compatible?
>> Or, roughly how much effort would it be to make it Linux/Mac compatible?
>>
>> Thanks
>>
>> Matt
>>
> Hi Matt,
>
> I think there is a problem with the instatiation code in mitk::MovieGenerator
> [1], probably it was never implemented completely.
>
> Apart from the (reliable) Win32 based movie generator there is now also an
> OpenCV based one in Modules/OpenCVVideoSupport/mitkMovieGeneratorOpenCV.h ,
> however I don't know how good that works.
>
> You could try to replace the instantiation in [1] and if the OpenCV version
> works for you we could try to fix the dynamic instantion work correctly.
>
> Best,
>
> Marco
>
>
> [1]:
> http://mitk.org/git/?p=MITK.git;a=blob;f=Modules/AlgorithmsExt/mitkMovieGenerator.cpp;h=5c5791f119dd7895e67763c14c52232bfaac74c3;hb=97966adfcf5ae7242d70c8a4de7ae521f982f8f6#l48
>
>
>
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and their
>> applications. Written by three acclaimed leaders in the field,
>> this first edition is now available. Download your free book today!
>> http://p.sf.net/sfu/NeoTech
>> _______________________________________________
>> mitk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>>
>
>
> --
> ----------------------------------------------------------------------
> Dipl.-Inform. Med. Marco Nolden
> Deutsches Krebsforschungszentrum (German Cancer Research Center)
> Div. Medical & Biological Informatics Tel: (+49) 6221-42 2325
> Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345
> D-69120 Heidelberg eMail: [email protected]
>
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users