Beispiel #1
0
        /// <summary>
        /// Obsolete class, use the classes in the namespace DvtkHighLevelInterface.Common.Compare instead.
        /// </summary>
        private void AddAttributeInformationForBeginOrEndSequenceItem(DicomAttributesToValidate sequenceAttributes, int zeroBasedSequenceAttributesIndex, int sequenceItemIndex, bool isBeginItem)
        {
            DicomAttributeToValidate sequenceAttributeToValidate = sequenceAttributes[zeroBasedSequenceAttributesIndex] as DicomAttributeToValidate;

            if (this.displayAttributeTag)
            {
                int columnIndex = (int)this.columnIndexAttributeTag[zeroBasedSequenceAttributesIndex];

                if (sequenceAttributeToValidate.Display)
                {
                    if (sequenceAttributeToValidate.Attribute.VR == VR.SQ)
                    {
                        if (sequenceItemIndex > sequenceAttributeToValidate.Attribute.ItemCount)
                        {
                            SetCellNotApplicable(columnIndex);
                        }
                        else
                        {
                            int level = (sequenceAttributeToValidate.Attribute as ValidAttribute).TagSequence.Tags.Count - 1;

                            SetCellOK(columnIndex, GetTagCellTextForBeginOrEndItem(level, isBeginItem));
                        }
                    }
                    else
                    {
                        SetCellNotApplicable(columnIndex);
                    }
                }
                else
                {
                    SetCellNotApplicable(columnIndex);
                }
            }

            if (this.displayAttributeName)
            {
                int columnIndex = (int)this.columnIndexAttributeName[zeroBasedSequenceAttributesIndex];

                if (sequenceAttributeToValidate.Display)
                {
                    if (sequenceItemIndex > sequenceAttributeToValidate.Attribute.ItemCount)
                    {
                        SetCellNotApplicable(columnIndex);
                    }
                    else
                    {
                        SetCellOK(columnIndex, GetNameCellTextForBeginOrEndItem( sequenceItemIndex));
                    }
                }
                else
                {
                    SetCellNotApplicable(columnIndex);
                }
            }

            if (this.displayAttributePresent)
            {
                int columnIndex = (int)this.columnIndexAttributePresent[zeroBasedSequenceAttributesIndex];

                if (sequenceAttributeToValidate.Display)
                {
                    String presentText = "";

                    if (sequenceAttributeToValidate.Attribute is ValidAttribute)
                    {
                        if (sequenceAttributeToValidate.Attribute.VR == VR.SQ)
                        {
                            if (sequenceItemIndex > sequenceAttributeToValidate.Attribute.ItemCount)
                            {
                                presentText = "-";
                            }
                            else
                            {
                                presentText = "+";
                            }
                        }
                        else
                        {
                            presentText = "-";
                        }
                    }
                    else
                    {
                        presentText = "-";
                    }

                    if (sequenceAttributes.ContainsCompareSequenceItemsErrors(sequenceItemIndex))
                    {
                        SetCellError(columnIndex, presentText);
                    }
                    else
                    {
                        SetCellOK(columnIndex, presentText);
                    }
                }
                else
                {
                    SetCellNotApplicable(columnIndex);
                }
            }

            if (this.displayAttributeVR)
            {
                int columnIndex = (int)this.columnIndexAttributeVR[zeroBasedSequenceAttributesIndex];

                SetCellNotApplicable(columnIndex);
            }

            if (this.displayAttributeValues)
            {
                int columnIndex = (int)this.columnIndexAttributeValues[zeroBasedSequenceAttributesIndex];

                SetCellNotApplicable(columnIndex);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Obsolete class, use the classes in the namespace DvtkHighLevelInterface.Common.Compare instead.
        /// </summary>
        private void AddAttributeInformationForBeginOrEndSequenceItem(DicomAttributesToValidate sequenceAttributes, int zeroBasedSequenceAttributesIndex, int sequenceItemIndex, bool isBeginItem)
        {
            DicomAttributeToValidate sequenceAttributeToValidate = sequenceAttributes[zeroBasedSequenceAttributesIndex] as DicomAttributeToValidate;

            if (this.displayAttributeTag)
            {
                int columnIndex = (int)this.columnIndexAttributeTag[zeroBasedSequenceAttributesIndex];

                if (sequenceAttributeToValidate.Display)
                {
                    if (sequenceAttributeToValidate.Attribute.VR == VR.SQ)
                    {
                        if (sequenceItemIndex > sequenceAttributeToValidate.Attribute.ItemCount)
                        {
                            SetCellNotApplicable(columnIndex);
                        }
                        else
                        {
                            int level = (sequenceAttributeToValidate.Attribute as ValidAttribute).TagSequence.Tags.Count - 1;

                            SetCellOK(columnIndex, GetTagCellTextForBeginOrEndItem(level, isBeginItem));
                        }
                    }
                    else
                    {
                        SetCellNotApplicable(columnIndex);
                    }
                }
                else
                {
                    SetCellNotApplicable(columnIndex);
                }
            }

            if (this.displayAttributeName)
            {
                int columnIndex = (int)this.columnIndexAttributeName[zeroBasedSequenceAttributesIndex];

                if (sequenceAttributeToValidate.Display)
                {
                    if (sequenceItemIndex > sequenceAttributeToValidate.Attribute.ItemCount)
                    {
                        SetCellNotApplicable(columnIndex);
                    }
                    else
                    {
                        SetCellOK(columnIndex, GetNameCellTextForBeginOrEndItem(sequenceItemIndex));
                    }
                }
                else
                {
                    SetCellNotApplicable(columnIndex);
                }
            }

            if (this.displayAttributePresent)
            {
                int columnIndex = (int)this.columnIndexAttributePresent[zeroBasedSequenceAttributesIndex];

                if (sequenceAttributeToValidate.Display)
                {
                    String presentText = "";

                    if (sequenceAttributeToValidate.Attribute is ValidAttribute)
                    {
                        if (sequenceAttributeToValidate.Attribute.VR == VR.SQ)
                        {
                            if (sequenceItemIndex > sequenceAttributeToValidate.Attribute.ItemCount)
                            {
                                presentText = "-";
                            }
                            else
                            {
                                presentText = "+";
                            }
                        }
                        else
                        {
                            presentText = "-";
                        }
                    }
                    else
                    {
                        presentText = "-";
                    }

                    if (sequenceAttributes.ContainsCompareSequenceItemsErrors(sequenceItemIndex))
                    {
                        SetCellError(columnIndex, presentText);
                    }
                    else
                    {
                        SetCellOK(columnIndex, presentText);
                    }
                }
                else
                {
                    SetCellNotApplicable(columnIndex);
                }
            }

            if (this.displayAttributeVR)
            {
                int columnIndex = (int)this.columnIndexAttributeVR[zeroBasedSequenceAttributesIndex];

                SetCellNotApplicable(columnIndex);
            }

            if (this.displayAttributeValues)
            {
                int columnIndex = (int)this.columnIndexAttributeValues[zeroBasedSequenceAttributesIndex];

                SetCellNotApplicable(columnIndex);
            }
        }