예제 #1
0
파일: VoiDataLut.cs 프로젝트: 1059444127/XA
        private static List <VoiDataLut> Create(DicomElementSq voiLutSequence, int pixelRepresentation)
        {
            bool isFirstMappedPixelSigned = pixelRepresentation != 0;

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

            return(Convert(dataLuts));
        }
예제 #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));
        }
예제 #3
0
파일: VoiDataLut.cs 프로젝트: 1059444127/XA
        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));
        }
예제 #4
0
파일: DataLut.cs 프로젝트: 1059444127/XA
		public DataLut(DataLut item)
			: this(	item.FirstMappedPixelValue, item.BitsPerEntry, (int[])item.Data.Clone(),
					item.Explanation, item.MinOutputValue, item.MaxOutputValue)
		{
		}
예제 #5
0
 protected ModalityDataLut(DataLut dataLut, string modalityLutType)
     : base(dataLut.FirstMappedPixelValue, dataLut.BitsPerEntry, dataLut.Data,
            dataLut.Explanation, dataLut.MinOutputValue, dataLut.MaxOutputValue)
 {
     _modalityLutType = modalityLutType;
 }
예제 #6
0
파일: VoiDataLut.cs 프로젝트: 1059444127/XA
 protected VoiDataLut(DataLut dataLut)
     : base(dataLut.FirstMappedPixelValue, dataLut.BitsPerEntry, dataLut.Data,
            dataLut.Explanation, dataLut.MinOutputValue, dataLut.MaxOutputValue)
 {
 }