WerWolv / ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
https://imhex.werwolv.net
GNU General Public License v2.0
39.55k stars 1.74k forks source link

[Feature] Plot of field values in a multi-record file #1713

Open justacec opened 1 month ago

justacec commented 1 month ago

What feature would you like to see?

I think it would be very nice to be able to define a pattern, and then be able to plot the value of an individual field over a series of repeated patterns in a file. For example, lets say you had a binary file where a position is being stored in a structure and it is written to the file once per second. After 100 seconds you should have 100 records in the binary file. The feature would allow you to put 100 values on a plot to see how the number evolves over time.

How will this feature be useful to you and others?

This feature would allow you to observe how the value changes over time and also note its max and min values. This is very useful in reverse engineering data formats.

Request Type

Additional context?

I understand there is a visualizer with a plot, but that only works for a pile of data in a single record, not a series of points distributed throughout a number of records.

paxcut commented 1 month ago

As long as all the values are stored in the input file no matter how scattered they may be , they can be collected into a single array and passed to the line plotter if you can deduce their locations from the data. For an example of a pattern that does exactly that look at stl.hexpat in the pattern library provided by I,Hex.

If you need to create plots of data derived from values read from the file you can also use sections to assemble the final results which can also be visualized.