private static List <VoiDataLut> Create(DicomElementSq voiLutSequence, int pixelRepresentation) { bool isFirstMappedPixelSigned = pixelRepresentation != 0; List <DataLut> dataLuts = DataLut.Create(voiLutSequence, isFirstMappedPixelSigned, false); return(Convert(dataLuts)); }
internal static ModalityDataLut Create(DicomElementSq modalityLutSequence, int pixelRepresentation) { List <DataLut> data = DataLut.Create(modalityLutSequence, pixelRepresentation != 0, false); if (data.Count == 0) { return(null); } string modalityLutType = ((DicomSequenceItem[])modalityLutSequence.Values)[0][DicomTags.ModalityLutType].ToString(); return(new ModalityDataLut(data[0], modalityLutType)); }
private static List <VoiDataLut> Create(DicomElementSq voiLutSequence, int bitsStored, int pixelRepresentation, double rescaleSlope, double rescaleIntercept) { int minPixelValue; int maxPixelValue; bool isSigned = pixelRepresentation != 0; GetMinMaxPixelValue(bitsStored, isSigned, out minPixelValue, out maxPixelValue); double minModalityLutValue = minPixelValue * rescaleSlope + rescaleIntercept; double maxModalityLutValue = maxPixelValue * rescaleSlope + rescaleIntercept; bool isFirstMappedPixelValueSigned = minModalityLutValue < 0 || maxModalityLutValue < 0; List <DataLut> dataLuts = DataLut.Create(voiLutSequence, isFirstMappedPixelValueSigned, false); return(Convert(dataLuts)); }
public DataLut(DataLut item) : this( item.FirstMappedPixelValue, item.BitsPerEntry, (int[])item.Data.Clone(), item.Explanation, item.MinOutputValue, item.MaxOutputValue) { }
protected ModalityDataLut(DataLut dataLut, string modalityLutType) : base(dataLut.FirstMappedPixelValue, dataLut.BitsPerEntry, dataLut.Data, dataLut.Explanation, dataLut.MinOutputValue, dataLut.MaxOutputValue) { _modalityLutType = modalityLutType; }
protected VoiDataLut(DataLut dataLut) : base(dataLut.FirstMappedPixelValue, dataLut.BitsPerEntry, dataLut.Data, dataLut.Explanation, dataLut.MinOutputValue, dataLut.MaxOutputValue) { }