[Paraview] I can't read a binary 'raw' data image file
Moreland, Kenneth
kmorel at sandia.gov
Tue Nov 6 09:54:19 EST 2012
This is a bit off the question you asked, but you might consider making a
NRRD header file, which is a simple text file that provides the
information you normally have to enter by hand in the raw file reader
(http://teem.sourceforge.net/nrrd/). I like using NRRD headers so that I
don't have to continually enter this information (that I tend to forget)
every time I load the file, and that don't have that gotcha with the
dimensions/extent indexing that Cory describes.
As an example, a NRRD header file for your file could be called
snail_partial_348x250x348_float32.nhdr and contain the following:
NRRD0004
dimension: 3
sizes: 348 250 348
spacings: 1 1 1
endian: little
type: float (or `unsigned char' for the other version)
encoding: raw
data file: snail_partial_348x250x348_float32.raw
-Ken
On 11/6/12 7:00 AM, "Cory Quammen" <cquammen at cs.unc.edu> wrote:
>Hi Robert,
>
>On Tue, Nov 6, 2012 at 8:37 AM, <Robert.Atwood at diamond.ac.uk> wrote:
>> Dear List
>>
>> I hope it's some silly 'newbie' issue, but I find myself completely
>>unable to read a raw binary data file using the raw binary data file
>>reader. I have saved a data file as 'raw data' from ImageJ to try, and
>>loaded that same file in ImageJ to verify that data is present. I have
>>saved two versions: 8 bit [0-255] binary data and floating point 32-bit
>>data in little-endian format.
>>
>> Then in Paraview I try to open the file, then select
>> File prefix : this contains the correct file name it appears to me
>> C:\Documents and Settings\kny48981\My
>>Documents\Experiments\snail\snail_partial_348x250x348_float32.raw
>> Data Scalar Type: Float (or Unsigned char for the other version)
>> Data Byte Order: LittleEndian
>> File Dimensionality: 3
>> Data Origin 0 0 0
>> Data Spacing 1 1 1
>> Data Extent 0 348
>> 0 250
>> 0 348
>> Number of Scalar Components: 1
>> Scalar Array Name: ImageFile
>> File Lower Left (ticked)
>
>It looks like the image you are reading has the size 348x250x348. A
>definite gotcha in the RAW file reader is that the maximum extent in
>x, for example, has to be one less than the size of the image in x.
>The same is true for the y and z dimensions.
>
>Hope that helps,
>Cory
>
>--
>Cory Quammen
>Research Associate
>Department of Computer Science
>The University of North Carolina at Chapel Hill
>_______________________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Please keep messages on-topic and check the ParaView Wiki at:
>http://paraview.org/Wiki/ParaView
>
>Follow this link to subscribe/unsubscribe:
>http://www.paraview.org/mailman/listinfo/paraview
>
More information about the ParaView
mailing list