{"action":"created","comment":{"url":"https://api.github.com/repos/ufz/ogs/pulls/comments/25303228","id":25303228,"diff_hunk":"@@ -261,77 +268,52 @@ void VtkVisPointSetItem::SetActiveAttribute( const QString& name )\n \n \t// Remove type identifier\n \t_activeArrayName = QString(name).remove(0, 2).toStdString();\n-\tconst char* charName = _activeArrayName.c_str();\n+\tconst char* arrayName = _activeArrayName.c_str();\n \n-\tdouble range[2];\n \tvtkDataSet* dataSet = vtkDataSet::SafeDownCast(this->_algorithm->GetOutputDataObject(0));\n-\tif (dataSet)\n+\tif (!dataSet)\n+\t\treturn;\n+\n+\tdouble range[2];\n+\tGetRangeForActiveAttribute(range);\n+\tif (_onPointData)\n \t{\n-\t\tif (_onPointData)\n+\t\tvtkPointData* pointData = dataSet->GetPointData();\n+\t\tif(pointData)\n \t\t{\n-\t\t\tvtkPointData* pointData = dataSet->GetPointData();\n-\t\t\tif(pointData)\n-\t\t\t{\n-\t\t\t\tif(activeAttributeExists(pointData, _activeArrayName))\n-\t\t\t\t{\n-\t\t\t\t\t_algorithm->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, charName);\n-\t\t\t\t\t_mapper->SetScalarModeToUsePointData();\n-\t\t\t\t\tpointData->GetArray(charName)->GetRange(range);\n-\t\t\t\t}\n-\t\t\t\telse\n-\t\t\t\t{\n-\t\t\t\t\t_activeArrayName = \"\";\n-\t\t\t\t\t_vtkProps->SetActiveAttribute(\"Solid Color\");\n-\t\t\t\t\t_mapper->ScalarVisibilityOff();\n-\t\t\t\t\treturn;\n-\t\t\t\t}\n-\t\t\t}\n+\t\t\t_algorithm->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, arrayName);","path":"Applications/DataExplorer/VtkVis/VtkVisPointSetItem.cpp","position":66,"original_position":66,"commit_id":"96fcbc27a9ce9fed744081864e4a6f3ea046eefd","original_commit_id":"96fcbc27a9ce9fed744081864e4a6f3ea046eefd","user":{"login":"endJunction","id":329493,"avatar_url":"https://avatars.githubusercontent.com/u/329493?v=3","gravatar_id":"","url":"https://api.github.com/users/endJunction","html_url":"https://github.com/endJunction","followers_url":"https://api.github.com/users/endJunction/followers","following_url":"https://api.github.com/users/endJunction/following{/other_user}","gists_url":"https://api.github.com/users/endJunction/gists{/gist_id}","starred_url":"https://api.github.com/users/endJunction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endJunction/subscriptions","organizations_url":"https://api.github.com/users/endJunction/orgs","repos_url":"https://api.github.com/users/endJunction/repos","events_url":"https://api.github.com/users/endJunction/events{/privacy}","received_events_url":"https://api.github.com/users/endJunction/received_events","type":"User","site_admin":false},"body":"Instead of `arrayName` one can directly call `_activeArrayName.c_str()`.","created_at":"2015-02-24T23:10:15Z","updated_at":"2015-02-24T23:10:15Z","html_url":"https://github.com/ufz/ogs/pull/607#discussion_r25303228","pull_request_url":"https://api.github.com/repos/ufz/ogs/pulls/607","_links":{"self":{"href":"https://api.github.com/repos/ufz/ogs/pulls/comments/25303228"},"html":{"href":"https://github.com/ufz/ogs/pull/607#discussion_r25303228"},"pull_request":{"href":"https://api.github.com/repos/ufz/ogs/pulls/607"}}},"pull_request":{"url":"https://api.github.com/repos/ufz/ogs/pulls/607","id":29592375,"html_url":"https://github.com/ufz/ogs/pull/607","diff_url":"https://github.com/ufz/ogs/pull/607.diff","patch_url":"https://github.com/ufz/ogs/pull/607.patch","issue_url":"https://api.github.com/repos/ufz/ogs/issues/607","number":607,"state":"open","locked":false,"title":"VTK-mapped properties","user":{"login":"bilke","id":149656,"avatar_url":"https://avatars.githubusercontent.com/u/149656?v=3","gravatar_id":"","url":"https://api.github.com/users/bilke","html_url":"https://github.com/bilke","followers_url":"https://api.github.com/users/bilke/followers","following_url":"https://api.github.com/users/bilke/following{/other_user}","gists_url":"https://api.github.com/users/bilke/gists{/gist_id}","starred_url":"https://api.github.com/users/bilke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilke/subscriptions","organizations_url":"https://api.github.com/users/bilke/orgs","repos_url":"https://api.github.com/users/bilke/repos","events_url":"https://api.github.com/users/bilke/events{/privacy}","received_events_url":"https://api.github.com/users/bilke/received_events","type":"User","site_admin":false},"body":"This PR contains basically 4 parts which can be seen by the subsequent commits of the different authors:\r\n\r\n- Some refactoring of the `Properties`-class to add better access methods\r\n- Mapped data arrays in the `InSituLib` allowing for zero-copy usage of OGS mesh data structures (nodes, elements, `int` and `double` property vectors) in VTK\r\n- VTK file input allowing to read the VTK data arrays into OGS mesh properties and the corresponding changes in the Data Explorer\r\n- Some small fixes for the Data Explorer\r\n\r\nWhat is missing at the moment is the correct handling of material ids. The idea is to have them both in a `PropertyVector` as well as in the mesh element itself due to data access problems (e.g. when the ids are stored in `PropertyVector`s only then you cannot access them from a mesh element). This will be added beginning next week.\r\n\r\nSome notes / interesting points in the code for easier review:\r\n\r\n- The first part can be seen [here](https://github.com/TomFischer/ogs/compare/ReorganizeProperties)\r\n- VTK-mapped properties: [a28ef9](https://github.com/rinkk/ogs/commit/a28ef97269d45d51e88fbcc4d892e96ba130ec9f)\r\n- Conversion from VTK array to mesh property: [9ccbf8](https://github.com/rinkk/ogs/commit/9ccbf848a2a37f6b78b8fdd7888afd5e05caf12c)","created_at":"2015-02-19T07:49:36Z","updated_at":"2015-02-24T23:10:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4114c7e3a919696c8c75d580c50c54e612c88f0d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ufz/ogs/pulls/607/commits","review_comments_url":"https://api.github.com/repos/ufz/ogs/pulls/607/comments","review_comment_url":"https://api.github.com/repos/ufz/ogs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ufz/ogs/issues/607/comments","statuses_url":"https://api.github.com/repos/ufz/ogs/statuses/96fcbc27a9ce9fed744081864e4a6f3ea046eefd","head":{"label":"rinkk:MappedProperties","ref":"MappedProperties","sha":"96fcbc27a9ce9fed744081864e4a6f3ea046eefd","user":{"login":"rinkk","id":798445,"avatar_url":"https://avatars.githubusercontent.com/u/798445?v=3","gravatar_id":"","url":"https://api.github.com/users/rinkk","html_url":"https://github.com/rinkk","followers_url":"https://api.github.com/users/rinkk/followers","following_url":"https://api.github.com/users/rinkk/following{/other_user}","gists_url":"https://api.github.com/users/rinkk/gists{/gist_id}","starred_url":"https://api.github.com/users/rinkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rinkk/subscriptions","organizations_url":"https://api.github.com/users/rinkk/orgs","repos_url":"https://api.github.com/users/rinkk/repos","events_url":"https://api.github.com/users/rinkk/events{/privacy}","received_events_url":"https://api.github.com/users/rinkk/received_events","type":"User","site_admin":false},"repo":{"id":7148641,"name":"ogs","full_name":"rinkk/ogs","owner":{"login":"rinkk","id":798445,"avatar_url":"https://avatars.githubusercontent.com/u/798445?v=3","gravatar_id":"","url":"https://api.github.com/users/rinkk","html_url":"https://github.com/rinkk","followers_url":"https://api.github.com/users/rinkk/followers","following_url":"https://api.github.com/users/rinkk/following{/other_user}","gists_url":"https://api.github.com/users/rinkk/gists{/gist_id}","starred_url":"https://api.github.com/users/rinkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rinkk/subscriptions","organizations_url":"https://api.github.com/users/rinkk/orgs","repos_url":"https://api.github.com/users/rinkk/repos","events_url":"https://api.github.com/users/rinkk/events{/privacy}","received_events_url":"https://api.github.com/users/rinkk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rinkk/ogs","description":"OGS source code","fork":true,"url":"https://api.github.com/repos/rinkk/ogs","forks_url":"https://api.github.com/repos/rinkk/ogs/forks","keys_url":"https://api.github.com/repos/rinkk/ogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rinkk/ogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rinkk/ogs/teams","hooks_url":"https://api.github.com/repos/rinkk/ogs/hooks","issue_events_url":"https://api.github.com/repos/rinkk/ogs/issues/events{/number}","events_url":"https://api.github.com/repos/rinkk/ogs/events","assignees_url":"https://api.github.com/repos/rinkk/ogs/assignees{/user}","branches_url":"https://api.github.com/repos/rinkk/ogs/branches{/branch}","tags_url":"https://api.github.com/repos/rinkk/ogs/tags","blobs_url":"https://api.github.com/repos/rinkk/ogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rinkk/ogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rinkk/ogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rinkk/ogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rinkk/ogs/statuses/{sha}","languages_url":"https://api.github.com/repos/rinkk/ogs/languages","stargazers_url":"https://api.github.com/repos/rinkk/ogs/stargazers","contributors_url":"https://api.github.com/repos/rinkk/ogs/contributors","subscribers_url":"https://api.github.com/repos/rinkk/ogs/subscribers","subscription_url":"https://api.github.com/repos/rinkk/ogs/subscription","commits_url":"https://api.github.com/repos/rinkk/ogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rinkk/ogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rinkk/ogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rinkk/ogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/rinkk/ogs/contents/{+path}","compare_url":"https://api.github.com/repos/rinkk/ogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rinkk/ogs/merges","archive_url":"https://api.github.com/repos/rinkk/ogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rinkk/ogs/downloads","issues_url":"https://api.github.com/repos/rinkk/ogs/issues{/number}","pulls_url":"https://api.github.com/repos/rinkk/ogs/pulls{/number}","milestones_url":"https://api.github.com/repos/rinkk/ogs/milestones{/number}","notifications_url":"https://api.github.com/repos/rinkk/ogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rinkk/ogs/labels{/name}","releases_url":"https://api.github.com/repos/rinkk/ogs/releases{/id}","created_at":"2012-12-13T13:27:20Z","updated_at":"2014-09-01T13:43:48Z","pushed_at":"2015-02-23T11:41:14Z","git_url":"git://github.com/rinkk/ogs.git","ssh_url":"git@github.com:rinkk/ogs.git","clone_url":"https://github.com/rinkk/ogs.git","svn_url":"https://github.com/rinkk/ogs","homepage":"www.opengeosys.org","size":9521,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ufz:master","ref":"master","sha":"b8c801c37f9f84841b6988f55c0c5a537dc989f4","user":{"login":"ufz","id":767517,"avatar_url":"https://avatars.githubusercontent.com/u/767517?v=3","gravatar_id":"","url":"https://api.github.com/users/ufz","html_url":"https://github.com/ufz","followers_url":"https://api.github.com/users/ufz/followers","following_url":"https://api.github.com/users/ufz/following{/other_user}","gists_url":"https://api.github.com/users/ufz/gists{/gist_id}","starred_url":"https://api.github.com/users/ufz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufz/subscriptions","organizations_url":"https://api.github.com/users/ufz/orgs","repos_url":"https://api.github.com/users/ufz/repos","events_url":"https://api.github.com/users/ufz/events{/privacy}","received_events_url":"https://api.github.com/users/ufz/received_events","type":"Organization","site_admin":false},"repo":{"id":1701384,"name":"ogs","full_name":"ufz/ogs","owner":{"login":"ufz","id":767517,"avatar_url":"https://avatars.githubusercontent.com/u/767517?v=3","gravatar_id":"","url":"https://api.github.com/users/ufz","html_url":"https://github.com/ufz","followers_url":"https://api.github.com/users/ufz/followers","following_url":"https://api.github.com/users/ufz/following{/other_user}","gists_url":"https://api.github.com/users/ufz/gists{/gist_id}","starred_url":"https://api.github.com/users/ufz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufz/subscriptions","organizations_url":"https://api.github.com/users/ufz/orgs","repos_url":"https://api.github.com/users/ufz/repos","events_url":"https://api.github.com/users/ufz/events{/privacy}","received_events_url":"https://api.github.com/users/ufz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ufz/ogs","description":"OGS source code","fork":false,"url":"https://api.github.com/repos/ufz/ogs","forks_url":"https://api.github.com/repos/ufz/ogs/forks","keys_url":"https://api.github.com/repos/ufz/ogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ufz/ogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ufz/ogs/teams","hooks_url":"https://api.github.com/repos/ufz/ogs/hooks","issue_events_url":"https://api.github.com/repos/ufz/ogs/issues/events{/number}","events_url":"https://api.github.com/repos/ufz/ogs/events","assignees_url":"https://api.github.com/repos/ufz/ogs/assignees{/user}","branches_url":"https://api.github.com/repos/ufz/ogs/branches{/branch}","tags_url":"https://api.github.com/repos/ufz/ogs/tags","blobs_url":"https://api.github.com/repos/ufz/ogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ufz/ogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ufz/ogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ufz/ogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ufz/ogs/statuses/{sha}","languages_url":"https://api.github.com/repos/ufz/ogs/languages","stargazers_url":"https://api.github.com/repos/ufz/ogs/stargazers","contributors_url":"https://api.github.com/repos/ufz/ogs/contributors","subscribers_url":"https://api.github.com/repos/ufz/ogs/subscribers","subscription_url":"https://api.github.com/repos/ufz/ogs/subscription","commits_url":"https://api.github.com/repos/ufz/ogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ufz/ogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ufz/ogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ufz/ogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ufz/ogs/contents/{+path}","compare_url":"https://api.github.com/repos/ufz/ogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ufz/ogs/merges","archive_url":"https://api.github.com/repos/ufz/ogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ufz/ogs/downloads","issues_url":"https://api.github.com/repos/ufz/ogs/issues{/number}","pulls_url":"https://api.github.com/repos/ufz/ogs/pulls{/number}","milestones_url":"https://api.github.com/repos/ufz/ogs/milestones{/number}","notifications_url":"https://api.github.com/repos/ufz/ogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ufz/ogs/labels{/name}","releases_url":"https://api.github.com/repos/ufz/ogs/releases{/id}","created_at":"2011-05-04T14:09:57Z","updated_at":"2015-02-24T15:39:39Z","pushed_at":"2015-02-24T15:39:39Z","git_url":"git://github.com/ufz/ogs.git","ssh_url":"git@github.com:ufz/ogs.git","clone_url":"https://github.com/ufz/ogs.git","svn_url":"https://github.com/ufz/ogs","homepage":"www.opengeosys.org","size":14528,"stargazers_count":14,"watchers_count":14,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":40,"forks":32,"open_issues":40,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ufz/ogs/pulls/607"},"html":{"href":"https://github.com/ufz/ogs/pull/607"},"issue":{"href":"https://api.github.com/repos/ufz/ogs/issues/607"},"comments":{"href":"https://api.github.com/repos/ufz/ogs/issues/607/comments"},"review_comments":{"href":"https://api.github.com/repos/ufz/ogs/pulls/607/comments"},"review_comment":{"href":"https://api.github.com/repos/ufz/ogs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ufz/ogs/pulls/607/commits"},"statuses":{"href":"https://api.github.com/repos/ufz/ogs/statuses/96fcbc27a9ce9fed744081864e4a6f3ea046eefd"}}}}