fn render_data(fits: &Fits) {
    println!("[Rendering FITS data]");

    let mut rendered_data: Vec<f32> = vec![0.0; fits.data.data.len() / 4];
    // @todo: check BITPIX - if it's 32 bit...
    use byteorder::{BigEndian, ByteOrder};
    BigEndian::read_f32_into(&fits.data.data, &mut rendered_data);

    // normalise and stretch the data for rendering / visualisation
    let mut normalised_data = Vec::new();
    normalise_asinh(255.0, &rendered_data, &mut normalised_data);

    // write the data as a PNG
    write_png(&fits, &normalised_data, "data/output.png");
}
// interpret data based on header values,
interpret data based on header values.
interpret data based on header values .
fn render_data(fits: &Fits) {
    println!("[Rendering FITS data]");
    let mut rendered_data: Vec<f32> = vec![0.0; fits.data.data.len() / 4];
    // @todo: check BITPIX - if it's 32 bit...
    use byteorder::{BigEndian, ByteOrder};
    BigEndian::read_f32_into(&fits.data.data, &mut rendered_data);
    // normalise and stretch the data for rendering / visualisation
    let mut normalised_data = Vec::new();
    normalise_asinh(255.0, &rendered_data, &mut normalised_data);
    // write the data as a PNG
    write_png(&fits, &normalised_data, "data/output.png");
}
fn render_data ( fits : & Fits ) { println ! ( " " ) ; let mut rendered_data : Vec < f32 > = vec ! [ 0.0 fits data data len ( ) 4 ] ; // @todo: check BITPIX - if it's 32 bit... use byteorder :: { BigEndian , ByteOrder } ; BigEndian :: read_f32_into ( & fits . data . data , & mut rendered_data ) ; // normalise and stretch the data for rendering / visualisation let mut normalised_data = Vec :: new ( ) ; normalise_asinh ( 255.0 , & rendered_data , & mut normalised_data ) ; // write the data as a PNG write_png ( & fits , & normalised_data , " " ) ; }
interpret data based on header values,
interpret data based on header values
fits
&Fits
fits
&Fits