Thursday, March 20, 2014

2.0.6.3 in advanced beta testing

MScan and MView 2.0.6.3 32- and 64- bit are in advanced beta testing and should be released soon.

New Features in 2.0.6.3.

Heat display. Functional imaging of  fast calcium transients in live tissue is a very important application of two-photon microscopy.  Monitoring fluorescence changes in real-time provides essential feedback on how the experiment is running. MScan allows plotting the intensity of multiple regions of interest across time even in resonant scanning mode. In release 2.0.6.3, MScan introduces a new way to visualize active areas by displaying a live heat map with “hotter” colors  representing pixel intensities greater than those of a "baseline" frame. The map is superimposed over the current frame. Regions whose activity is below a pre-set threshold will be seen through the heat map. The heat map will facilitate spotting patterns of spatial activity. MView 2.0.6.3 also allows overlaying a heat map above frames, which can lead to the creation of visually appealing movies.

Data file recovery. Programs like MScan or the computer running them can crash unexpectedly, resulting in damaged data files. MView 2.0.6.3 can detect when a file generated by MScan 2.0.6.3 is corrupted and offers the possibility to repair it via a window allowing users to correct or enter missing metadata information.

Minor improvements in MScan 2.0.6.3.

  • Increased limit on number of frames that can be averaged during live display or stacks. Up to 200 frames can be averaged on a rolling basis and displayed when taking movies.
  • Resonant mode: frame rates of 496 fps (512 x 32 lines) and 565 fps (512 x 28 lines) have been qualified.

22 comments:

  1. Hi,

    In MScan resonant scanning mode, is there convenient way to zoom in on a desired 512xY rectangle?
    (Y= 512, 256, etc ....). Right now, this has to be set in xy scan before starting a scan. It would be very useful to have a live zoom option. Thanks

    ReplyDelete
  2. Hi,

    To speed up selection of a subframe (512 x Y), stop the scan then you can use the mouse to "draw" the new scanning region on the Viewer window, on top of the previous live image . Regardless of the width of the region you select, the new image will be 512 pixels in width. You can then click on OK in the dialog box (which allows you to cancel if you are not happy with the new region) and you can restart the scan. There are some limitations , for instance the number of lines needs to be a multiple of 4 so the program will crop your new region if it does not meet this requirement.

    One needs to stop acquisition before choosing a new frame size because frame acquisition, which is event-driven, is triggered when a certain number of lines have been acquired. This number depends on the frame height (your Y) so each time you change this value, the acquisition event trigger needs to be reprogrammed.

    Hope this helps.

    ReplyDelete
  3. Hi,

    I have not tested this yet because our MOM system was down and has recently been fixed.

    I have another question re export to matlab.

    I cannot start matlab from mview.

    Do you have any instructions on how to get it to run?

    It gives 2 options 1. local 2. global with remote location.

    Both did not work for me.


    I'm not sure what I'm doing wrong.

    Thanks MCS P

    ReplyDelete
    Replies
    1. Hi,

      A likely cause for your problem is improper registration of Matlab during installation, especially if the Matlab folders were copied straight from another machine. In this case the registry entries necessary for MView to find Matlab would not present. MView starts Matlab simply by using one standard function call that requires the Matlab ProgID and other keys to be set in the Windows registry, so if you fail to see Matlab popping up, it's quite possible that these values don't exist.

      You may want to reinstall Matlab on the computer where MView is running and try exporting frames using the Local option.

      It is advisable to have the same "bitness" for all applications, i.e. if you run on Windows 64-bit, MView and Matlab should be all 64-bit, if possible.


      Hope this helps

      Delete
    2. Ok. I've passed all the stages and have successfully called an MDF file from within matlab (OpenMCSFile ). It reads the MCSX file as you put in the help menu; that is, it passed the OpenResult (=0) and gives the correct frame number. But, I am not sure on how to handle the file while it's in matlab.

      Is there a good tutorial? Also, do you recommend any of the toolboxes (image processing?)?

      Thanks for your kind help!

      Delete
    3. Terrific.

      Use the ReadFrame function of MCSX in your Matlab code to get the frame data into a Matlab matrix. ReadFrame requires two arguments, the first one is the channel number (i.e., 1 for the first channel) and the frame number. ReadParameter will get you additional information stored in the file. Refer to the MCSX documentation in the MView Help File for additional details.

      The two functions are all you need to get everything you want into Matlab. The frame data in Matlab is, if I remember correctly, stored as a two-dimensional array of 16-bit integer values. Once in Matlab, it's really up to you to decide what to do with the data.

      The Image Processing Toolbox has plenty of advanced functions which could be very useful to you (e.g. if you deal with Regions of Interest, if you need to filter your data etc..).

      Most folks I know write their own custom data processing code in Matlab tailored to their own experiments, so there is no real "canonical" way of dealing with 2-P images once in Matlab. It very much depends on what you want to do, so I would encourage you to ask in the Matlab discussion groups on the Web or at Mathworks if someone can help or has already written code that you can beg, borrow or steal.

      Hope this helps.

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Thanks, MCS programmer!
    I wanted to ask you about the frame export and ROI export to matlab options. What filtetype (file extension) are there exported as into matlab? Thanks for your kind help!

    ReplyDelete
  6. Hi,

    There's an access violation message coming up in MView when I try to save a workspace as an MDF file after 1 or 2 files have been saved. Normally, rebooting MView solves the problem. Could you try to fix this bug?

    ReplyDelete
    Replies
    1. Hi,

      Thanks for telling us about the bug. Can you inform us on how we can reproduce the problem? More specifically, what are the steps leading to the problem and what is your hardware/software configuration (MView version, OS type, bitness etc...).


      I tried with the newest version of MView (2.1. currently being tested, Windows 8.1 64-bit). I opened a 180-frame file with two channels, copied 10 frames to a workspace, saved as MDF file on the desktop, repeated 4 times, no issue. Opened 4 additional workspaces, copied 10 frames to each workspace, saved each workspace to file on the desktop, no issue.

      Thanks in advance

      Delete
  7. Hi,

    My hardware is an HP (Pavillion Elite HPE) desktop PC.
    Software: Win 7 SP1

    MView version: 2.0.6.3 (latest available for download)

    Problem description: Open MDF
    choose average frames (typically average 3 frames = from 450 frame to 150)
    Save workspace as
    ------------------------------

    It works once or twice but after that the error message appears.

    Hope this is more clear

    Best wishes

    ReplyDelete
    Replies
    1. Hi,

      Tried 4 workspaces, averaging 180 frames into 60 frames, saved as file, no issue (MView 2.1 beta, Windows 8.1 64-bit).

      Could you tell:
      - if you are running Windows 32- or 64-bit
      - what bitness of MView you are using (click on Help/About MView menu item to see if you are running MView 32- or 64- bit)
      - are you closing your ex- workspace window after converting the workspace into a file?
      - what error message are you seeing?

      Thanks for the info

      Delete
    2. Hi MCSP,

      Here are the answers:


      - if you are running Windows 32- or 64-bit?

      A: 64 bit.
      - what bitness of MView you are using (click on Help/About MView menu item to see if you are running MView 32- or 64- bit)

      A: MView 2.0.4.1 64 bit.
      - are you closing your ex- workspace window after converting the workspace into a file?
      A: I'm not sure what you mean; After saving as MyChosenName.MDF, there's no ex-workspace left.
      - what error message are you seeing?
      A: Access Violation at Address 00000000008FF921 in module 'MView.EXE'.
      Read of address 0000000000000028

      Thanks

      Delete
  8. Hi MCSP,

    I just wanted to double check that you received my previous message re export of Frames and ROIs into matlab.

    Do you know what filetype are they exported as (both Frames and ROIs)?

    Thanks in advance!

    ReplyDelete
    Replies
    1. and another issue:

      when I try to export ROI to matlab I get a Type Mismatch error.

      Any idea on how to resolve this?

      Thanks

      Delete
  9. Dear MCSP,

    I have another question re ROI.
    Right now, if ROIs are detected or plotted, there's a way to plot them individually and copy to clipboard of save as text. So, if one wants to get multiple ROIs, this requires to plot every ROI individually and copy or save the data as text.

    Is there a way to export all the ROI values in a given screen?
    I am not talking about the mask (export ROI mask option) but the actual values in each ROI.
    This can potentially save a lot of time in analysis.

    Thanks

    ReplyDelete
    Replies
    1. Hi,

      To answer your question, yes, there is a handy way to get the values of the ROIs without sweating.

      (1) Choose an application where you want the ROIs values to go. The following example will use Calc, the Excel-like clone which is part of the free Open Office suite (4.x is the latest version).
      (2) Draw any number of ROIs on screen, choose not to plot them. We routinely chose > 40 ROIs at a time (20 cells x 2 channels)
      (3) Write a script to get the ROI values for each frame into the Calc spreadsheet. See source snippet below. The key is to use the ROIValue(i, j) function which returns the value of of the i-th ROI at frame j, the FrameCount property of the currently opened file to iterate through all the frames of the file etc...
      (4) Run the script and relax! The script ends by showing the message "Done".
      (5) You get a spreadsheet with all your ROI values.

      For additional help, please contact Tech support at Sutter - this blog is probably not the best way to have back-and-forth private communications.

      I'll check your bug reports of Jul 18-20th in a few days (I need to get hold of a copy of Matlab).

      Hope this helps.



      Modify the following code into the Initialization section of the Integrated Development Environment of the Scripting window. The example uses a file with 2 channels (CFP and YFP) to extract ROI values.

      ' Enter global code here
      ' This script calculates the background corrected FRET CFP/YFP values of ROIs
      ' Open the data file to analyze, place the first CFP and YFP region in background
      ' then select the cell ROIs (first in the CFP channel then in the YFP channel)
      ' When done, run the script.

      ' Starts OpenOffice spreadsheet

      On Error Resume Next
      Dim args()
      Set oServiceManager = CreateObject("com.sun.star.ServiceManager")
      Set oDesktop = oServiceManager.CreateInstance("com.sun.star.frame.Desktop")
      Set oDocument = oDesktop.loadComponentFromURL("private:factory/scalc", "_blank", 0, args)
      Set osheet1 = oDocument.getSheets().getByIndex(0)

      For i = 1 to MCSFiles(1).FrameCount
      ' Write frame index in spreadsheet
      osheet1.getCellByPosition(0, i).SetValue(i)

      If i = 1 Then
      osheet1.getCellByPosition(1, 0).SetString("Background CFP")
      osheet1.getCellByPosition(2, 0).SetString("Background YFP")
      For j = 1 to (MCSFiles(1).ROICount - 2)/2
      osheet1.getCellByPosition(2*j + 1, 0).SetString("Cell " & CStr(j))
      Next
      End If

      ' Background value common to all cells
      BackgroundCFP = MCSFiles(1).ROIValue(1, i)
      osheet1.getCellByPosition(1, i).SetValue(BackgroundCFP)
      BackgroundYFP = MCSFiles(1).ROIValue(2, i)
      osheet1.getCellByPosition(2, i).SetValue(BackgroundYFP)

      For j = 1 to (MCSFiles(1).ROICount - 2)/2
      YFP = MCSFiles(1).ROIValue(2 * j + 2, i)
      CFP = MCSFiles(1).ROIValue(2 * j + 1, i)
      ' Write FRET value to spreadsheet
      osheet1.getCellByPosition(2 * j + 1, i).SetValue(CFP)
      osheet1.getCellByPosition(2 * j + 2, i).SetValue(YFP)
      Next
      Next
      MsgBox "Done"
      Quit


      Delete
  10. Cool!

    I checked the script and it runs smoothly.

    I'll run it on some data and let you know.

    Thanks so much for your kind help!

    ReplyDelete
  11. In MScan (version 2.1.0.4), is there a way to rotate the filed of view for scanning ?

    Thanks,
    Farzaneh Najafi

    ReplyDelete
  12. Hi MCSP,
    I would like to adjust the position of the objective in real-time based on the images just captured while Mscan is running.
    Are the image data being recorded (in matrix) available to Mscan VBscript?
    Alternatively, I am wondering if the image data(in matrix) can be imported to matlab directly while the Mscan is still writing data to the .MDF file.
    Thanks in advance!

    ReplyDelete
    Replies
    1. Dear Kun,

      You're in luck. See my latest post (Jan 12th 2016).

      Best wishes for 2016.

      Delete
    2. Dear MCSP,

      Thank you for your reply! I just received an e_mail about the latest version of MSCAN. The new function is exactly what I need.

      Best

      Delete