@Override public int getWidth(int frameIndex) throws IOException { checkIndex(frameIndex); return TagD.getTagValue(this, Tag.Columns, Integer.class); }
@Override public DicomSpecialElement buildDicomSpecialElement(DicomMediaIO mediaIO) { if (RejectedKOSpecialElement.isRejectionKOS(mediaIO)) { return new RejectedKOSpecialElement(mediaIO); } return new KOSpecialElement(mediaIO); } });
@Override public MediaReader getMediaIO(URI media, String mimeType, Hashtable<String, Object> properties) { if (isMimeTypeSupported(mimeType)) { return new DicomMediaIO(media); } return null; }
public void readDisplayArea(DicomImageElement img) { if (dcmobj != null) { TagW[] tagList = TagD.getTagFromIDs(Tag.PresentationPixelSpacing, Tag.PresentationPixelAspectRatio, Tag.PixelOriginInterpretation, Tag.PresentationSizeMode, Tag.DisplayedAreaTopLeftHandCorner, Tag.DisplayedAreaBottomRightHandCorner, Tag.PresentationPixelMagnificationRatio); TagSeq.MacroSeqData data = new TagSeq.MacroSeqData(dcmobj, tagList, isSequenceApplicable(img)); TagD.get(Tag.DisplayedAreaSelectionSequence).readValue(data, this); } }
public SRReader(Series series, DicomSpecialElement dicomSR) { if (dicomSR == null) { throw new IllegalArgumentException("Dicom parameter cannot be null"); //$NON-NLS-1$ } this.dicomSR = dicomSR; this.dcmItems = dicomSR.getMediaReader().getDicomObject(); }
@Override public boolean passes(DicomImageElement dicom) { String seriesInstanceUID = TagD.getTagValue(dicom, Tag.SeriesInstanceUID, String.class); if (dicom == null || seriesInstanceUID == null) { return false; } String sopInstanceUID = TagD.getTagValue(dicom, Tag.SOPInstanceUID, String.class); Integer frame = TagD.getTagValue(dicom, Tag.InstanceNumber, Integer.class); return isSopuidInReferencedSeriesSequence(getReferencedSOPInstanceUIDObject(seriesInstanceUID), sopInstanceUID, frame); } };
@Override public String getToolTips() { StringBuilder toolTips = new StringBuilder("<html>"); //$NON-NLS-1$ addToolTipsElement(toolTips, Messages.getString("DicomSeries.pat"), TagD.get(Tag.PatientName)); //$NON-NLS-1$ addToolTipsElement(toolTips, Messages.getString("DicomSeries.mod"), TagD.get(Tag.Modality)); //$NON-NLS-1$ addToolTipsElement(toolTips, Messages.getString("DicomSeries.series_nb"), TagD.get(Tag.SeriesNumber)); //$NON-NLS-1$ addToolTipsElement(toolTips, Messages.getString("DicomSeries.study"), TagD.get(Tag.StudyDescription)); //$NON-NLS-1$ addToolTipsElement(toolTips, Messages.getString("DicomSeries.series"), TagD.get(Tag.SeriesDescription)); //$NON-NLS-1$ addToolTipsElement(toolTips, Messages.getString("DicomSeries.date"), TagD.get(Tag.SeriesDate)); //$NON-NLS-1$ toolTips.append("</html>"); //$NON-NLS-1$ return toolTips.toString(); }
@Override public String getSeriesNumber() { Integer splitNb = (Integer) getTagValue(TagW.SplitSeriesNumber); Integer val = TagD.getTagValue(this, Tag.SeriesNumber, Integer.class); String result = val == null ? "" : val.toString(); //$NON-NLS-1$ return splitNb == null ? result : result + "-" + splitNb.toString(); //$NON-NLS-1$ }
/** * The value of Photometric Interpretation specifies the intended interpretation of the image pixel data. * * @return following values (MONOCHROME1 , MONOCHROME2 , PALETTE COLOR ....) Other values are permitted but the * meaning is not defined by this Standard. */ public String getPhotometricInterpretation() { return TagD.getTagValue(this, Tag.PhotometricInterpretation, String.class); }
public PresentationStateReader(PRSpecialElement dicom) { Objects.requireNonNull(dicom, "Dicom parameter cannot be null"); //$NON-NLS-1$ this.prSpecialElement = dicom; DicomMediaIO dicomImageLoader = dicom.getMediaReader(); this.dcmobj = dicomImageLoader.getDicomObject(); }
public static synchronized void startPreloading(DicomSeries series, List<DicomImageElement> imageList, int currentIndex) { if (series != null && imageList != null) { if (preloadingTask != null) { if (preloadingTask.getSeries() == series) { return; } stopPreloading(preloadingTask.getSeries()); } preloadingTask = new PreloadingTask(series, imageList, currentIndex); preloadingTask.start(); } }
public boolean setKeyObjectReference(boolean selectedState, DicomImageElement dicomImage) { return setKeyObjectReference(selectedState, new Reference(dicomImage)); }
private TagD(int tagID, String displayedName, String privateCreatorID, VR vr, int vmMin, int vmMax, Object defaultValue) { super(tagID, getKeywordFromTag(tagID, privateCreatorID), displayedName, getTypeFromTag(tagID, vr), vmMin, vmMax, defaultValue); this.vr = vr; this.privateCreatorID = privateCreatorID; this.retired = false; }
public static synchronized void stopPreloading(DicomSeries series) { if (preloadingTask != null && preloadingTask.getSeries() == series) { PreloadingTask moribund = preloadingTask; preloadingTask = null; if (moribund != null) { moribund.setPreloading(false); moribund.interrupt(); } } }
public boolean removeKeyObject(DicomImageElement dicomImage) { return removeKeyObject(new Reference(dicomImage)); }
@Override public String toString() { return Messages.getString("SortSeriesStack.pos_orient"); //$NON-NLS-1$ } };
/** * Return a DicomStreamMetaData object that includes the DICOM header. <b>WARNING:</b> If this class is used to read * directly from a cache or other location that contains uncorrected data, the DICOM header will have the * uncorrected data as well. That is, assume the DB has some fixes to patient demographics. These will not usually * be applied to the DICOM files directly, so you can get the wrong information from the header. This is not an * issue if you know the DICOM is up to date, or if you use the DB information as authoritative. */ @Override public IIOMetadata getStreamMetadata() throws IOException { return readMetaData(); }
@Override public DicomSpecialElement buildDicomSpecialElement(DicomMediaIO mediaIO) { return new DicomSpecialElement(mediaIO); } }
@Override public int getHeight(int frameIndex) throws IOException { checkIndex(frameIndex); return TagD.getTagValue(this, Tag.Rows, Integer.class); }