Class PreviewGenerator
- Namespace
- FitsModel.FitsStream.Imager
- Assembly
- FitsModel.dll
Reads a stream and generates preview images for any image HDUs in encountered.
public class PreviewGenerator : DataBlockWriterBase, IFitsDataBlockWriter, IFitsHduReader
- Inheritance
-
PreviewGenerator
- Implements
- Inherited Members
Constructors
PreviewGenerator()
Creates a new FitsFile that includes an additional HDU for each image HDU. The data contains normalized pixel byte values based on basic statistical values.
public PreviewGenerator()
PreviewGenerator(double, double)
public PreviewGenerator(double normMin, double normMax)
Parameters
Properties
NormMax
If set, these values will be used for normalization instead of the default of mean +/- stddev.
public double NormMax { get; }
Property Value
NormMin
If set, these values will be used for normalization instead of the default of mean +/- stddev.
public double NormMin { get; }
Property Value
Methods
GetFitsFile()
Returns the FITS file that has been read from the stream. Throws an exception if no file has been read.
public FitsFile GetFitsFile()
Returns
Exceptions
GetPreviewFitsFile()
Gets a new FitsFile containing only the preview HDUs.
public FitsFile GetPreviewFitsFile()
Returns
ReadHdu(FitsHdu)
Called when an HDU is read from the FITS stream.
public void ReadHdu(FitsHdu hdu)
Parameters
hduFitsHdu
SaveFits(FileInfo)
Saves the currently read FITS file to the specified file path. Throws an exception if no file has been read.
public Task SaveFits(FileInfo fileInfo)
Parameters
fileInfoFileInfo
Returns
SaveImage(FileInfo, bool)
Saves the preview image to the provided file path.
public void SaveImage(FileInfo file, bool forceCrossPlat = false)
Parameters
WriteDataBlock(FitsDataBlock)
Called to write a data block from the FITS stream.
public override void WriteDataBlock(FitsDataBlock dataBlock)
Parameters
dataBlockFitsDataBlock