Exemple #1
0
        private static List <VoiDataLut> Create(DicomElementSq voiLutSequence, int pixelRepresentation)
        {
            bool isFirstMappedPixelSigned = pixelRepresentation != 0;

            List <DataLut> dataLuts = DataLut.Create(voiLutSequence, isFirstMappedPixelSigned, false);

            return(Convert(dataLuts));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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));
        }
Exemple #4
0
		public DataLut(DataLut item)
			: this(	item.FirstMappedPixelValue, item.BitsPerEntry, (int[])item.Data.Clone(),
					item.Explanation, item.MinOutputValue, item.MaxOutputValue)
		{
		}
Exemple #5
0
 protected ModalityDataLut(DataLut dataLut, string modalityLutType)
     : base(dataLut.FirstMappedPixelValue, dataLut.BitsPerEntry, dataLut.Data,
            dataLut.Explanation, dataLut.MinOutputValue, dataLut.MaxOutputValue)
 {
     _modalityLutType = modalityLutType;
 }
Exemple #6
0
 protected VoiDataLut(DataLut dataLut)
     : base(dataLut.FirstMappedPixelValue, dataLut.BitsPerEntry, dataLut.Data,
            dataLut.Explanation, dataLut.MinOutputValue, dataLut.MaxOutputValue)
 {
 }