MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028205Open CASCADE[OCCT] OCCT:Visualizationpublic2016-12-09 10:232017-09-29 16:28
Reporterkgv 
Assigned Toapn 
PrioritynormalSeverityfeature 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.2.0Fixed in Version[OCCT] 7.2.0 
Summary0028205: Visualization - add functionality for dumping results of detection algorithms into image
DescriptionIt is suggested introducing new functionality to selection tools intended for debugging and regression testing purposes - dump of detection result into image.

The algorithm should prepare an image in similar manner as V3d_View::ToPixMap() (thus based on window size by default) and should perform picking on each pixel of the image. The input parameters:
- Mode:
  * Depth values (e.g. grayscale image) - Normalized and Unnormalized.
  * Colored Objects - the color of detected object / or generated color.
  * Owners - generated color for each owner.
  * Selection Mode - generated color for each selection mode.
- Slice. This is the number of picked element in sorted list, 0 by default (e.g. topmost).
Steps To Reproducetest v3d selectionimage *
TagsNo tags attached.
Test case numberbugs vis bug28205_1, bug28205_2
Attached Filespng file icon normalized depth.png (6,549 bytes) 2016-12-13 11:54
png file icon generated color for entity.png (2,665 bytes) 2016-12-13 11:54
png file icon generated color for owner.png (2,102 bytes) 2016-12-13 11:54
png file icon color of object.png (2,081 bytes) 2016-12-13 11:55
png file icon generate color for selection mode.png (2,819 bytes) 2016-12-13 15:53
png file icon unnormalized depth.png (8,954 bytes) 2016-12-13 16:38

- Relationships
parent of 0028876closedbugmaster Tests, Image_Diff - the image difference is unavailable for test case bugs vis bug28205_1 

-  Notes
(0061521)
git (administrator)
2016-12-09 13:50

Branch CR28205 has been created by isk.

SHA-1: 037c2a21da6a16079f36186fa1911698b55faded


Detailed log of new commits:

Author: isk
Date: Fri Dec 9 13:50:40 2016 +0300

    0028205: Visualization - add functionality for dumping results of detection algorithms into image
    Add a new method in AIS_InteractiveContext - GetSelectionImage.
    Add a new enumeration - AIS_TypeOfSelectionImage.
(0061523)
git (administrator)
2016-12-09 15:12

Branch CR28205 has been updated by isk.

SHA-1: 19e56110777c8ff516790b3a1d235de5d6be9f64


Detailed log of new commits:

Author: isk
Date: Fri Dec 9 15:11:53 2016 +0300

    Cosmetics

(0061560)
kgv (developer)
2016-12-12 10:25
edited on: 2016-12-12 10:26

+  for (; anIter.More(); anIter.Next())
+  {
+    Activate (anIter.Value());

The dump algorithm should NOT modify the list of objects with activated selection.

+Standard_Boolean AIS_InteractiveContext::GetSelectionImage (const TCollection_AsciiString& theFile,


It would be more reasonable moving this method to StdSelect_ViewerSelector3d (and call it ::ToPixMap() for consistency with similar functionality in V3d_View).

+      MoveTo (aX, aY, theView, Standard_False);

This method should not affect highlighting managed by AIS_InteractiveContext - only selection routines should be affected (with ignored selection filters, for the moment).

+  class GenerateSelectionModeOfClorFiller : public BaseFiller

Clor?

+    void Fill (Graphic3d_Vec4ub& thePixel) override

Standard_OVERRIDE should be used for better compatibility.

+  //! Help class for filling pixel with normalized depth of ray.
+  class NormalizedDepthFiller : public BaseFiller
...
+    void Fill (Graphic3d_Vec4ub& thePixel) override
+    {

Image_PixMap::ImgGray and Image_PixMap::ImgGrayF will be more optimal for this data.

+  //! Help class for filling pixel with unnormalized depth of ray.
+  class UnnormalizedDepthFiller : public BaseFiller
+  {
...
+    void Fill (Graphic3d_Vec4ub& thePixel) override
+    {
+      const SelectMgr_SortCriterion& aSortCriterion = myMainSel->PickedData (1);
+      thePixel.x() = static_cast<Standard_Byte> (aSortCriterion.Depth * 255.0);

The unnormalized filler into Graphic3d_Vec4ub does not make much sense. Float values (e.g. export into .exr image file) would make more sense.

+#include <Image_AlienPixMap.hxx>
...
+Standard_Boolean AIS_InteractiveContext::GetSelectionImage (const TCollection_AsciiString& theFile,

+                                                            const Handle(V3d_View)&        theView,

+                                                            const AIS_TypeOfSelectionImage theType)


The main interface should make a dump into specified Image_PixMap, not Image_AlienPixMap (which can be allocated by user if needed).

(0061576)
git (administrator)
2016-12-12 15:16

Branch CR28205 has been updated by isk.

SHA-1: a3926316ce27da1243d9009b68e4d9e5ed01310b


Detailed log of new commits:

Author: isk
Date: Mon Dec 12 15:16:13 2016 +0300

    Fix remarks by Kirill.

(0061577)
git (administrator)
2016-12-12 16:20

Branch CR28205_1 has been created by isk.

SHA-1: 63c4d8c8222cbb026c017d9f0915d693c8587a66


Detailed log of new commits:

Author: isk
Date: Fri Dec 9 13:50:40 2016 +0300

    0028205: Visualization - add functionality for dumping results of detection algorithms into image
    Add a new method in StdSelect_ViewerSelector3d - ToPixMap.
    Add a new enumeration - StdSelect_TypeOfSelectionImage.
(0061578)
isk (developer)
2016-12-12 16:21

Dear Kirill,
please review the branch CR28205_1.
(0061605)
git (administrator)
2016-12-13 12:20

Branch CR28205_1 has been updated forcibly by isk.

SHA-1: f07fd5252413d4e05bce528080bbf1ce2af92ea0
(0061606)
isk (developer)
2016-12-13 12:20

Create a subgroup for selectionimage tests.
(0061610)
git (administrator)
2016-12-13 12:50

Branch CR28205_1 has been updated forcibly by isk.

SHA-1: 87ee7e704f2fd1b45c2095bb1d60d2a820f74dcf
(0061611)
isk (developer)
2016-12-13 12:51

Ignore 'vfit' in the end file.
(0061620)
git (administrator)
2016-12-13 15:58

Branch CR28205_1 has been updated by isk.

SHA-1: 03059e21fb02b5d01ea446b12fcf9134fabb673b


Detailed log of new commits:

Author: isk
Date: Tue Dec 13 15:58:28 2016 +0300

    Fix generator color for selection mode.

(0061622)
git (administrator)
2016-12-13 16:20

Branch CR28205_1 has been updated by isk.

SHA-1: ecfb14c269ae0891de701c2c3062935143e630ee


Detailed log of new commits:

Author: isk
Date: Tue Dec 13 16:19:52 2016 +0300

    Use math_BullardGenerator to generate random color.

Author: isk
Date: Tue Dec 13 16:07:35 2016 +0300

    Fix generator for unnormalized depth.

(0061623)
git (administrator)
2016-12-13 16:37

Branch CR28205_2 has been created by isk.

SHA-1: 56871ec5bc199b9032bb63d6dd46571ea42e63c2


Detailed log of new commits:

Author: isk
Date: Fri Dec 9 13:50:40 2016 +0300

    0028205: Visualization - add functionality for dumping results of detection algorithms into image
    Add a new method in StdSelect_ViewerSelector3d - ToPixMap.
    Add a new enumeration - StdSelect_TypeOfSelectionImage.
(0061624)
isk (developer)
2016-12-13 16:37

Dear Kirill,
please review the branch CR28205_2.
(0061625)
git (administrator)
2016-12-13 17:13

Branch CR28205_2 has been updated forcibly by isk.

SHA-1: 759ec4572b5477895b35071a40e33b7c014e07c9
(0061626)
isk (developer)
2016-12-13 17:13

Add a new class Quantity_ColorHasher.
(0061641)
git (administrator)
2016-12-14 07:48

Branch CR28205_2 has been updated forcibly by isk.

SHA-1: 5f8ddc55d4b086e4ee92cf6aece80c3f5e1923e7
(0061642)
isk (developer)
2016-12-14 07:48

Remove MeshVS_ColorHasher and use Quantity_ColorHasher instead.
(0061832)
git (administrator)
2016-12-18 13:33

Branch CR28205_3 has been created by kgv.

SHA-1: 4d8be6a14a1fbf7927bdce169fa3bda1ad369f19


Detailed log of new commits:

Author: isk
Date: Fri Dec 9 13:50:40 2016 +0300

    0028205: Visualization - add functionality for dumping results of detection algorithms into image
    
    Add a new method in StdSelect_ViewerSelector3d - ToPixMap.
    Add a new enumeration - StdSelect_TypeOfSelectionImage.
    Add a new class - Quantity_ColorHasher.
    Remove MeshVS_ColorHasher and use Quantity_ColorHasher instead.
(0061833)
git (administrator)
2016-12-18 15:45

Branch CR28205_4 has been created by kgv.

SHA-1: 8bb06e22210f35f9e3e18b3bfe3b727027ae59a3


Detailed log of new commits:

Author: isk
Date: Fri Dec 9 13:50:40 2016 +0300

    0028205: Visualization - add functionality for dumping results of detection algorithms into image
    
    StdSelect_ViewerSelector3d::ToPixMap() - added new method for dumping
    detection results into an image.
(0061834)
git (administrator)
2016-12-18 16:22

Branch CR28205_4 has been updated forcibly by kgv.

SHA-1: f001f5dee9e52e2a7f566fc84882f4e267f8077b
(0061835)
kgv (developer)
2016-12-18 16:23

Please test the patch in branch CR28205_4.
(0061836)
git (administrator)
2016-12-18 16:50

Branch CR28205_4 has been updated forcibly by kgv.

SHA-1: 6a0fab15eac2c7d80fc43b8dc39c99011b18aa0a
(0061892)
apv (tester)
2016-12-20 11:52
edited on: 2016-12-20 12:30

Dear BugMaster,

Branch CR28205_4 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 6a0fab15eac2c7d80fc43b8dc39c99011b18aa0a

Number of compiler warnings:
occt component:
   Linux: 2 (0 on master)
   Windows: 1 (0 on master)
   MasOS: 1 (0 on master)
products component:
   Linux: 63
   Windows: 0
   MacOS: 1126
New warnings have been detected during OCCT component building
on Linux:
http://jenkins-test-05.nnov.opencascade.com/view/CR28205_4-master/job/CR28205_4-master-OCCT-Debian70-64-opt-compile/2/warnings17Result/ [^]
on Windows:
http://jenkins-test-05.nnov.opencascade.com/view/CR28205_4-master/job/CR28205_4-master-OCCT-Windows-64-VC10-opt-compile/2/warnings34Result/ [^]
on MacOS:
http://jenkins-test-05.nnov.opencascade.com/view/CR28205_4-master/job/CR28205_4-master-OCCT-MacOS-opt-compile/2/warnings7Result/ [^]

Regressions/Differences:
Not detected

Testing cases:
bugs vis bug28205_1 - OK
http://occt-tests/CR28205_4-master-OCCT/Debian70-64/bugs/vis/bug28205_1.html [^]
http://occt-tests/CR28205_4-master-OCCT/Windows-64-VC10/bugs/vis/bug28205_1.html [^]
bugs vis bug28205_2 - OK
http://occt-tests/CR28205_4-master-OCCT/Debian70-64/bugs/vis/bug28205_2.html [^]
http://occt-tests/CR28205_4-master-OCCT/Windows-64-VC10/bugs/vis/bug28205_2.html [^]

Testing on Linux:
Total MEMORY difference: 92676451 / 92918618 [-0.26%]
Total CPU difference: 21571.32000000019 / 21640.54000000027 [-0.32%]

Testing on Windows:
Total MEMORY difference: 58608908 / 58518712 [+0.15%]
Total CPU difference: 19514.08708949856 / 19818.897443398673 [-1.54%]

(0061893)
apv (tester)
2016-12-20 11:54
edited on: 2016-12-20 12:30

Dear Ilya,

Branch CR28205_4 has been rejected due to:
- additional warnings

(0061911)
git (administrator)
2016-12-20 14:56

Branch CR28205_4 has been updated forcibly by kgv.

SHA-1: 315ad3e7ae27af86fa4f311e261686caea3fdbf3
(0061912)
kgv (developer)
2016-12-20 14:57

Please re-check compilation on updated patch.
Regression testing is not needed.
(0061936)
apv (tester)
2016-12-21 10:28

Dear BugMaster,

Branch CR28205_4 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms.
SHA-1: 315ad3e7ae27af86fa4f311e261686caea3fdbf3

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 63
   Windows: 0
   MacOS: 1163
(0063555)
git (administrator)
2017-02-08 11:31

Branch CR28205 has been deleted by kgv.

SHA-1: a3926316ce27da1243d9009b68e4d9e5ed01310b
(0063556)
git (administrator)
2017-02-08 11:31

Branch CR28205_1 has been deleted by kgv.

SHA-1: ecfb14c269ae0891de701c2c3062935143e630ee
(0063557)
git (administrator)
2017-02-08 11:31

Branch CR28205_2 has been deleted by kgv.

SHA-1: 5f8ddc55d4b086e4ee92cf6aece80c3f5e1923e7
(0063558)
git (administrator)
2017-02-08 11:31

Branch CR28205_3 has been deleted by kgv.

SHA-1: 4d8be6a14a1fbf7927bdce169fa3bda1ad369f19
(0063559)
git (administrator)
2017-02-08 11:32

Branch CR28205_4 has been deleted by kgv.

SHA-1: 315ad3e7ae27af86fa4f311e261686caea3fdbf3

- Related Changesets
occt: master decdee7d
Timestamp: 2016-12-09 10:50:40
Author: isk
Committer: apn
Details ] Diff ]
0028205: Visualization - add functionality for dumping results of detection algorithms into image

StdSelect_ViewerSelector3d::ToPixMap() - added new method for dumping
detection results into an image.
mod - src/Image/Image_PixMap.cxx Diff ] File ]
mod - src/Image/Image_PixMap.hxx Diff ] File ]
mod - src/MeshVS/FILES Diff ] File ]
rm - src/MeshVS/MeshVS_ColorHasher.cxx Diff ] File ]
mod - src/MeshVS/MeshVS_ColorHasher.hxx Diff ] File ]
mod - src/MeshVS/MeshVS_DataMapOfColorMapOfInteger.hxx Diff ] File ]
mod - src/Quantity/FILES Diff ] File ]
add - src/Quantity/Quantity_ColorHasher.hxx Diff ] File ]
mod - src/StdSelect/FILES Diff ] File ]
add - src/StdSelect/StdSelect_TypeOfSelectionImage.hxx Diff ] File ]
mod - src/StdSelect/StdSelect_ViewerSelector3d.cxx Diff ] File ]
mod - src/StdSelect/StdSelect_ViewerSelector3d.hxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff ] File ]
add - tests/bugs/vis/bug28205_1 Diff ] File ]
add - tests/bugs/vis/bug28205_2 Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-12-09 10:23 kgv New Issue
2016-12-09 10:23 kgv Assigned To => kgv
2016-12-09 10:23 kgv Assigned To kgv => isk
2016-12-09 10:23 kgv Status new => assigned
2016-12-09 13:50 git Note Added: 0061521
2016-12-09 13:51 isk Assigned To isk => kgv
2016-12-09 13:51 isk Status assigned => feedback
2016-12-09 15:12 git Note Added: 0061523
2016-12-12 10:25 kgv Note Added: 0061560
2016-12-12 10:25 kgv Assigned To kgv => isk
2016-12-12 10:25 kgv Status feedback => assigned
2016-12-12 10:26 kgv Note Edited: 0061560 View Revisions
2016-12-12 15:16 git Note Added: 0061576
2016-12-12 16:20 git Note Added: 0061577
2016-12-12 16:21 isk Note Added: 0061578
2016-12-12 16:21 isk Assigned To isk => kgv
2016-12-12 16:21 isk Status assigned => resolved
2016-12-12 16:21 isk Steps to Reproduce Updated View Revisions
2016-12-13 11:54 isk File Added: normalized depth.png
2016-12-13 11:54 isk File Added: unnormalized depth.exr
2016-12-13 11:54 isk File Added: generated color for entity.png
2016-12-13 11:54 isk File Added: generated color for owner.png
2016-12-13 11:55 isk File Added: color of object.png
2016-12-13 12:20 git Note Added: 0061605
2016-12-13 12:20 isk Note Added: 0061606
2016-12-13 12:50 git Note Added: 0061610
2016-12-13 12:51 isk Note Added: 0061611
2016-12-13 15:53 isk File Added: generate color for selection mode.png
2016-12-13 15:58 git Note Added: 0061620
2016-12-13 16:20 git Note Added: 0061622
2016-12-13 16:37 git Note Added: 0061623
2016-12-13 16:37 isk Note Added: 0061624
2016-12-13 16:37 isk File Deleted: unnormalized depth.exr
2016-12-13 16:38 isk File Added: unnormalized depth.png
2016-12-13 17:13 git Note Added: 0061625
2016-12-13 17:13 isk Note Added: 0061626
2016-12-14 07:48 git Note Added: 0061641
2016-12-14 07:48 isk Note Added: 0061642
2016-12-18 13:33 git Note Added: 0061832
2016-12-18 15:45 git Note Added: 0061833
2016-12-18 16:22 git Note Added: 0061834
2016-12-18 16:23 kgv Note Added: 0061835
2016-12-18 16:23 kgv Assigned To kgv => bugmaster
2016-12-18 16:23 kgv Status resolved => reviewed
2016-12-18 16:50 git Note Added: 0061836
2016-12-19 09:36 apv Assigned To bugmaster => apv
2016-12-19 13:39 apv Test case number => bugs vis bug28205_1, bug28205_2
2016-12-20 11:52 apv Note Added: 0061892
2016-12-20 11:52 apv Assigned To apv => isk
2016-12-20 11:52 apv Status reviewed => assigned
2016-12-20 11:53 apv Note Edited: 0061892 View Revisions
2016-12-20 11:54 apv Note Added: 0061893
2016-12-20 12:30 apv Note Edited: 0061892 View Revisions
2016-12-20 12:30 apv Note Edited: 0061893 View Revisions
2016-12-20 14:56 git Note Added: 0061911
2016-12-20 14:57 kgv Note Added: 0061912
2016-12-20 14:57 kgv Assigned To isk => bugmaster
2016-12-20 14:57 kgv Status assigned => resolved
2016-12-20 14:57 kgv Status resolved => reviewed
2016-12-20 15:41 apv Assigned To bugmaster => apv
2016-12-21 10:28 apv Note Added: 0061936
2016-12-21 10:28 apv Assigned To apv => bugmaster
2016-12-21 10:28 apv Status reviewed => tested
2016-12-23 12:09 apn Changeset attached => occt master decdee7d
2016-12-23 12:09 apn Assigned To bugmaster => apn
2016-12-23 12:09 apn Status tested => verified
2016-12-23 12:09 apn Resolution open => fixed
2017-02-08 11:31 git Note Added: 0063555
2017-02-08 11:31 git Note Added: 0063556
2017-02-08 11:31 git Note Added: 0063557
2017-02-08 11:31 git Note Added: 0063558
2017-02-08 11:32 git Note Added: 0063559
2017-06-28 09:48 kgv Relationship added parent of 0028876
2017-09-29 16:18 user533 Fixed in Version => 7.2.0
2017-09-29 16:28 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker