01-11-2017 07:56 AM
there is a sub vi in labview named Draw Circle by Radius VI. I want to add the image in that circle. Plz help
01-11-2017 08:15 AM
We need more details. What are you trying to achieve, to display an image inside your circle but remove/hide the part of that image that is outside the circle?
If so you could create a circle filled with value 1 on a black background (value 0) and use that 'Boolean' image to mask your image..
If something else pleas explain!
01-11-2017 08:28 AM
In Draw Circle by Radius sub VI, there are several terminals, i am using radius, pixel center through which i am controlling the position of the image. There is color terminal to fill that image with a solid color. so instead of filling it with color, I want to fill this some external image.
01-11-2017 08:40 AM - edited 01-11-2017 08:40 AM
Hi kashifsherwani,
then you need to go the way as has been suggested before: use your b/w circle as a mask on your image!
Do you have some (beginner) experience with image processing tools like Photoshop or GIMP? Have you ever used layers in those tools? That would give you some insights on our suggestion!
01-11-2017 08:44 AM
so again 'filling' with an image corresponds to 'adding' that image to a black background. You need to create your circle so it can be used to mask your image (if you goal is to make your image circular). Alternatively you can work directly on your image and select the pixels to keep based on the distance to your center point. Keep if distance less that diameter, discard if bigger.
There are several ways to achieve what I believe you want, masking with a filled circle or selecting based on the distance from the circle are just two methods.
01-11-2017 09:14 PM
my apologies I didnt get your point. I am attaching the snapshot. I am moving this circle according to the condition in the front panel. so i want to fill this circle with an image instead of solid color. I didnt want to just add a circular image at the background but want to move that also using the pixel center.
01-12-2017 02:13 AM - edited 01-12-2017 02:15 AM
Hi kashifsherwani,
so you want to move the image with the circle (aka "the same image is displayed at different pixel coordinates")?
Read in the image using the image file functions. Prepare your circular selection, setting the outer parts to transparent. Then insert the image at the needed coordinates in your 2DPictureIndicator!
Hint: read the help for DrawUnflattenedPixmap…
01-12-2017 06:37 AM
Thankyou very much sir. I got that finally...:-)