{"action":"created","comment":{"url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/comments/188647002","pull_request_review_id":120666187,"id":188647002,"diff_hunk":"@@ -0,0 +1,283 @@\n+#include \"mscExportVideo.h\"\n+\n+#include <dtkCore/dtkAbstractProcessFactory.h>\n+\n+#include <vtkImageCanvasSource2D.h>\n+#include <vtkImageData.h>\n+#include <vtkJPEGWriter.h>\n+#include <vtkOggTheoraWriter.h>\n+#include <vtkQImageToImageSource.h>\n+#include <vtkSmartPointer.h>\n+\n+// /////////////////////////////////////////////////////////////////\n+// ExportVideoPrivate\n+// /////////////////////////////////////////////////////////////////\n+namespace msc\n+{\n+class ExportVideoPrivate\n+{\n+public:\n+    QVector< QImage > imagesArray;\n+    int width;\n+    int height;\n+\n+    // User parameters\n+    QString filename;\n+    int format;            // Cf. VideoFormat in header file\n+    int frameRate;         // Frame per second\n+    bool subsampling;      // Is the video to be encoded using 4:2:0 subsampling?\n+    int quality;           // 0 = low, 1 = medium, 2 = high\n+    bool exportOnlyAsJPEG; // Can be used for home encoding\n+};\n+\n+// /////////////////////////////////////////////////////////////////\n+// ExportVideo\n+// /////////////////////////////////////////////////////////////////\n+\n+ExportVideo::ExportVideo() : medAbstractProcess(), d(new ExportVideoPrivate)\n+{\n+    d->imagesArray.clear();\n+    d->width  = 0;\n+    d->height = 0;\n+\n+    // User parameters\n+    d->format = OGGVORBIS;\n+    d->filename = \"\";\n+    d->frameRate = 1;\n+    d->subsampling = false;\n+    d->quality = 2;\n+    d->exportOnlyAsJPEG = false;\n+}\n+\n+ExportVideo::~ExportVideo()\n+{\n+    delete d;\n+}\n+\n+bool ExportVideo::registered()\n+{\n+    return dtkAbstractProcessFactory::instance()->registerProcessType(\"msc::ExportVideo\", createExportVideo);\n+}\n+\n+QString ExportVideo::description() const\n+{\n+    return \"ExportVideo\";\n+}\n+\n+QString ExportVideo::identifier() const\n+{\n+    return description();\n+}\n+\n+void ExportVideo::setParameter(int* data)","path":"src-plugins/mscExportVideo/mscExportVideo.cpp","position":72,"original_position":72,"commit_id":"afe045590cf585c45b892e1e2b447351f4d9ec62","original_commit_id":"afe045590cf585c45b892e1e2b447351f4d9ec62","user":{"login":"mathildemerle","id":3910352,"avatar_url":"https://avatars1.githubusercontent.com/u/3910352?v=4","gravatar_id":"","url":"https://api.github.com/users/mathildemerle","html_url":"https://github.com/mathildemerle","followers_url":"https://api.github.com/users/mathildemerle/followers","following_url":"https://api.github.com/users/mathildemerle/following{/other_user}","gists_url":"https://api.github.com/users/mathildemerle/gists{/gist_id}","starred_url":"https://api.github.com/users/mathildemerle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathildemerle/subscriptions","organizations_url":"https://api.github.com/users/mathildemerle/orgs","repos_url":"https://api.github.com/users/mathildemerle/repos","events_url":"https://api.github.com/users/mathildemerle/events{/privacy}","received_events_url":"https://api.github.com/users/mathildemerle/received_events","type":"User","site_admin":false},"body":"Updated function: this receives a int array of every pixel (R, G and B) of the current screenshot","created_at":"2018-05-16T14:30:04Z","updated_at":"2018-05-16T14:33:41Z","html_url":"https://github.com/Inria-Asclepios/medInria-public/pull/349#discussion_r188647002","pull_request_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/349","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/comments/188647002"},"html":{"href":"https://github.com/Inria-Asclepios/medInria-public/pull/349#discussion_r188647002"},"pull_request":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/349"}}},"pull_request":{"url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/349","id":169586969,"html_url":"https://github.com/Inria-Asclepios/medInria-public/pull/349","diff_url":"https://github.com/Inria-Asclepios/medInria-public/pull/349.diff","patch_url":"https://github.com/Inria-Asclepios/medInria-public/pull/349.patch","issue_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/issues/349","number":349,"state":"open","locked":false,"title":"[Video] add a video export button ","user":{"login":"mathildemerle","id":3910352,"avatar_url":"https://avatars1.githubusercontent.com/u/3910352?v=4","gravatar_id":"","url":"https://api.github.com/users/mathildemerle","html_url":"https://github.com/mathildemerle","followers_url":"https://api.github.com/users/mathildemerle/followers","following_url":"https://api.github.com/users/mathildemerle/following{/other_user}","gists_url":"https://api.github.com/users/mathildemerle/gists{/gist_id}","starred_url":"https://api.github.com/users/mathildemerle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathildemerle/subscriptions","organizations_url":"https://api.github.com/users/mathildemerle/orgs","repos_url":"https://api.github.com/users/mathildemerle/repos","events_url":"https://api.github.com/users/mathildemerle/events{/privacy}","received_events_url":"https://api.github.com/users/mathildemerle/received_events","type":"User","site_admin":false},"body":"From this issue: https://github.com/Inria-Asclepios/music/issues/585\r\n\r\nThis PR adds an export button at the bottom right of the app. \r\n\r\nI tried a lot of cases before finding this one. Indeed, in order to export a 4D volume or mesh, i use vtkOggTheoraWriter (need access to VTK), and it needs to get screenshots of the current view (access to Workspace/View) thanks to the medTimeLineParameter (access to View). And, it was not ergonomic enough to create a toolbox for that purpose. So, the best thing at the end was to create a button next to the screenshot button, and add a process plugin in musicPlugins _(NB moved now in medinria-public)_.\r\n\r\nWe need to compile VTK with a video parameter: https://github.com/Inria-Asclepios/medinria-superproject/pull/17\r\n\r\n![moviebutton](https://user-images.githubusercontent.com/3910352/36302463-de6ad98c-1308-11e8-8208-488215d99086.png)\r\n\r\n:m:","created_at":"2018-02-16T10:13:19Z","updated_at":"2018-05-16T14:33:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"188596219e6727654d166f91ccde49bb781229fc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/milestones/7","html_url":"https://github.com/Inria-Asclepios/medInria-public/milestone/7","labels_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/milestones/7/labels","id":3025227,"number":7,"title":"v2.2.0","description":"","creator":{"login":"mathildemerle","id":3910352,"avatar_url":"https://avatars1.githubusercontent.com/u/3910352?v=4","gravatar_id":"","url":"https://api.github.com/users/mathildemerle","html_url":"https://github.com/mathildemerle","followers_url":"https://api.github.com/users/mathildemerle/followers","following_url":"https://api.github.com/users/mathildemerle/following{/other_user}","gists_url":"https://api.github.com/users/mathildemerle/gists{/gist_id}","starred_url":"https://api.github.com/users/mathildemerle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathildemerle/subscriptions","organizations_url":"https://api.github.com/users/mathildemerle/orgs","repos_url":"https://api.github.com/users/mathildemerle/repos","events_url":"https://api.github.com/users/mathildemerle/events{/privacy}","received_events_url":"https://api.github.com/users/mathildemerle/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":25,"state":"open","created_at":"2018-01-10T09:14:47Z","updated_at":"2018-05-15T09:51:12Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/349/commits","review_comments_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/349/comments","review_comment_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/issues/349/comments","statuses_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/statuses/afe045590cf585c45b892e1e2b447351f4d9ec62","head":{"label":"mathildemerle:video","ref":"video","sha":"afe045590cf585c45b892e1e2b447351f4d9ec62","user":{"login":"mathildemerle","id":3910352,"avatar_url":"https://avatars1.githubusercontent.com/u/3910352?v=4","gravatar_id":"","url":"https://api.github.com/users/mathildemerle","html_url":"https://github.com/mathildemerle","followers_url":"https://api.github.com/users/mathildemerle/followers","following_url":"https://api.github.com/users/mathildemerle/following{/other_user}","gists_url":"https://api.github.com/users/mathildemerle/gists{/gist_id}","starred_url":"https://api.github.com/users/mathildemerle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathildemerle/subscriptions","organizations_url":"https://api.github.com/users/mathildemerle/orgs","repos_url":"https://api.github.com/users/mathildemerle/repos","events_url":"https://api.github.com/users/mathildemerle/events{/privacy}","received_events_url":"https://api.github.com/users/mathildemerle/received_events","type":"User","site_admin":false},"repo":{"id":23581519,"name":"medInria-public","full_name":"mathildemerle/medInria-public","owner":{"login":"mathildemerle","id":3910352,"avatar_url":"https://avatars1.githubusercontent.com/u/3910352?v=4","gravatar_id":"","url":"https://api.github.com/users/mathildemerle","html_url":"https://github.com/mathildemerle","followers_url":"https://api.github.com/users/mathildemerle/followers","following_url":"https://api.github.com/users/mathildemerle/following{/other_user}","gists_url":"https://api.github.com/users/mathildemerle/gists{/gist_id}","starred_url":"https://api.github.com/users/mathildemerle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathildemerle/subscriptions","organizations_url":"https://api.github.com/users/mathildemerle/orgs","repos_url":"https://api.github.com/users/mathildemerle/repos","events_url":"https://api.github.com/users/mathildemerle/events{/privacy}","received_events_url":"https://api.github.com/users/mathildemerle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mathildemerle/medInria-public","description":"Open-source part of the medInria software","fork":true,"url":"https://api.github.com/repos/mathildemerle/medInria-public","forks_url":"https://api.github.com/repos/mathildemerle/medInria-public/forks","keys_url":"https://api.github.com/repos/mathildemerle/medInria-public/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mathildemerle/medInria-public/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mathildemerle/medInria-public/teams","hooks_url":"https://api.github.com/repos/mathildemerle/medInria-public/hooks","issue_events_url":"https://api.github.com/repos/mathildemerle/medInria-public/issues/events{/number}","events_url":"https://api.github.com/repos/mathildemerle/medInria-public/events","assignees_url":"https://api.github.com/repos/mathildemerle/medInria-public/assignees{/user}","branches_url":"https://api.github.com/repos/mathildemerle/medInria-public/branches{/branch}","tags_url":"https://api.github.com/repos/mathildemerle/medInria-public/tags","blobs_url":"https://api.github.com/repos/mathildemerle/medInria-public/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mathildemerle/medInria-public/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mathildemerle/medInria-public/git/refs{/sha}","trees_url":"https://api.github.com/repos/mathildemerle/medInria-public/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mathildemerle/medInria-public/statuses/{sha}","languages_url":"https://api.github.com/repos/mathildemerle/medInria-public/languages","stargazers_url":"https://api.github.com/repos/mathildemerle/medInria-public/stargazers","contributors_url":"https://api.github.com/repos/mathildemerle/medInria-public/contributors","subscribers_url":"https://api.github.com/repos/mathildemerle/medInria-public/subscribers","subscription_url":"https://api.github.com/repos/mathildemerle/medInria-public/subscription","commits_url":"https://api.github.com/repos/mathildemerle/medInria-public/commits{/sha}","git_commits_url":"https://api.github.com/repos/mathildemerle/medInria-public/git/commits{/sha}","comments_url":"https://api.github.com/repos/mathildemerle/medInria-public/comments{/number}","issue_comment_url":"https://api.github.com/repos/mathildemerle/medInria-public/issues/comments{/number}","contents_url":"https://api.github.com/repos/mathildemerle/medInria-public/contents/{+path}","compare_url":"https://api.github.com/repos/mathildemerle/medInria-public/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mathildemerle/medInria-public/merges","archive_url":"https://api.github.com/repos/mathildemerle/medInria-public/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mathildemerle/medInria-public/downloads","issues_url":"https://api.github.com/repos/mathildemerle/medInria-public/issues{/number}","pulls_url":"https://api.github.com/repos/mathildemerle/medInria-public/pulls{/number}","milestones_url":"https://api.github.com/repos/mathildemerle/medInria-public/milestones{/number}","notifications_url":"https://api.github.com/repos/mathildemerle/medInria-public/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mathildemerle/medInria-public/labels{/name}","releases_url":"https://api.github.com/repos/mathildemerle/medInria-public/releases{/id}","deployments_url":"https://api.github.com/repos/mathildemerle/medInria-public/deployments","created_at":"2014-09-02T14:21:40Z","updated_at":"2017-09-29T12:28:04Z","pushed_at":"2018-05-16T14:25:13Z","git_url":"git://github.com/mathildemerle/medInria-public.git","ssh_url":"git@github.com:mathildemerle/medInria-public.git","clone_url":"https://github.com/mathildemerle/medInria-public.git","svn_url":"https://github.com/mathildemerle/medInria-public","homepage":"https://med.inria.fr/","size":32463,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"music"}},"base":{"label":"Inria-Asclepios:master","ref":"master","sha":"309081511640fcb1aeadd564b87b9110ca2590d9","user":{"login":"Inria-Asclepios","id":3994836,"avatar_url":"https://avatars0.githubusercontent.com/u/3994836?v=4","gravatar_id":"","url":"https://api.github.com/users/Inria-Asclepios","html_url":"https://github.com/Inria-Asclepios","followers_url":"https://api.github.com/users/Inria-Asclepios/followers","following_url":"https://api.github.com/users/Inria-Asclepios/following{/other_user}","gists_url":"https://api.github.com/users/Inria-Asclepios/gists{/gist_id}","starred_url":"https://api.github.com/users/Inria-Asclepios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inria-Asclepios/subscriptions","organizations_url":"https://api.github.com/users/Inria-Asclepios/orgs","repos_url":"https://api.github.com/users/Inria-Asclepios/repos","events_url":"https://api.github.com/users/Inria-Asclepios/events{/privacy}","received_events_url":"https://api.github.com/users/Inria-Asclepios/received_events","type":"Organization","site_admin":false},"repo":{"id":45173573,"name":"medInria-public","full_name":"Inria-Asclepios/medInria-public","owner":{"login":"Inria-Asclepios","id":3994836,"avatar_url":"https://avatars0.githubusercontent.com/u/3994836?v=4","gravatar_id":"","url":"https://api.github.com/users/Inria-Asclepios","html_url":"https://github.com/Inria-Asclepios","followers_url":"https://api.github.com/users/Inria-Asclepios/followers","following_url":"https://api.github.com/users/Inria-Asclepios/following{/other_user}","gists_url":"https://api.github.com/users/Inria-Asclepios/gists{/gist_id}","starred_url":"https://api.github.com/users/Inria-Asclepios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inria-Asclepios/subscriptions","organizations_url":"https://api.github.com/users/Inria-Asclepios/orgs","repos_url":"https://api.github.com/users/Inria-Asclepios/repos","events_url":"https://api.github.com/users/Inria-Asclepios/events{/privacy}","received_events_url":"https://api.github.com/users/Inria-Asclepios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Inria-Asclepios/medInria-public","description":"Open-source part of the medInria software","fork":true,"url":"https://api.github.com/repos/Inria-Asclepios/medInria-public","forks_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/forks","keys_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/teams","hooks_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/hooks","issue_events_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/issues/events{/number}","events_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/events","assignees_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/assignees{/user}","branches_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/branches{/branch}","tags_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/tags","blobs_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/git/refs{/sha}","trees_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/statuses/{sha}","languages_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/languages","stargazers_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/stargazers","contributors_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/contributors","subscribers_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/subscribers","subscription_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/subscription","commits_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/commits{/sha}","git_commits_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/git/commits{/sha}","comments_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/comments{/number}","issue_comment_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/issues/comments{/number}","contents_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/contents/{+path}","compare_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/merges","archive_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/downloads","issues_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/issues{/number}","pulls_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls{/number}","milestones_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/milestones{/number}","notifications_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/labels{/name}","releases_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/releases{/id}","deployments_url":"https://api.github.com/repos/Inria-Asclepios/medInria-public/deployments","created_at":"2015-10-29T09:37:20Z","updated_at":"2018-05-15T09:51:15Z","pushed_at":"2018-05-16T14:25:15Z","git_url":"git://github.com/Inria-Asclepios/medInria-public.git","ssh_url":"git@github.com:Inria-Asclepios/medInria-public.git","clone_url":"https://github.com/Inria-Asclepios/medInria-public.git","svn_url":"https://github.com/Inria-Asclepios/medInria-public","homepage":"https://med.inria.fr/","size":109779,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":6,"open_issues":47,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/349"},"html":{"href":"https://github.com/Inria-Asclepios/medInria-public/pull/349"},"issue":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/issues/349"},"comments":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/issues/349/comments"},"review_comments":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/349/comments"},"review_comment":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/pulls/349/commits"},"statuses":{"href":"https://api.github.com/repos/Inria-Asclepios/medInria-public/statuses/afe045590cf585c45b892e1e2b447351f4d9ec62"}},"author_association":"NONE"}}
{"actor":{"display_login":"mathildemerle"}}