Picture control rotation - losing color table

Hi:
I have some code to rotate pixmaps in a picture control.  I am attaching it here with a sample .png.  I lose the default color table when the rotation occurs, and I don't know why.  Any thoughts?
Thanks,
Don
Attachments:
picture_manipulation.llb ‏627 KB
test.png ‏19 KB

You probably need to manually select the polymorphic instance for the "draw unflattened pixmap.vi" in the orientation event case. Right-click on it and "Select type... Draw 8 bit pixmap". Seems to work just fine here after that.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Q: Repost. Visualizing Measurement Data in Picture Control. Was: Color Table Question

    I wish to visualize in a picture control a matrix of 80 * 80, 16 bits
    values. These values represent grey scale light intensities.
    I'm trying to use for this the Flatten Pixmap.vi, followed by Draw Flattened
    Pixmap.vi.
    Because the Flatten Pixmap.vi doesn't accept a 16 bit pixmap, I have
    compressed the data for each pixel to 8 bits.
    Then, as I understood, I should connect an array of 256 elements to the
    Color input of the Flatten Pixmap.vi.
    What should contain the elements of the mentioned array so that I get a gray
    scale image? Where can I read about this or find an example?
    Thanks a lot in advance.
    Victor

    Thanks to all of you who tried to help me. The problem isn't totally solved
    yet but I could advance.
    For unknown reason my newsgroup server hasn't carried out their answers,
    that I have recently seen through the NI site.
    Victor
    "Victor Manta" <[email protected]> wrote in message
    news:[email protected]..
    >I wish to visualize in a picture control a matrix of 80 * 80, 16 bits
    >values. These values represent grey scale light intensities.
    >
    > I'm trying to use for this the Flatten Pixmap.vi, followed by Draw
    > Flattened Pixmap.vi.
    >
    > Because the Flatten Pixmap.vi doesn't accept a 16 bit pixmap, I have
    > compressed the data for each pixel to 8 bits.
    >
    > Then, as I understood, I should connect an array of 256 elements to the
    > Color input of the Flatten Pixmap.vi.
    >
    > What should contain the elements of the mentioned array so that I get a
    > gray scale image? Where can I read about this or find an example?
    >
    > Thanks a lot in advance.
    >
    > Victor
    >
    >

  • BCG Brightness Contrast Gamma - Looking for BCG function returning color table / lookup table coded in pure G and applicable to Intensity Graph or Picture Control

    Looking for BCG function returning color table / lookup table coded in
    pure G and applicable to 8-bit Intensity Graph or Picture Control. Do
    not want to use IMAQ Vision is this particular application.  Any
    help is appreciated.
    Sincerely,
    Don

    Take a look at this color model software I put together.  (Don't concern yourself much with the basic programming at this point.). The color component generator subVI is borrowed from a LabVIEW example.
    First look at test_color2.vi.  If you adjust the sliders of the various controls, you will see how it works.  You can see that for pure B&W images, brightness, contrast, and gamma (which I think I have coded correctly) are all fairly straightforward to modify.
    Now look at test_color3.vi.  Here we try to adjust BCG for color images using the color model shown here where current color component clusters are carried into the BCG event cases via shift registers.  You can see that once color is introduced into the image, it becomes difficult to mix the colorizing with the BCG model.  And this is pretty much where I am right now.
    Would be interested in comments / suggestions.
    Sincerely,
    Don
    Attachments:
    test_color2.llb ‏2251 KB

  • Replacing colors in a picture control

    Hi all,
    I'm running into some performance issues with the frequent updating of colors in a picture control. This is the method I'm currently using to update the colors.
    The picture contains only two colors; the color of the icon, and the pane color to mimic transparency.
    is this method possibly too slow and could be the culprit of perfomance issues, and is there a better way of doing this?
    Thanks

    Hi Gazebo,
    a loop-less approach:
    It's not perfect as it creates datacopies and has a coercion dot inside, but may provide ideas!
    You may even use ReshapeArray to work with a 1D array (in the core of the routine), LabVIEW usually is faster then…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I get scripting access to color values in the indexed Color Table?

    Hey all,
    I'm relatively new to Photoshop scripting, but I've just finished a script that helps my fiance with some very tedious tasks related to textile design.
    The last issue that I'm having is that the image I start with is indexed and has a very specific Color Table pallete ( 2-12 colors max + black and white, so 14 max total, sometimes as few as 2 ). Part of my script, I create a number of color chips and fill them with black currently... What I'd like is to be able to get a count of the colors in the Color Table and put the actual color values as hex into an 1 dimension array, so that I fill those black chips I've made with the actual colors from the Color Table.
    ( I don't know if it makes a difference but I'm converting the image to RGB mode at some point in the script, and back to Indexed Exact ).
    Can anyone please help me do this? Needs to be compatible with CS5 and CS6 ideally.
    Thanks!!

    Cheers for that, your code works but what had thrown me was that the collections appear to be empty - so I hadn't actually tried retrieving one, I just assumed I was looking in the wrong place.
    So if I do this in my Immediate window:
     App.Current.Resources.Count
     0
    Yet when I request it, I get one:
     App.Current.Resources["TitleTextStyle"]
     {Windows.UI.Xaml.Style}
         base {Windows.UI.Xaml.DependencyObject}: {Windows.UI.Xaml.Style}
         BasedOn: {Windows.UI.Xaml.Style}
         IsSealed: false
         Setters: {Windows.UI.Xaml.SetterBaseCollection}
         TargetType: {Name = "TextBlock" FullName = "Windows.UI.Xaml.Controls.TextBlock"}
    Looking at the resources object itself, I get similar apparently empty collections:
     App.Current.Resources
     {Windows.UI.Xaml.ResourceDictionary}
         base {Windows.UI.Xaml.DependencyObject}: {Windows.UI.Xaml.ResourceDictionary}
         Count: 0
         IsReadOnly: false
         Keys: Count = 0
         MergedDictionaries: {Windows.UI.Xaml.DependencyObject}
         Source: null
         ThemeDictionaries: {Windows.UI.Xaml.ResourceDictionary}
         Values: Count = 0

  • 3D Picture Control Orthographic View zoom - Camera Set up?

    I am trying to display two 3D picture controls.  One displays some objects in 3D (Auto Projection: Perspective, Camera Controller: Spherical).  This 3D image works great and I am having no problems with it.  The other Picture Contol is meant to simulate a 2D image of the 3D object, essentially a Plan View.  To do this I made a 3D picture control with a Orthographic view.  I set the camera to view from above (z-axis) and set the target to be positive y-axis. 
    I have attached an example vi (labview 2013 SP1) that creates some simple 3D objects and displays them in Perspective and Orthographic using the same Camera Position.  On initial start, the Orthographic image is zoomed in heavily. If I manually zoom it (Hold Shift button and mouse up or down), then the Orthographic image will set itself to the correct Camera position.  This is essentially the solution to my problem, but I can't assume the user will have the ability to manually zoom the image.  So I need to set it programmatically.
    If you manual adjust the view on either screen (rotate and zoom), then click the Set Camera button, both images will give a plan view, but only the Perspective Image will be at the correct camera zoom or distance.  The Orthographic stays at the last zoom distance.
    Is there any way to set the Camera distance for Orthographic projection programmatically?   I have tried starting with the 3D picture control as perspective, set the camera distance and then changing it to orthographic, but this still results in a zoomed orthographic image.  From the reading I have done, I think I am trying to the impossible.  Does any one have another suggestion to get the same result.  I have previously used the 2D picture functions to generate the image but found that method inefficient. 
    And suggestions would be great.
    Thanks
    Relec
    Attachments:
    3D_projection_Test.vi ‏38 KB

    Hi Relec,
    thank you (and Kudos) for that inspiring demo!
    Took me while to work it out, but I might have found something that could help us with the orthographic projection.
    Sometime back someone posted a way to collect the current Camera data. Sorry I lost the source. But here is my version as a Get3DCameraPosition.vi using the ModelViewMatrix.
    Unfortunatly this doesn't return the current Target and so a bit of guessing in the right Direction is necessary.
    I'm impressed you found a way to make the Shift-Drag Zoom-movement possible on the orthographic window.
    It seems a whole thread at http://forums.ni.com/t5/LabVIEW/3D-Picture-Control-Doesn-t-Zoom-in-Orthographic-Mode/td-p/1544460/page/2 wasn't able to find that out.
    In the meantime I've found a way using the ProjectionMatrix to create a zoom-effect which I build into your demo using the mouse wheel.
    All in all I've tried to translate camera movements from the perspective window in the ortho - assuming this is what you were after?!
    Again the missing target information doesn't make it quite right.
    Regs
      Jannis

  • 3D Picture Control Using Solid Works VRML File and Moving Individual Components

    Hi, i am new to these forums and am looking for help concerning 3d picture control, i am a undergraduate student doing a second year project to control a 4DoF UAV.
    I'm trying to sort out the 3d simulation of it, i have made the solid works drawings and assembly then exported that to a single WRL file (in the correct format ie. ver. 97) however when trying to import that to Labview i am having difficulty setting the relationships so different parts rotate etc. in the assembly.
    i'll attach the corresponding example vi from labview and my solid work files.
    Any help is very much appreciated
    Thanks
    Tom
    Attachments:
    CDEx Draw Helicopter 3D Model.vi ‏21 KB
    WRL and solid work files.zip ‏4235 KB

    hi again,
    i've tried your suggestion with the naming however, i am using seperate VRML files for the different components and using the main vrml file to control the prent-child relationship etc. however when trying to access that file through labview it can't open it. this is the code within the vrml file
    #VRML V2.0 utf8
    DEF assembly Transform {
    Children [
    Inline {
    url [" Bottom Base.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Revolve Transform {
    Children [
    Inline {
    url [" Top Base.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Elevation Transform {
    Children [
    Inline {
    url [" Arm Pivot.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Connector Transform {
    Children [
    Inline {
    url [" Rod-Base Connector.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Rod Transform {
    Children [
    Inline {
    url [" Rod.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Roll Transform {
    Children [
    Inline {
    url [" Mount Connector.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Pitch Transform {
    Children [
    Inline {
    url [" Mount Pivot.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Mount Transform {
    Inline {
    url [" Arm Mount.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Chassis Transform {
    Inline {
    url [" Chassis.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Gearhead1 Transform {
    Inline {
    url [" i_gearhead.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Gearhead2 Transform {
    Inline {
    url [" i_gearhead-1.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Gearhead3 Transform {
    Inline {
    url [" i_gearhead-2.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Gearhead4 Transform {
    Inline {
    url [" i_gearhead-3.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shaft1 Transform {
    Inline {
    url [" i_shaft.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shaft2 Transform {
    Inline {
    url [" i_shaft-1.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shaft2 Transform {
    Inline {
    url [" i_shaft-2.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shaft3 Transform {
    Inline {
    url [" i_shaft-3.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Prop1 Transform {
    Inline {
    url [" Propeller.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Prop2 Transform {
    Inline {
    url [" Propeller-1.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Prop3 Transform {
    Inline {
    url [" Propeller-2.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Prop4 Transform {
    Inline {
    url [" Propeller-3.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Shell Transform {
    Inline {
    url [" Shell.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000
    DEF Dome Transform {
    Inline {
    url [" Dome.wrl "]
    bboxSize -1.000000 -1.000000 -1.000000
    bboxCenter 0.000000 0.000000 0.000000

  • How do I get picture control to display PNG images with transparent background?

    I have an image of a robot arm looking from the top with a transparent background and saved as PNG. When I drag the image directly to LabVIEW front panel, the image shows properly with the transparent background, but I want to manipulate it such as rotate the image. I used the Read from PNG.vi to read the image to a picture control, but the background isn't transparent anymore. Am I missing something?
    Please help.

    unclebump gets 5 stars for referring you to a document that I wrote. 
    Incidentally, I wrote it years back, for LabVIEW 7.0.  A couple of notes to summarize:
    The picture control doesn't "really" support transparency.  However, the image data type supports masking, and stores the alpha channel, if present in your image data.  So you use the "Create Mask By Alpha.vi" referenced in that document to mask out pixels whose transparency is above a certain level.  It does not support partial transparency.  You could try to implement your own blending algorithm based on the picture control's current pixel values, and the image data's RGB value and transparency value, but it would probably be very slow.
    Also, that VI ships with 8.0 and later.  I don't know if it's on the palettes but it lives here:  vi.lib\picture\picture.llb\Create Mask By Alpha.vi
    Good luck!

  • Mouse down on 3D picture control

    Hi,
    i would like to know how to indicate mouse down on the 3D picture control as can be done for the picture function.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=49423&query.id=66219#M49423
    regards
    king1

    Hi King1
    I have been able to modify an example VI which came with LabVIEW v8.2 which uses the 3d picture control. I have added an event structure to the code which allows the user to pause the rotation of 2 objects in the picture display area. I have added notes to the block diagram which should help in describing its behaviour. the file is attached with this post.
    I hope this is of some help, there are a few more 3d picture examples in the LabVIEW example directory which might also be of use.
    Best wishes
    Rob L
    Rob L
    NI Applications Engineer
    UK & Ireland
    It only takes a click to rate this message ;-)
    Attachments:
    3D Picture with User Selection.vi ‏61 KB

  • How do i set the size of 3d picture control

    dear sir,
                I have attached my vi.I have one doubt  ie I have used translate object. vi in my vi to move my picture according to the value set by the y position.This y position indicates depth my object.this is sample object  insteat of i am going to update my underwater vehicle.
    What my problem is when i chnage the y value beyond 200 I can not see my picture.so  how do i set the size of the 3d picture control size.
           I have to see my picture within the 3d picture control eventhough i change the y value between 0-500,how do i solve my problem.
    Another my doubt is how do i show the depth value (ie y value in translate object .vi) in 3d picture control ie while the picture is moving in a 3d picture control at the same time i want to display the corresponding depth rating in the 3d picture control
    Pls anyone suggest me as soon as possible.
    Thanks and regards
    jayanthi.k
    Attachments:
    Untitled 1.llb ‏67 KB

    Jayanth,
    Take a look at the attached example.  Alternatively, you can search for it in NI Example Finder by going to Help>>Find Examples in LabVIEW, click on the search tab, and search for meshes.  I had difficulty reading your code, but I believe you need to position your lighting source in the optimal location to get better definition.  And the example shows how to bind a color to the object.
    Trey B
    Applications Engineering
    National Instruments
    Attachments:
    Using Meshes.vi ‏76 KB

  • ACR 4.6 Picture Controls

    I am confused about what is happening.  Any help would be appreciated.
    I understand that Nikon Picture Controls can be used to change the color balance which may give better color.
    I am running CS3 in a 64 bit Vista Ulimate operating system
    What I am trying to understand is how the Camera Profile works in the Camera Calibration tab in ACR.  I am currently shooting a Nikon D200 and a D300.  I understand that Nikon picture controls can be available in the Camera Profile of the Camera Calibration tab
    I went to http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=4040&fileID=3754 and downloaded ACR 4.6.  I then unzipped and installed.
    After installing ACR 4.6 I downloaded and installed GND 5.5 at http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=4576&fileID=4244
    The Title bar in ACR shows Camera Raw 4.6.  The Camera Profiles in the ACR Camera Calibration tab shows ACR 4.4 and 4.3.  After installing GND 5.5 the Nikon Picture Controls (NPC) appear in Camera Profiles.  When I click on one of the NPC it seems to work but the Shadows, Red green and Blue Primaries are not changed.
    When I go to the DNG 5.5 DNG Converter in the compatibility section of the preferences section it says that it should work for 4.6 and later.
    My confusion relates to the fact that my Camera profile in the Camera Profile shows ACR 4.3 and 4.4 – not 4.6 and the DNG converter preferences says 4.6 and later.  Someone that I know who downloaded and installed ACR 4.6 and DNG at the same time has the camera profile showing 4.6. 
    Do I have a problem or am I spinning my wheels?  If I have a problem how do I correct the Problem?

    Forums #1 wrote:
    My confusion relates to the fact that my Camera profile in the Camera Profile shows ACR 4.3 and 4.4 – not 4.6 and the DNG converter preferences says 4.6 and later.  Someone that I know who downloaded and installed ACR 4.6 and DNG at the same time has the camera profile showing 4.6.
    The fact that there are two older profile versions (4.3 & 4.4) simply mean that the FIRST version to support your camera model was 4.3. The fact that 4.4 is there as well means the profile was modified (improved) for ACR 4.4. the reason both are there are for legacy reasons...
    Looking at the Profile drop-down is NOT the way you determine the current version of Camera Raw you have loaded...the ONLY way is using the  "About Plug-ins" menu item or looking at the main ACR title bar in the window (as long as you aren't at full screen).
    If you have the Adobe Standard and the vender looks profiles loaded, you're good to go...as to what those profile will or won't do to and for your image...well, that's for you to decide. I tend to use Adobe Standard.

  • How can create color table for "write bmp file.vi"?

    i want to create a color table for a 8 bit bitmap.The color table is the input of "write bmp file.vi". how can i make it?
    thanks!

    > i want to create a color table for a 8 bit bitmap.The color table is
    > the input of "write bmp file.vi". how can i make it?
    > thanks!
    >
    There is a color control on the front panel numerics palette. A color
    in LV is a four byte xRGB formatted number. So you can make an array of
    the color numerics and set them by hand or format the numbers however
    you like. If unwired it will use the LV color palette which is pretty
    much the HTML palette.
    Greg McKaskle

  • LabVIEW picture control - many updates - memory problem

    Hello,
    I have limited experience with LabVIEW and I'm currently using a picture control in one of my applications.
    The idea is that certain regions (rectangles) inside the picture control get updated all the time with different colors. (depending on a measured parameters)
    I have a main while loop which holds a shift register containing the picture control.
    I noticed that the different "Draw Rectangle" operations I'm performing are accumulated so the memory keeps increasing...
    I've made a small example program that demonstrates this behaviour.
    I want to keep updating the picture control all the time in an easy way. How can I make sure that the memory does not get accumulated? Are there functions with which I can replace a part of the picture control with new pixel values instead of simply adding these new values each time to the picture control?
    Thanks in advance for all your help!
    Solved!
    Go to Solution.
    Attachments:
    Test picture control.vi ‏50 KB

    Adding to the above...
    THe Picture control has a property "Erase first" that can be set to always erase, don't erase and erase once now that can be used when you need to re-build the image.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Can you programmat​ically change a picture control frame/bord​er

    In a platform neutral manner can I programmatically change a picture control frame/border
    Solved!
    Go to Solution.

    You can make it look that way using many differnt methods.
    The simplest is to make the border transparent and put a boolean behind the picture. Size the boolean so it looks like it is the border of the picture. Change the color of the boolean and you are on you way.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to pick up the 3d model after change the picture control to the Opengl control?

    Colleagues,
    I have a problem when I use the cvi.I need to draw a 3D model use the opengl in the picture control,and pick up the mode.For example,I transfer the picture control to the Opengl control,then draw a cube and sphere by Opengl。And I want to pick up them。Such as,when mouse click the cube,it will show a MessagbBox("a cube");when mouse click the sphere,it will show a MessagbBox("a sphere");But it doesn't work.
    I'm a chinese student and juse begin to learm the cvi.And my English isn't very good.I don't know whether the problem has been clear.Anyone can help me?

    I haven't used the OpenGL CVI addition for years, but IIRC there is (was?)
    no callback associated to it. Meaning that some actions are defined within
    the OpenGL control, such as rotation/zoom, but that's it.
    Guillaume Dargaud
    http://www.gdargaud.net/

Maybe you are looking for

  • Can "Common Project" be used for collecting AP Invoices?

    Hello Gurus, I have a question regarding Project Manufacturing and Project Costing. In the PJM Organization Parameters setup, you can define a Common Project to collect cost in PA module as expenditures for non-project related transactions. Does this

  • Old mini won't boot; blinking indicator

    Hi all... I have an old mac mini that belonged to my daughter. It hadn't been used in a while when i received it, but I thought I'd try it anyway. To my surprise, it booted and ran fine for about a week before it just froze up. Soft reboot attempts w

  • Wrong values in distributed column in CJ40

    Hi experts, I am carrying out cost element planning in CJ40 against one child level wbs (level-2)and also the cost is flowing from cProject to another child level wbs(level-2). But after saving the costing data distributed amount at the parenet level

  • House Bank segments E1EDK28 in outbound INVOIC02

    Good day! In our ECC 6.0 system, we have configured 2 house banks: Bank X and Bank Y. When we create an invoice for customer A, an idoc is triggered and stored as an XML file in a folder. We have an output type and partner profile configured for this

  • What problems are there when upgrading from Snow Leopard to Snow Lion?

    I am thinking of getting a new printer, one which uses Apple's air print.  I am using Snow Leopard now.  What problems will I see when I upgrade to Snow Lion? I also use Parallels, v. 6.  Is it worth the hassle to uopgrade just to use air print?