1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0023272: Image comparison algorithm

A new class Image_Diff for comparison of images
and a draw-command "diffimage", which compares 2 images.

Image_PixMap redesigned to provide interface for low-level image operations.
New Image_AlienPixMap class now intended for Save/Load functionality.

Aspect_PixMap class dropped.
Xw_PixMap and WNT_PixMap classes now do not inherit from Aspect_PixMap and deprecated.

ToPixMap methods now retrieve Image_PixMap as argument.

Conflicts:
src/ViewerTest/ViewerTest.cxx
Remarks applied
Fix compilation (correct merging error)

Eliminated Aspect <-> Image cyclic dependency

Fixed GIF dump in case of BGR32 image format
This commit is contained in:
kgv
2012-09-10 14:30:46 +04:00
parent 567148d8f4
commit 692613e554
43 changed files with 3095 additions and 1289 deletions

View File

@@ -348,10 +348,6 @@ is
deferred class Window;
---Purpose: Defines a window.
---Category: Classes
deferred class PixMap;
---Purpose: Defines a pixmap(bitmap)
---Category: Classes
deferred class GraphicDevice;
---Purpose: Defines a physical graphic device allowing to

View File

@@ -1,92 +0,0 @@
-- Created on: 1999-10-14
-- Created by: VKH
-- Copyright (c) 1999 Matra Datavision
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
--
-- The content of this file is subject to the Open CASCADE Technology Public
-- License Version 6.5 (the "License"). You may not use the content of this file
-- except in compliance with the License. Please obtain a copy of the License
-- at http://www.opencascade.org and read it completely before using this file.
--
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
--
-- The Original Code and all software distributed under the License is
-- distributed on an "AS IS" basis, without warranty of any kind, and the
-- Initial Developer hereby disclaims all such warranties, including without
-- limitation, any warranties of merchantability, fitness for a particular
-- purpose or non-infringement. Please see the License for the specific terms
-- and conditions governing the rights and limitations under the License.
-- Updated: GG IMP100701 Add the "depth" field and method
-- to the pixmap object.
deferred class PixMap from Aspect
inherits
TShared from MMgt
---Purpose: This class allows the definition of a pixmap(bitmap)
uses
Handle from Aspect,
Color from Quantity
raises
PixmapDefinitionError from Aspect,
PixmapError from Aspect
is
Initialize ( aWidth, anHeight : Integer from Standard;
aDepth : Integer from Standard );
---Level: Public
---Purpose: Initializes the datas of a pixmap with a pixel size
-- <aWidth>,<anHeight> and depth.
Destroy ( me : mutable )
raises PixmapError from Aspect is deferred;
---Level: Advanced
---Purpose: Destroy the pixmap
---Category: Methods to modify the class definition
Dump ( me ; aFilename : CString from Standard;
aGammaValue: Real from Standard = 1.0 )
returns Boolean
raises PixmapError from Aspect is deferred;
---Level: Advanced
---Purpose:
-- Dumps the Bitmap to an image file with
-- an optional gamma correction value
-- and returns TRUE if the dump occurs normaly.
---Trigger: Raises if pixmap is not defined properly
PixelColor ( me : in;
theX, theY : in Integer from Standard )
returns Color from Quantity is deferred;
---Purpose:
-- Returns the pixel color.
----------------------------
-- Category: Inquire methods
----------------------------
PixmapID ( me ) returns Handle from Aspect
is deferred;
---Level: Advanced
---Purpose: Returns the ID of the just created pixmap
---Category: Inquire methods
Size ( me ; aWidth, anHeight : out Integer from Standard )
is static;
---Level: Public
---Purpose: Returns the allocated pixmap's size in PIXEL
---Category: Inquire methods
Depth ( me ) returns Integer from Standard
is static;
---Level: Public
---Purpose: Returns the allocated pixmap's depth (planes number)
---Category: Inquire methods
fields
myWidth : Integer from Standard is protected;
myHeight : Integer from Standard is protected;
myDepth : Integer from Standard is protected;
end PixMap;

View File

@@ -1,52 +0,0 @@
// Created on: 1999-10-14
// Created by: VKH
// Copyright (c) 1999 Matra Datavision
// Copyright (c) 1999-2012 OPEN CASCADE SAS
//
// The content of this file is subject to the Open CASCADE Technology Public
// License Version 6.5 (the "License"). You may not use the content of this file
// except in compliance with the License. Please obtain a copy of the License
// at http://www.opencascade.org and read it completely before using this file.
//
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
//
// The Original Code and all software distributed under the License is
// distributed on an "AS IS" basis, without warranty of any kind, and the
// Initial Developer hereby disclaims all such warranties, including without
// limitation, any warranties of merchantability, fitness for a particular
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
// Updated GG IMP100701 Add the "depth" field and method
// to the pixmap object.
//-Version
#include <Aspect_PixMap.ixx>
//-Constructor
////////////////////////////////////////////////////////////////////
Aspect_PixMap::Aspect_PixMap ( const Standard_Integer aWidth,
const Standard_Integer anHeight,
const Standard_Integer aDepth )
{
myWidth = aWidth;
myHeight = anHeight;
myDepth = aDepth;
}
////////////////////////////////////////////////////////////
void Aspect_PixMap::Size ( Standard_Integer &aWidth,
Standard_Integer &anHeight ) const {
aWidth = myWidth;
anHeight = myHeight;
}
////////////////////////////////////////////////////////////
Standard_Integer Aspect_PixMap::Depth () const {
return myDepth;
}

View File

@@ -42,7 +42,6 @@ uses
TypeOfResize from Aspect,
FillMethod from Aspect,
Handle from Aspect,
PixMap from Aspect,
Ratio from Quantity,
Parameter from Quantity,
NameOfColor from Quantity,
@@ -208,12 +207,6 @@ is
-- or the area is out of the Window.
raises WindowError from Aspect is deferred;
ToPixMap ( me )
returns PixMap from Aspect
---Level : Public
---Purpose : dump the full contents of the window to a pixmap.
is deferred;
Load ( me ; aFilename : CString from Standard) returns Boolean
---Level: Advanced
---Purpose: Loads the XWD file to this Window.