取消
显示结果 
搜索替代 
您的意思是: 

Ask how to open some files

I would like to ask all the experts, I want to use LabVIEW to open these types of files ".atr .dat .hea .xws", It's ECG waveform record files and then connect them to the Waveform graph for viewing.

0 项奖励
1 条消息(共 28 条)
2,035 次查看

A file is just a long string of bytes and in order to recover the information, you need to know the data structures. Do you have a document to describe all that?

Are they formatted text or binary? (e.g. if you open them in notepad, is it all text or not).

0 项奖励
2 条消息(共 28 条)
2,009 次查看

Thank you for your reply. These four pictures are the results after I opened them with Notepad. Please help me take a look.
How do I open it using LabVIEW?
Thank you.

Snipaste_2024-08-18_02-11-56.jpg

Snipaste_2024-08-18_02-12-42.jpg

Snipaste_2024-08-18_02-13-03.jpg

Snipaste_2024-08-18_02-13-23.jpg

0 项奖励
3 条消息(共 28 条)
1,991 次查看

the first two look binary, but the last two can just be read as plain text into a string indicator.

"Opening" any of them is trivial. Interpreting the contents of the first two requires knowledge about the file structure. What kind of data do you expect?

 

(Attaching pictures instead of the actual files is not very useful.)

0 项奖励
4 条消息(共 28 条)
1,987 次查看

Thank you for your reply. This file is the patient's ECG waveform file. I want to display the waveform.
Thank you.

0 项奖励
5 条消息(共 28 条)
1,954 次查看

You just need to do your research or even contact the company that makes the instrument.

 

Binary data requires extensive knowledge about the data structures (header size, datatype, byte order, and how the waveform is represented (direct, incremental, etc.).

 

Looks like you have sample files from here. It seems there is a MATLAB library that can read these files, maybe you can reverse engineer that code. Good luck!

0 项奖励
6 条消息(共 28 条)
1,948 次查看

A "file" is just a string of bytes that encode data according to some format.  You can open any file as a "binary file" and read that collection of bytes.  The trick comes in understanding how the data being stored in the file (as a series of bytes) has been "encoded".  In the days of the Teletype, "messages" were encoded in an 8-bit format called ASCII, where "A" was 0x81 and "0" (zero) was 0x60.  Now, most data are saved as numbers, possibly 4-byte integers, possibly 8-byte floating point, possibly with extra bytes saying "This is a 2-D array with this many rows and columns".  Without knowing the format of the data, interpreting the string of bytes is very challenging.  Note that looking at a binary file with a "Hex" editor that can represent the string of bytes in various formats makes it easy to find data saved as text (if written in a language that uses a Western alphabet -- you will be able to read it as something other than gibberish.

 

Why don't you attach a file you want to read, and also as much information as you have about what you think is the format of the file.  We can take a peek at it ...

 

Bob Schor

0 项奖励
7 条消息(共 28 条)
1,936 次查看

A quick inspection of the 100.dat file gives reasonable results if interpreted as 24bit little endian signed integer. No guarantees....

(we reverse 3 adjacent bytes for little endian, pad on the right to 4 bytes, cast to I32, and do an arithmetic shift to undo the padding).

 

YMMV!

 

altenbach_0-1724002760292.png

 

8 条消息(共 28 条)
1,930 次查看

@Bob Schor, Thanks for your reply, I will add more knowledge in this area. The file I'm using cannot be uploaded here. Thank you.

0 项奖励
9 条消息(共 28 条)
1,883 次查看

@altenbach, Thank you for your reply. You are awesome. I am just researching how to open this related file. Thank you very much.

0 项奖励
10 条消息(共 28 条)
1,880 次查看