Previous Next        Current Page: NeXtMidas Training / Primitives / Files in a Primitive / Writing Frame-Based Data
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
   + Overview   
   + Open, Process, Close   
   + Building   
   + The NeXtMidas API   
   + Lab 1   
   + Special Variables   
   + Lab 2   
   + Lab 3*   
   - Files in a Primitive   
      - File Categories   
      - Getting Files   
      - Reading Frame-Based Data   
      - Writing Frame-Based Data   
      - Reading Record-Based Data   
      - Writing Record-Based Data   
      - A Note About Files   
   + Lab 4   
   + Lab 5*   
   + Test Macros   
   + Lab 6   
   + Real Time Controls   
   + Lab 7   
   + Working with Messages   
   + Lab 8   
   + Primitive Restarts   
   + Introduction to DSP   
   + Lab 9   
Applets & WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Writing frame based data.
    • All data is written from a Data buffer.
    • The Data buffer is created in open().
      • The single Data buffer is often used to read, process and then write the data.
    • Inside process() the data is written to the file.
      • outFile.write(dataBuffer, <numElements>)
      • <numElements> is often the same as numRead
      • The write(..) method returns the number of elements written. However, few primitive writers check the return value when using DataFile since it is almost always the same as <numElements>.