Want to select a non rectangular area in xy graph( ellipse, oval)
I have a xy graph that is the combination of 1 histogram in the x plane and a different histogram in the y plane. I would like to be able to draw a shape around the resulting smear to be able to see how many events occured in this area of interest. I can get close with 2 cursors, but my application requires to be a tighter fit.
Thanks,
kubs23
Here's an idea:
Draw the ellipse on top of the graph using the plot image feature. Here are some references.
How to draw on top of an xy graphs: http://forums.ni.com/ni/board/message?board.id=170&message.id=202702#M202702
(Instead of cursor positions, use mouse-down and mouse-move events. Of course an ellipse has more degrees of freedom, so you need extra inputs to e.g. set the excentricity, or keep that fixed at e.g. 3:1.). Now just draw an ellipse between the mouse-down and mouse-move coordinates which has the major axis connecting the two points.
How to draw a rotated ellipse (see attached, modified from: http://forums.ni.com/ni/board/message?board.id=170&message.id=140604#M140604).
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Ellipse3.vi 36 KB
Similar Messages
-
I want to select a specific rectangular position from intensity graph to extract the x and y values
I want to select specfic rectangular postion from an intensity graph to extract the X and Y values at that specific position.
Is this possible using LabVIEW?
@nkHi nk,
Is this possible using LabVIEW?
Yes.
I want to select specfic rectangular postion from an intensity graph to extract the X and Y values at that specific position.
Just select the positions! What's your problem in doing so?
Btw. when you select positions you already know their XY values!? I don't get the point of your task...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
Non-Rectangular JFrames using JNA or IBM IFrame
Hi,
I want to make a non-rectangular frame with round-shaped edges. I searched through this forum. But still unsuccessful. I can even go for a platform dependent solution. But i don't want to use Robot class which is taking screen-captures at interval or at system-events. This approach is very slower and faulty. Is anybody having experience in using JNA or IBM IFrame libraries (or any other approach) for this purpose?
Thanks in advance,
Sunil -
How to draw non intersecting area of two GeneralPath
Hi all ,
I have two generalpath GP1 and GP2 .
GP1 and Gp2 are overlapping.
Im able to draw the overlapping region between the two .
I want to make the non overlapping area between these two generalpath .
Is there any API or method to draw that
Thanks and regards
Anshuman SrivastavaNot tested.
public static Shape createNonOverlappingArea(Shape GP1, Shape GP2) {
* Create an area that contains the total of GP1 and GP2.
Area rv = new Area(GP1);
rv.add(new Area(GP2));
* Create an area that contains the overlap.
Area overlap = new Area(GP1);
overlap.exclusiveOr(new Area(GP2));
* Subtract the overlap from the total area.
rv.subtract(overlap);
* Now rv contains the non overlapping parts.
return rv;
}Piet -
Just bought a nano and want to download some of my iTunes library. The "Music" button shows almost all my selections but some albums are missing, yet ONLY those albums appear on the nano icon on my desktop after being dragged there but none of the others. What's happening?
I've read some of the post here that I thought might help but they refer to titles (Music) and triangles in the "Devices" window which are nowhere to be seen when I open the "Devices" window.
I have iTunes 11.0.3 and Mac OS 10.6.8. Does this make a difference?I should mention that, for the first problem, I do make sure that my new tracks are stored in the folder where I told iTunes that my music is in. Also, when I say the cataloging of my library stops short of cataloging all my songs, I have tried leaving the computer unattended for days (my computer's sleep mode is disabled). It always stops before cataloging all of my music regardless of whether I am doing something else while iTunes is cataloging, or if I just let iTunes be the only program that's open during the cataloging process.
-
Non-rectangular click area?
I have a map that contains several areas, which have
irregular shapes, i.e., they all have non-rectangular contours.
Each such area is a movie clip, made from a transparent gif. Any
part outside of this area (non-rectangular contour) is transparent.
I have onRollOver and onRollOut event handler to process when
a mouse moves in or out of an area. But it seems that a "in" only
happens when mouse actually moves into the rectangle that enclose
an area and "out" only happens when mouse actually moves out that
rectangle.
So, how to make these events handle this non-rectangular
shapes? Thanks!quote:
Originally posted by:
Newsgroup User
If you're making an what's usually called an "invisible
button," then all you need is artwork in the Hit frame only. If you
only have shapes (or whatever) in the Hit frame, then the button
symbol will be invisible at runtime, and will show as a teal
preview in the authoring environment.
The MovieCip.hitArea property is a property of the MovieClip
class, which defines the functionality for all movie clips. The
Button class does not feature such a property, so if you want to
use it, you'll have to use
movie clip symbols.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."
Thanks! Words convey knowledge.
After reading your reply twice, in fact, from thinking too
hard to make the whole thing work based on those GIF-derived movie
clips, I just realized that I should've created the clips directly
from vector images.
Now, for each area's gif bitmap, I converted it into vector
first and then converted it into a movie clip symbol. In this way,
no special codes need to be used and it is more straightforward.
So, I guess one big wrong assumption I've made until now is
that converting a GIF directly into a movie clip should
automatically include a step to make the bitmap vector image.
Thanks all for your help! -
My new Photoshop Elements 12 has a RAW file plug-in, but when I try OPEN to select a photograph, there are only generic icons instead of pictures-- I can't tell one photograph from another! How can I fix this so I can tell which photograph I want to open? Thank you!
Thanks R_Kelly:
Adobe Photoshop Elements Version: 12.0 (12.1 (20140303.12.1.49334)) x32
Operating System: Windows Vista 32-bit
Version: 6.0 Service Pack 2
System architecture: Intel CPU Family:6, Model:15, Stepping:11 with MMX, SSE Integer, SSE FP, SSE2, SSE3
Physical processor count: 4
Processor speed: 2400 MHz
Built-in memory: 3069 MB
Free memory: 1631 MB
Memory available to Photoshop Elements: 1598 MB
Memory used by Photoshop Elements: 69 %
Image tile size: 128K
Image cache levels: 8
Video Card: ATI Radeon HD 4800 Series
Video Mode: 1680 x 1050 x 4294967296 colors
Video Card Caption: ATI Radeon HD 4800 Series
Video Card Memory: 512 MB
Application folder: C:\Program Files\Adobe\Photoshop Elements 12\
Photoshop Elements scratch has async I/O enabled
Required Plug-ins folder: C:\Program Files\Adobe\Photoshop Elements 12\Required\
Primary Plug-ins folder: C:\Program Files\Adobe\Photoshop Elements 12\Plug-Ins\
The first thing I did was UPDATE. I have all the latest updates available (according to the updater). The Camera Raw Plug-in says it is version 8.0.
The RAW files are from a Canon T3i. It's a very common camera, I can't believe it wouldn't be supported. -
How can I count the number of pixels in a non-rectangular selection?
I need to know the exact number of pixels that I select for a size comparison. It's a non-rectangular selection similar to a cloud.
I'm using CS2 but could upgrade if needed.Thank You
Michael D. Sutton
(435) 723-3566
(435) 720-2878
[email protected] -
Compute pixel value statistics on areas delimited by non-rectangular pols
Hi,
I'm new with Oracle Spatial/GeoRaster. I'd like to compute pixel value statistics on a GeoRaster object, but I don't want to do it using rectangular polygons (required by SDO_GEOR.generateStatistics procedure). SDO_GEOR.subset procedure uses a rectangular windows or the MBR of a polygon to perform the operations too.
Is there any way of doing it, or should I have to code myself? BTW, I'm using Oracle GeoRaster 11gR1.
Thanks in advance,
JorgeHello Jeffrey,
Thanks for response. I've tried a different thing. The windows I wanted to use, was a buffer around a point, but I can create the mbr of this buffer, to have a rectangular window. Looking at the result in OpenJUMP, seems to work fine.
BTW, this is only a small part of my code, and I'm not sure of doing things well. My point is I have 2 layers: a raster layer (loaded as GeoRaster objects) and a vector layer (a shapefile loaded in Spatial). Both in same reference system (srid 4326).
My vector layer is a set of points, and I've created the mentioned buffers around them. Now, I want to compute pixel value statistics using the MBR of the buffers as window for generateStatistics function.
georaster table with fields: image_id number, image sdo_georaster
buffers table with fields: id number, geom sdo_geometry
The relevant part of my PL/SQL code looks like this:
declare
cellCoordinate mdsys.sdo_geometry;
begin
for intersection in
(select t.id, t.geom, r.image_id as rid, r.image from georaster_table r, buffers_table t
where sdo_geom.sdo_intersection(r.image.spatialExtent, t.geom, 0.005) is not null)
loop
-- First, we need buffer geom coordinates in raster space coordinates
sdo_geor.getCellCoordinate(intersection.image, 0, intersection.geom, cellCoordinate);
-- Generate statistics for the intersection between georaster spatial extent and buffer, without histogram, layer 1.
ret := sdo_geor.generateStatistics(intersection.image, 'samplingFactor=1', cellCoordinate, 'FALSE', '1-1');
-- Insert the statistics array in another table, with the georaster id and the buffer id, to further study
insert into statistics_table(id, rid, statistics) values (intersection.id, intersection.rid, ret);
end loop;
end;
Could it be a good way of doing this operation?
Many thanks again -
Non Rectangular selection in Tables.. How to?
HI there,
Can i select contiguous cells in a tablein a non rectangular fashion.?Ex: I ve a 3X3 table consisting of 1,2,3
4,5,6
7,8,9
Can i select the cells {2,4,5,6,8}..
Thank YouUnfortunately, it is a lot of work in order to do this.
I've already done that and I had to create my own model to keep
the selections (it must keep a boolean for each cell indicating the selection state) and I had to override all the methods of JTable that
concern the selection (row and column).
As the row selection is managed by the JTable and the column selection is managed by the TableColumnModel, it is a bit hard.
I'm sorry, but I can't post my code because it is a part of a commercial softwware.
If somebody has a simplest idea! -
Cropping non-rectangular image
Hello,
I need to crop a slightly non-rectangular, four-sided image (a photo of a picture in a frame) and end up with a rectangular image. I've tried cropping and lassoing but nothing seems to do the job. Most grateful if anyone can tell me how I might do this on PSE.
Thanks
MichaelWitteboomen wrote:
Plse excuse Dunn question, Michel, but what is ACR?
Best
Michael
ACR (Adobe Camera Raw) is the module of PSE which is used to first convert raw images so that they can be read and edited in the Editor.
This module can also be used to open jpeg files:
In the Editor, menu /File/Open As
you select a jpeg picture and in the line'Open As', just under where you enter the file name, you must choose the 3rd option :
Camera raw...
This opens a new dialog window in which you can do the main edits to your image by adjusting a few sliders.
Of course, raw file will benefit more from being processed in ACR, but it's also interesting for jpegs.
How can editing through ACR be a 'non destructive' process ?
It's because the principle of ACR (also used in Photoshop CS) is to store all editing commands and settings separately from the original picture data which are never changed. In the case of jpegs, the settings are stored in the metadata section of the jpeg file (where the camera name and settings are kept) without changing anything in the way pixels are represented. The 'recipe' is stored, but the pixels stay unchanged. When you straighten and crop, if you click 'Done', the settings are saved. If you want to do some editing or print your file, you click 'Open' and the result of your edits in ACR is opened in the Editor. If you do changes in the editor, of course, those edits will be 'destructive' (as usual in the Editor) so that you'll have to save the file with another name to keep the original. If you do no edits in the Editor, but only print or convert the file to another format, the original picture data is not changed.
In that last case, you don't need to re-open the picture with 'Open As', the Editor will know the picture has to be opened in the ACR module with the usual 'Open'. But it you want to re-open the same picture in another application like Picasa, the Adobe editing data will be ignored and you'll see the original version. -
In OB29 which box should I flag on if I want to select my fiscal variant N6
Hello,
On BW side I want to select my fiscal year varaint as N6, so I go to tcode OB29 and which cloumn should i flag on the first one or second (year dependent or calendar year) right now none of that boxes are selected. ?
The calendar year cloumn has 5 boxes flaged on K0 to K5 what does that mean ?
Can i make the changes staright away in production?
After making the changes do i have to reload the data to get right periods for the transaction data?
Thanks in advancefiscal year variants are usually defined on the source system. We transfer the global settings from the source system to BI for currencies, fiscalyear variants, UOM, factory calender. Go to source system, right click on ur source system - transfer global settings - fiscalyear variants - Mode - update tables.
-
Non rectangular windows using Swing
Hi everybody
I've been trying to create a non rectangular window (i.e. an oval window) subclassing javax.swing.JWindow but even though the drawing of the inside of the window works correctly, the problem is with the outer part, which is painted anyway using the background color while I'd like to have it
transparent so to simulate a real oval window.
i.e. I'd like to have something like (dots are just fillings to give the drawing some shape):
|. Transparent background...|
| ..... ----------------------- .......... |
| .... / Window ............... \ ....... |
| .... \ contents .............. / ....... | <--- Window's bounds
| ..... ----------------------- .......... |
|_____________________|
Any idea about how to prevent the background from being painted??
Thanks in advance
andreaHere is what I have done to overcome a similar problem.
These two classes help me show a 'Bubble' popup similar to what Windows XP have
You can tweak it like you want.
/* Subclass of Window to show the Bubbles */
public class WindowBubble extends Window{
public WindowBubble(Frame owner, String text, Point startingPoint){
super(owner);
JBubble bubble = new JBubble(text, startingPoint);
setLocation(startingPoint);
add(bubble);
pack();
/* This code is based on SUN's examples of how to create Oval-Components */
public class JBubble extends JLabel {
int capWidth = 30;
Point start;
String label;
BufferedImage image;
public JBubble() {
this("", null);
public JBubble(String label, Point p) {
this.label = label;
start=p;
try {
Robot r = new Robot();
image = r.createScreenCapture(new Rectangle(start.x,start.y, getPreferredSize().width, getPreferredSize().height));
}catch(Exception e){
e.printStackTrace();
this.setHorizontalAlignment(JLabel.CENTER );
public String getLabel() {
return label;
public void setLabel(String label) {
this.label = label;
invalidate();
repaint();
public void paint(Graphics g) {
int width = getSize().width - 1;
int height = getSize().height - 1;
g.drawImage(image,0,0,this);
Color interior;
interior = (Color)UIManager.get("ToolTip.background") ;
// ***** paint the interior of the button
g.setColor(interior);
// left cap
g.fillArc(0, 0, // start
capWidth, height, // size
90, 180); // angle
// right cap
g.fillArc(width - capWidth, 0, // start
capWidth, height, // size
270, 180); // angle
// inner rectangle
g.fillRect(capWidth/2, 0, width - capWidth, height);
// ***** highlight the perimeter of the button
// draw upper and lower highlight lines
g.setColor(Color.black);
g.drawLine(capWidth/2, 0, width - capWidth/2, 0);
g.drawLine(capWidth/2, height, width - capWidth/2, height);
// upper arc left cap
g.drawArc(0, 0, // start
capWidth, height, // size
90, 180-40 // angle
// lower arc left cap
g.drawArc(0, 0, // start
capWidth, height, // size
270-40, 40 // angle
// upper arc right cap
g.drawArc(width - capWidth, 0,// start
capWidth, height, // size
90-40, 40 // angle
// lower arc right cap
g.drawArc(width - capWidth, 0, // start
capWidth, height, // size
270, 180-40 // angle
// ***** draw the label centered in the button
Font f = getFont(); if(f != null) {
FontMetrics fm =
getFontMetrics(getFont());
g.setColor(getForeground());
g.drawString(label, width/2 - fm.stringWidth(label)/2, height/2 + fm.getHeight()/2 - fm.getMaxDescent() );
public Dimension getPreferredSize() {
Font f = getFont();
if(f != null) {
FontMetrics fm = getFontMetrics(getFont());
return new Dimension(fm.stringWidth(label) + capWidth*2, fm.getHeight() + 10);
} else {
return new Dimension(100, 50);
public Dimension getMinimumSize() {
return new Dimension(100, 50); -
Selectivity for non-pupular value in Height based Histograms.
Hi,
I wanted to check how optimizer calculates the cardinality/selectivity for a value which is not popular and histogram is height based histograms.
Following is the small test case (Version is 11.2.0.1) platform hpux
create table t1 (
skew not null,
padding
as
/* with generator as (
select --+ materialize
rownum id
from all_objects
where rownum <= 5000
select /*+ ordered use_nl(v2) */
v1.id,
rpad('x',400)
from
generator v1,
generator v2
where
v1.id <= 80
and
v2.id <= 80
and
v2.id <= v1.id
;Following is the table stats:
SQL> select count(*) from t1;
COUNT(*)
3240
SQL> exec dbms_stats.gather_table_stats('SYS','T1',cascade=>TRUE, estimate_percent => null, method_opt => 'for all columns size 75');
PL/SQL procedure successfully completed.
SQL> select column_name,num_distinct,density,num_buckets from dba_tab_columns where table_name='T1';
COLUMN_NAME NUM_DISTINCT DENSITY NUM_BUCKETS
SKEW 80 .013973812 75
PADDING 1 .000154321 1
SQL> select endpoint_number, endpoint_value from dba_tab_histograms where column_name='SKEW' and table_name='T1' order by endpoint_number;
ENDPOINT_NUMBER ENDPOINT_VALUE
0 1
1 9
2 13
3 16
4 19
5 21
6 23
7 25
8 26
9 28
10 29
ENDPOINT_NUMBER ENDPOINT_VALUE
11 31
12 32
13 33
14 35
15 36
16 37
17 38
18 39
19 40
20 41
21 42
ENDPOINT_NUMBER ENDPOINT_VALUE
22 43
23 44
24 45
25 46
26 47
27 48
28 49
29 50
30 51
32 52
33 53
ENDPOINT_NUMBER ENDPOINT_VALUE
34 54
35 55
37 56
38 57
39 58
41 59
42 60
43 61
45 62
46 63
48 64
ENDPOINT_NUMBER ENDPOINT_VALUE
49 65
51 66
52 67
54 68
56 69
57 70
59 71
60 72
62 73
64 74
66 75
ENDPOINT_NUMBER ENDPOINT_VALUE
67 76
69 77
71 78
73 79
75 80
60 rows selected.Checking the selectivity for value 75(which is the popular value as per information from dba_tab_histograms
SQL> set autotrace on
SQL> select count(*) from t1 where skew=75;
COUNT(*)
75
Execution Plan
Plan hash value: 4273422929
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 3 | 1 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 3 | | |
|* 2 | INDEX RANGE SCAN| T1_I1 | 86 | 258 | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("SKEW"=75)Skipped the Statistics information for keep example short.
selectivity for 75 (popular value) = 2/75 = 0.02666
Cardinality for 75 is = selectivity * num_rows = 0.02666*3240 = 86.3784 (rounded to 86) >> Here selectivity and cardinality are correct and displayed in autotrace.
SQL> select count(*) from t1 where skew=8;
COUNT(*)
8
Execution Plan
Plan hash value: 4273422929
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 3 | 1 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 3 | | |
|* 2 | INDEX RANGE SCAN| T1_I1 | 29 | 87 | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("SKEW"=8)how the cardinality is 29 calculated. I think the formula for selectivity is
select for 1(non popular value) = density * num_rows = .013973812 * num_rows (which is 45 approx) but in autotrace its 29
SQL> select count(*) from t1 where skew = 46;
COUNT(*)
46
Execution Plan
Plan hash value: 4273422929
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 3 | 1 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 3 | | |
|* 2 | INDEX RANGE SCAN| T1_I1 | 29 | 87 | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("SKEW"=46)46 is also non popular value
So how the value is calculated for these values?Your example seems to be based on Jonathan Lewis's article:
http://jonathanlewis.wordpress.com/2012/01/03/newdensity/
In this article, he does walk through the calculation of selectivity for non-popular values.
The calculation is not density but NewDensity, as seen in a 10053 trace, which takes into account the number of non-popular values AND the number of non-popular buckets
The article describes exactly how 29 is derived.Hi Dom,
Yes i used the same sample script of create the data sets. I should have checked Jonathan's blog for new density calculations. So selectivity works out as two either ways
1) selectivity(non popular) = Newdensity(took from 10053 traces) * rum_rows
or
2) non-popular rows/ non_popular values (where non-popular values can be derived from 10053 traces and non popular rows are (3240 * (74-31)/74 = ) 1883
Thanks for pointing to right blog -
Non-Rectangular Buttons with images
is it possible to create a non-square "button" in flash cs4
programmatically using as3?
Using a xml document, i'm trying to be able to retrieve a
.png file with transparency, and have said transparent area's be
not clickable.
Long story short, I'm creating a map with a bunch of
clickable areas. These areas are non-rectangular and I need them to
not obscure other area's which would be in their rectangle. I need
this to be done programmatically since the area's are going to be
dynamic as is the data attached to them.
fyi: I have a fairly good grasp of OOP, so don't be afraid to
post up complex instructions.Now we're cooking with gas! Thank you so much for your
assistance!
The only issue left;
is it possible for the Events to penetrate through, so that
if two elements slightly overlap, the transparent part of obj1 will
allow a onclick (and subsequently the onmouseover) event on el2,
preferably dynamically so that I don't have to add event handlers
between the two.
Is there a simple way or do i need to calculate the overlap
using the x/y coords and width/height of each element, then
manually dispatch?
here's where I'm at thus far (with this discussion)
Firstly, the class for the movie clip,
then our frame.
Maybe you are looking for
-
Would like to use 4nr iPads as an autocue system. Can I view the same pdf on multiple iPads at the same time with 1 iPad operating as the master (controlling page turns etc) and the others operating as slaves? Can this be done without the use of 3G o
-
HT4718 yosemite recovery failed and disk no longer recognized
Hi everyone, I've installed yosemite, no problem at first time.... yesterday i've turn on mb pro, closed the notebook during boot time... ->error. Now the OS don't start end still remain at middle loading, then I've tried the recover (command+R). Wel
-
CS5 InDesign won't install on MacBook Pro
Hi, I've attempted 2x now to install InDesign via my CS5 installation discs on my MacBook Pro, and everything except InDesign loads each time. I get this error message: Exit Code: 7 -------------------------------------- Summary ---------------------
-
Quote Expiration Process in SAP
Hi All: I have a situation below: During the vendor Quote Process, quote comes only with 90 days validity. Now after the quote some times it takes time to take the decision to move further. now if at the time of PO, if quote is expired than they have
-
Nokia e71 - array of problems.
Hey there, I'm new around here so I'm hoping I can find some quick help or a fix for my ever-more annoying e71. First off the bat, it won't vibrate. Well, it will. But it stops vibrating when it feels like it. Sometimes when I get a call, it will vib