From: <bab...@us...> - 2010-07-17 13:26:42
|
Revision: 13754 http://dcm4che.svn.sourceforge.net/dcm4che/?rev=13754&view=rev Author: babuhussain Date: 2010-07-17 13:26:32 +0000 (Sat, 17 Jul 2010) Log Message: ----------- MAYAM-27 :Scout line support for MR-done. Modified Paths: -------------- oviyam/mayam/trunk/src/in/raster/mayam/delegate/ImageOrientation.java oviyam/mayam/trunk/src/in/raster/mayam/delegate/SeriesListUpdator.java oviyam/mayam/trunk/src/in/raster/mayam/delegate/SeriesThumbUpdator.java oviyam/mayam/trunk/src/in/raster/mayam/form/ImagePanel.java oviyam/mayam/trunk/src/in/raster/mayam/form/MainScreen.form oviyam/mayam/trunk/src/in/raster/mayam/form/MainScreen.java oviyam/mayam/trunk/src/in/raster/mayam/form/QueryRetrive.form oviyam/mayam/trunk/src/in/raster/mayam/form/QueryRetrive.java oviyam/mayam/trunk/src/in/raster/mayam/form/SendReceivePanel.form oviyam/mayam/trunk/src/in/raster/mayam/form/SendReceivePanel.java oviyam/mayam/trunk/src/in/raster/mayam/form/SeriesPanel.java oviyam/mayam/trunk/src/in/raster/mayam/model/table/renderer/CellRenderer.java oviyam/mayam/trunk/src/in/raster/mayam/util/DicomTagsReader.java Removed Paths: ------------- oviyam/mayam/trunk/src/NimRODThemeFile.theme Deleted: oviyam/mayam/trunk/src/NimRODThemeFile.theme =================================================================== --- oviyam/mayam/trunk/src/NimRODThemeFile.theme 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/NimRODThemeFile.theme 2010-07-17 13:26:32 UTC (rev 13754) @@ -1,10 +0,0 @@ -nimrodlf.p1=#005252 -nimrodlf.p2=#005C5C -nimrodlf.p3=#006666 -nimrodlf.s1=#858585 -nimrodlf.s2=#8F8F8F -nimrodlf.s3=#999999 -nimrodlf.w=#FFFFFF -nimrodlf.b=#000000 -nimrodlf.menuOpacity=195 -nimrodlf.frameOpacity=180 Modified: oviyam/mayam/trunk/src/in/raster/mayam/delegate/ImageOrientation.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/delegate/ImageOrientation.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/delegate/ImageOrientation.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -41,7 +41,7 @@ /** * * @author BabuHussain - * @version 0.5 + * @version 0.6 * */ public class ImageOrientation { @@ -64,17 +64,16 @@ } else if ((absY > 0.0001) && (absY > absX) && (absY > absZ)) { orientation += orientationY; absY = 0; - } else { - if ((absZ <= 0.0001) || (absZ <= absX) || (absZ <= absY)) { - break; - } - orientation += orientationZ; - absZ = 0; } + else if (absZ>0.0001 && absZ>absX && absZ>absY) + { + orientation+=orientationZ; + absZ=0; + } + else break; } return orientation; } - public static void getOrientation(String imageOrientation) { String imageOrientationArray[], columnRowArray[]; imageOrientationArray = imageOrientation.split("\\\\"); Modified: oviyam/mayam/trunk/src/in/raster/mayam/delegate/SeriesListUpdator.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/delegate/SeriesListUpdator.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/delegate/SeriesListUpdator.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -45,6 +45,7 @@ import in.raster.mayam.model.Study; import java.io.File; import java.io.IOException; +import java.util.ConcurrentModificationException; import java.util.Iterator; import java.util.logging.Level; import java.util.logging.Logger; @@ -147,6 +148,7 @@ selFile = new File(img.getFilepath()); } iis = ImageIO.createImageInputStream(selFile); + ImageIO.scanForPlugins(); iter = ImageIO.getImageReadersByFormatName("DICOM"); reader = (ImageReader) iter.next(); reader.setInput(iis, false); @@ -177,17 +179,15 @@ } catch (NullPointerException e) { } catch (RuntimeException e) { } - } catch (Exception e) { + }catch(ConcurrentModificationException e){} + catch (Exception e) { e.printStackTrace(); } finally { try { iis.close(); iter = null; reader.dispose(); - } catch (IOException ex) { - ex.printStackTrace(); - Logger.getLogger(StudyListUpdator.class.getName()).log(Level.SEVERE, null, ex); - } + } catch (Exception ex) {} } } } Modified: oviyam/mayam/trunk/src/in/raster/mayam/delegate/SeriesThumbUpdator.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/delegate/SeriesThumbUpdator.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/delegate/SeriesThumbUpdator.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -1,5 +1,3 @@ - - /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -102,7 +100,6 @@ setThumbnailDisplayPanelSize(tempRef.size()); for (File f : tempRef) { final SeriesPanel thumbnail = new SeriesPanel(f.getAbsolutePath()); - thumbnail.setPreferredSize(new Dimension((int) mainScreenRef.getThumbnailDisplay().getSize().getWidth()-1,96)); thumbnail.setVisible(true); if (i == 0) { @@ -113,8 +110,10 @@ ApplicationContext.selectedSeriesPanel = thumbnail; ApplicationContext.selectedSeriesPanel.setSelectionColoring(); thumbnail.updateInstanceList(); + if(MainScreen.dicomTagsViewer.isVisible()){ ArrayList<DicomTags> dcmTags = DicomTagsReader.getTags(new File(thumbnail.getFileUrl())); MainScreen.dicomTagsViewer.setDataModelOnTable(dcmTags); + } } if (canRun) { mainScreenRef.getThumbnailDisplay().add(thumbnail); @@ -124,4 +123,4 @@ i++; } } -} +} \ No newline at end of file Modified: oviyam/mayam/trunk/src/in/raster/mayam/form/ImagePanel.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/form/ImagePanel.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/form/ImagePanel.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -184,6 +184,7 @@ private int scoutLine2Y1; private int scoutLine2X2; private int scoutLine2Y2; + private String orientationLabel = ""; private int boundaryLine1X1; private int boundaryLine1Y1; private int boundaryLine1X2; @@ -331,12 +332,14 @@ isLocalizer = false; } } + findOrientation(); } catch (Exception e) { e.printStackTrace(); } } + /** * This routine used to retrive the instance related information */ @@ -925,11 +928,11 @@ g.rotate((Math.PI * 3) / 2, this.getSize().width / 2, this.getSize().height / 2); } } - if (flipHorizontalFlag) { + if (flipHorizontalFlag) { g.translate(this.getSize().width, 0); g.scale(-1, 1); } - if (flipVerticalFlag) { + if (flipVerticalFlag) { g.translate(0, this.getSize().height); g.scale(1, -1); } @@ -956,13 +959,13 @@ if (displayScout) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setColor(Color.YELLOW); - if (boundaryLine1X1 != boundaryLine1X2) { + if (orientationLabel.equalsIgnoreCase("SAGITTAL")) { g.drawLine((int) (boundaryLine1X1 * this.getCurrentScaleFactor() + startX), (int) (boundaryLine1Y1 * this.getCurrentScaleFactor() + startY), (int) (boundaryLine1X2 * this.getCurrentScaleFactor() + startX), (int) (boundaryLine1Y2 * this.getCurrentScaleFactor() + startY)); g.drawLine((int) (boundaryLine2X1 * this.getCurrentScaleFactor() + startX), (int) (boundaryLine2Y1 * this.getCurrentScaleFactor() + startY), (int) (boundaryLine2X2 * this.getCurrentScaleFactor() + startX), (int) (boundaryLine2Y2 * this.getCurrentScaleFactor() + startY)); g.setColor(Color.GREEN); g.drawLine((int) (scoutLine1X1 * this.getCurrentScaleFactor() + startX), (int) (scoutLine1Y1 * this.getCurrentScaleFactor() + startY), (int) (scoutLine1X2 * this.getCurrentScaleFactor() + startX), (int) (scoutLine1Y2 * this.getCurrentScaleFactor() + startY)); g.drawLine((int) (scoutLine2X1 * this.getCurrentScaleFactor() + startX), (int) (scoutLine2Y1 * this.getCurrentScaleFactor() + startY), (int) (scoutLine2X2 * this.getCurrentScaleFactor() + startX), (int) (scoutLine2Y2 * this.getCurrentScaleFactor() + startY)); - } else { + } else if (orientationLabel.equalsIgnoreCase("CORONAL")) { g.drawLine((int) (axis1LeftX * this.getCurrentScaleFactor() + startX), (int) (axis1LeftY * this.getCurrentScaleFactor() + startY), (int) (axis1RightX * this.getCurrentScaleFactor() + startX), (int) (axis1RightY * this.getCurrentScaleFactor() + startY)); g.drawLine((int) (axis2LeftX * this.getCurrentScaleFactor() + startX), (int) (axis2LeftY * this.getCurrentScaleFactor() + startY), (int) (axis2RightX * this.getCurrentScaleFactor() + startX), (int) (axis2RightY * this.getCurrentScaleFactor() + startY)); g.setColor(Color.GREEN); @@ -1083,26 +1086,55 @@ axisBottomX = bottomx; axisBottomY = bottomy; } + private void findOrientation() { + String imageOrientationArray[]; + if(imageOrientation!=null){ + imageOrientationArray = imageOrientation.split("\\\\"); + float _imgRowCosx = Float.parseFloat(imageOrientationArray[0]); + float _imgRowCosy = Float.parseFloat(imageOrientationArray[1]); + float _imgRowCosz = Float.parseFloat(imageOrientationArray[2]); + float _imgColCosx = Float.parseFloat(imageOrientationArray[3]); + float _imgColCosy = Float.parseFloat(imageOrientationArray[4]); + float _imgColCosz = Float.parseFloat(imageOrientationArray[5]); + orientationLabel = getOrientationLabelFromImageOrientation(_imgRowCosx, _imgRowCosy, _imgRowCosz, _imgColCosx, _imgColCosy, _imgColCosz); + if (orientationLabel.equalsIgnoreCase("CORONAL") || orientationLabel.equalsIgnoreCase("SAGITTAL")) { + isLocalizer = true; + } + } + } + public String getOrientationLabelFromImageOrientation(double rowX, double rowY, double rowZ, double colX, double colY, double colZ) { + String label = null; + String ColumnRight = ImageOrientation.getOrientation(rowX, rowY, rowZ); + String rowDown = ImageOrientation.getOrientation(colX, colY, colZ); + String axis1 = ColumnRight.substring(0, 1); + String axis2 = rowDown.substring(0, 1); + if ((axis1 != null) && (axis2 != null)) { + if ((((axis1.equals("R")) || (axis1.equals("L")))) && (((axis2.equals("A")) || (axis2.equals("P"))))) { + label = "AXIAL"; + } else if ((((axis2.equals("R")) || (axis2.equals("L")))) && (((axis1.equals("A")) || (axis1.equals("P"))))) { + label = "AXIAL"; + } else if ((((axis1.equals("R")) || (axis1.equals("L")))) && (((axis2.equals("H")) || (axis2.equals("F"))))) { + label = "CORONAL"; + } else if ((((axis2.equals("R")) || (axis2.equals("L")))) && (((axis1.equals("H")) || (axis1.equals("F"))))) { + label = "CORONAL"; + } else if ((((axis1.equals("A")) || (axis1.equals("P")))) && (((axis2.equals("H")) || (axis2.equals("F"))))) { + label = "SAGITTAL"; + } else if ((((axis2.equals("A")) || (axis2.equals("P")))) && (((axis1.equals("H")) || (axis1.equals("F"))))) { + label = "SAGITTAL"; + } + + } else { + label = "OBLIQUE"; + } + + return label; + } + private void setEnclosingSizes(int finalWidth, int finalHeight) { this.getCanvas().getLayeredCanvas().getAnnotationPanel().setSize(finalWidth, finalHeight); this.getCanvas().getLayeredCanvas().getAnnotationPanel().setBounds(xPosition, yPosition, this.getSize().width, this.getSize().height); - } - int finalHeight; - int finalWidth; - - private void calculateHeightAndWidthBasedonAspectRatio(int first, int second) { - int h = image.getHeight(); - int w = image.getWidth(); - float firstValue = first; - float secondValue = second; - float a = firstValue / secondValue; - float modifiedHeight = h * a; - finalHeight = Math.round(modifiedHeight); - finalWidth = w; - } - /** * This routine used to zoom in the image box using the scale factor */ @@ -1516,6 +1548,7 @@ setImage(instance.getPixelData()); setInstanceInfo(instance); if (displayScout) { + findOrientation(); if (!this.isLocalizer) { LocalizerDelegate localizer = new LocalizerDelegate(); localizer.drawScoutLineWithBorder(); @@ -1534,6 +1567,7 @@ setImage(instance.getPixelData()); setInstanceInfo(instance); if (displayScout) { + findOrientation(); if (!this.isLocalizer) { LocalizerDelegate localizer = new LocalizerDelegate(); localizer.drawScoutLineWithBorder(); Modified: oviyam/mayam/trunk/src/in/raster/mayam/form/MainScreen.form =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/form/MainScreen.form 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/form/MainScreen.form 2010-07-17 13:26:32 UTC (rev 13754) @@ -355,10 +355,10 @@ <Component class="javax.swing.JLabel" name="jLabel2"> <Properties> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="cc" green="66" red="0" type="rgb"/> + <Color blue="71" green="71" red="75" type="rgb"/> </Property> <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="ff" green="ff" red="ff" type="rgb"/> + <Color blue="68" green="0" red="0" type="rgb"/> </Property> <Property name="text" type="java.lang.String" value="Series "/> <Property name="opaque" type="boolean" value="true"/> @@ -396,7 +396,7 @@ <EmptySpace max="-2" attributes="0"/> <Component id="exportButton" min="-2" pref="70" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="cdImportButton" min="-2" pref="72" max="-2" attributes="0"/> + <Component id="cdImportButton" min="-2" pref="85" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="deleteButton" min="-2" pref="75" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> @@ -409,7 +409,7 @@ <Component id="viewerButton" min="-2" pref="67" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="queueButton" min="-2" pref="72" max="-2" attributes="0"/> - <EmptySpace pref="614" max="32767" attributes="0"/> + <EmptySpace pref="601" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> Modified: oviyam/mayam/trunk/src/in/raster/mayam/form/MainScreen.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/form/MainScreen.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/form/MainScreen.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -60,7 +60,6 @@ import in.raster.mayam.model.Study; import in.raster.mayam.model.table.StudyListModel; import in.raster.mayam.model.table.renderer.CellRenderer; -import java.awt.Color; import java.io.File; import java.util.ArrayList; import java.util.logging.Level; @@ -70,7 +69,6 @@ import javax.swing.JScrollPane; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.border.MatteBorder; import javax.swing.SwingUtilities; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; @@ -104,6 +102,7 @@ } private void setTheme() { + systemLFmenu.setText(System.getProperty("os.name")); String activeTheme = ApplicationContext.databaseRef.getActiveTheme(); if (activeTheme.equalsIgnoreCase("Nimrod")) { setNimrodTheme(); @@ -114,10 +113,6 @@ } } - /* private void setTableHeaders() { - studyListTable.getTableHeader().setDefaultRenderer(new HeaderRenderer()); - studyListTable.setDefaultRenderer(Object.class, new CellRenderer()); - }*/ /** * This routine used to initialize the sending progress */ @@ -212,7 +207,6 @@ StudyListModel studyListModel = new StudyListModel(); studyListModel.setData(ApplicationContext.databaseRef.listAllStudiesOfDB()); studyListTable.setModel((TableModel) studyListModel); - //studyListModel.fireTableRowsInserted(0,studyListModel.getStudyList().size()-1); TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(studyListModel); studyListTable.setRowSorter(sorter); if (studyListTable.getRowCount() > 0) { @@ -291,7 +285,7 @@ ); windowingPanelCanvasLayout.setVerticalGroup( windowingPanelCanvasLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 530, Short.MAX_VALUE) + .add(0, 532, Short.MAX_VALUE) ); studyListTable.setModel(new StudyListModel()); @@ -312,8 +306,8 @@ thumbnailDisplay.setMinimumSize(new java.awt.Dimension(13, 2)); thumbnailScroll.setViewportView(thumbnailDisplay); - jLabel2.setBackground(new java.awt.Color(0, 102, 204)); - jLabel2.setForeground(new java.awt.Color(255, 255, 255)); + jLabel2.setBackground(new java.awt.Color(117, 113, 113)); + jLabel2.setForeground(new java.awt.Color(0, 0, 104)); jLabel2.setText("Series "); jLabel2.setOpaque(true); @@ -324,7 +318,7 @@ .add(org.jdesktop.layout.GroupLayout.TRAILING, studyAndSeriesDisplayPanelLayout.createSequentialGroup() .addContainerGap() .add(studyAndSeriesDisplayPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(org.jdesktop.layout.GroupLayout.LEADING, studyTableScroll, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1274, Short.MAX_VALUE) + .add(org.jdesktop.layout.GroupLayout.LEADING, studyTableScroll, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1278, Short.MAX_VALUE) .add(studyAndSeriesDisplayPanelLayout.createSequentialGroup() .add(studyAndSeriesDisplayPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(thumbnailScroll, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE) @@ -343,7 +337,7 @@ .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(thumbnailScroll, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE)) - .add(org.jdesktop.layout.GroupLayout.LEADING, windowingPanelCanvas, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 530, Short.MAX_VALUE)) + .add(org.jdesktop.layout.GroupLayout.LEADING, windowingPanelCanvas, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)) .addContainerGap()) ); @@ -357,7 +351,7 @@ .add(contentAreaLayout.createSequentialGroup() .addContainerGap() .add(jLabel1) - .addContainerGap(1171, Short.MAX_VALUE)) + .addContainerGap(1189, Short.MAX_VALUE)) .add(studyAndSeriesDisplayPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); contentAreaLayout.setVerticalGroup( @@ -507,7 +501,7 @@ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(exportButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(cdImportButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(cdImportButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 85, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(deleteButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 75, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) @@ -520,7 +514,7 @@ .add(viewerButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 67, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(queueButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap(567, Short.MAX_VALUE)) + .addContainerGap(601, Short.MAX_VALUE)) ); headerPanelLayout.setVerticalGroup( headerPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) @@ -715,7 +709,7 @@ }//GEN-LAST:event_exportButtonActionPerformed private void exportHandler() { if (studyListTable.getSelectedRow() != -1) { - int selection=studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); + int selection = studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); String siuid = ((StudyListModel) studyListTable.getModel()).getValueAt(selection, 8); ExportLocationChooser jpegChooser = new ExportLocationChooser(ApplicationContext.imgView, true); Display.alignScreen(jpegChooser); @@ -747,7 +741,7 @@ forwardHost = ae.getHostName(); forwardPort = ae.getPort(); if (studyListTable.getSelectedRow() != -1) { - int selection=studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); + int selection = studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); String studyIUID = (String) studyListTable.getModel().getValueAt(selection, 8); SendingDelegate sendingDelegate = new SendingDelegate(studyIUID, ae); } @@ -755,7 +749,7 @@ }//GEN-LAST:event_sendButtonActionPerformed private void viewerButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewerButtonActionPerformed if (studyListTable.getSelectedRow() != -1) { - int selection=studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); + int selection = studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); String siuid = ((StudyListModel) studyListTable.getModel()).getValueAt(selection, 8); int rowColumnArray[] = new int[2]; try { @@ -807,7 +801,7 @@ private void studyListTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_studyListTableMouseClicked if (evt.getClickCount() == 2) { if (studyListTable.getSelectedRow() != -1) { - int selection=studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); + int selection = studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); String siuid = ((StudyListModel) studyListTable.getModel()).getValueAt(selection, 8); int rowColumnArray[] = ApplicationContext.databaseRef.getRowColumnBasedStudyUID(siuid); ArrayList tempRef = ApplicationContext.databaseRef.getUrlBasedOnStudyIUID(siuid); @@ -822,7 +816,7 @@ private void metaDataButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_metaDataButtonActionPerformed try { if (studyListTable.getSelectedRow() != -1) { - int selection=studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); + int selection = studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); String siuid = ((StudyListModel) studyListTable.getModel()).getValueAt(selection, 8); ArrayList<DicomTags> dcmTags = DicomTagsReader.getTags(new File(this.canvas.getFilePath())); dicomTagsViewer.setDataModelOnTable(dcmTags); @@ -850,7 +844,7 @@ private void queueMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_queueMenuItemActionPerformed sndRcvFrm.setVisible(true); }//GEN-LAST:event_queueMenuItemActionPerformed - + private void resetMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetMenuItemActionPerformed ApplicationContext.databaseRef.rebuild(); MainScreen.showLocalDBStorage(); @@ -924,7 +918,6 @@ try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); updateComponentsTreeUI(); - //osSpecificColoring(); } catch (ClassNotFoundException ex) { Logger.getLogger(MainScreen.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { @@ -936,18 +929,6 @@ } } - /** - * This routine used to set the os specific properties - */ - private void osSpecificColoring() { - if (System.getProperty("os.name").startsWith("Mac")) { - headerPanel.setBorder(new MatteBorder(0, 0, 1, 0, Color.DARK_GRAY)); - contentArea.setBackground(new Color(216, 216, 216)); - studyAndSeriesDisplayPanel.setBackground(new Color(216, 216, 216)); - thumbnailDisplay.setBackground(new Color(216, 216, 216)); - } - } - private void updateComponentsTreeUI() { SwingUtilities.updateComponentTreeUI(this); SwingUtilities.updateComponentTreeUI(queryRetrieve); @@ -969,7 +950,7 @@ thumbUpdator.setCanRun(false); removeThumbnailComponents(); } - int selection=studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); + int selection = studyListTable.convertRowIndexToModel(studyListTable.getSelectedRow()); String studyUID = ((StudyListModel) studyListTable.getModel()).getValueAt(selection, 8); thumbUpdator = new SeriesThumbUpdator(studyUID); } Modified: oviyam/mayam/trunk/src/in/raster/mayam/form/QueryRetrive.form =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/form/QueryRetrive.form 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/form/QueryRetrive.form 2010-07-17 13:26:32 UTC (rev 13754) @@ -621,13 +621,13 @@ <Component class="javax.swing.JLabel" name="serverNameLabel"> <Properties> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="d9" green="74" red="29" type="rgb"/> + <Color blue="71" green="71" red="75" type="rgb"/> </Property> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Lucida Grande" size="13" style="1"/> </Property> <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="ff" green="ff" red="ff" type="rgb"/> + <Color blue="68" green="0" red="0" type="rgb"/> </Property> <Property name="horizontalAlignment" type="int" value="0"/> <Property name="text" type="java.lang.String" value=" Server Name"/> @@ -637,13 +637,13 @@ <Component class="javax.swing.JLabel" name="headerLabel"> <Properties> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="d9" green="74" red="29" type="rgb"/> + <Color blue="71" green="71" red="75" type="rgb"/> </Property> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Lucida Grande" size="13" style="1"/> </Property> <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="ff" green="ff" red="ff" type="rgb"/> + <Color blue="68" green="0" red="0" type="rgb"/> </Property> <Property name="horizontalAlignment" type="int" value="0"/> <Property name="text" type="java.lang.String" value=" DICOM Nodes "/> @@ -653,13 +653,13 @@ <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="d9" green="74" red="29" type="rgb"/> + <Color blue="71" green="71" red="75" type="rgb"/> </Property> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Lucida Grande" size="13" style="1"/> </Property> <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="ff" green="ff" red="ff" type="rgb"/> + <Color blue="68" green="0" red="0" type="rgb"/> </Property> <Property name="horizontalAlignment" type="int" value="0"/> <Property name="text" type="java.lang.String" value="Query Filter"/> Modified: oviyam/mayam/trunk/src/in/raster/mayam/form/QueryRetrive.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/form/QueryRetrive.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/form/QueryRetrive.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -71,7 +71,6 @@ import org.dcm4che.data.Dataset; import org.dcm4che.util.DcmURL; import in.raster.mayam.model.table.renderer.CellRenderer; -import in.raster.mayam.model.table.renderer.HeaderRenderer; import javax.swing.JOptionPane; import javax.swing.event.ListSelectionListener; import javax.swing.table.TableModel; @@ -520,23 +519,23 @@ }); jScrollPane2.setViewportView(studyListTable); - serverNameLabel.setBackground(new java.awt.Color(41, 116, 217)); - serverNameLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); - serverNameLabel.setForeground(new java.awt.Color(255, 255, 255)); + serverNameLabel.setBackground(new java.awt.Color(117, 113, 113)); + serverNameLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N + serverNameLabel.setForeground(new java.awt.Color(0, 0, 104)); serverNameLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); serverNameLabel.setText(" Server Name"); serverNameLabel.setOpaque(true); - headerLabel.setBackground(new java.awt.Color(41, 116, 217)); - headerLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); - headerLabel.setForeground(new java.awt.Color(255, 255, 255)); + headerLabel.setBackground(new java.awt.Color(117, 113, 113)); + headerLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N + headerLabel.setForeground(new java.awt.Color(0, 0, 104)); headerLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); headerLabel.setText(" DICOM Nodes "); headerLabel.setOpaque(true); - jLabel1.setBackground(new java.awt.Color(41, 116, 217)); - jLabel1.setFont(new java.awt.Font("Lucida Grande", 1, 13)); - jLabel1.setForeground(new java.awt.Color(255, 255, 255)); + jLabel1.setBackground(new java.awt.Color(117, 113, 113)); + jLabel1.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N + jLabel1.setForeground(new java.awt.Color(0, 0, 104)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Query Filter"); jLabel1.setOpaque(true); Modified: oviyam/mayam/trunk/src/in/raster/mayam/form/SendReceivePanel.form =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/form/SendReceivePanel.form 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/form/SendReceivePanel.form 2010-07-17 13:26:32 UTC (rev 13754) @@ -35,13 +35,13 @@ <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="d9" green="74" red="29" type="rgb"/> + <Color blue="71" green="71" red="75" type="rgb"/> </Property> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Tahoma" size="14" style="1"/> </Property> <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> - <Color blue="ff" green="ff" red="ff" type="rgb"/> + <Color blue="68" green="0" red="0" type="rgb"/> </Property> <Property name="text" type="java.lang.String" value=" Receive"/> <Property name="opaque" type="boolean" value="true"/> Modified: oviyam/mayam/trunk/src/in/raster/mayam/form/SendReceivePanel.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/form/SendReceivePanel.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/form/SendReceivePanel.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -71,9 +71,9 @@ jScrollPane1 = new javax.swing.JScrollPane(); receiveTable = new javax.swing.JTable(); - jLabel1.setBackground(new java.awt.Color(41, 116, 217)); - jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); - jLabel1.setForeground(new java.awt.Color(255, 255, 255)); + jLabel1.setBackground(new java.awt.Color(117, 113, 113)); + jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jLabel1.setForeground(new java.awt.Color(0, 0, 104)); jLabel1.setText(" Receive"); jLabel1.setOpaque(true); Modified: oviyam/mayam/trunk/src/in/raster/mayam/form/SeriesPanel.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/form/SeriesPanel.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/form/SeriesPanel.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -51,16 +51,13 @@ import java.awt.event.MouseListener; import java.awt.image.BufferedImage; import java.io.File; -import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.imageio.ImageIO; import javax.imageio.ImageReader; import javax.imageio.stream.ImageInputStream; import javax.swing.ImageIcon; -import javax.swing.border.EtchedBorder; +import javax.swing.border.LineBorder; import org.dcm4che.data.Dataset; import org.dcm4che.dict.Tags; import org.dcm4che.imageio.plugins.DcmMetadata; @@ -197,8 +194,8 @@ imageIcon = null; loadedImage = null; - } catch (IOException ex) { - Logger.getLogger(ThumbnailImage.class.getName()).log(Level.SEVERE, null, ex); + } catch (Exception ex) { + // Logger.getLogger(ThumbnailImage.class.getName()).log(Level.SEVERE, null, ex); } } } @@ -218,7 +215,7 @@ * This routine used to set the selection coloring */ public void setSelectionColoring() { - this.setBorder(new EtchedBorder(Color.YELLOW, Color.RED)); + this.setBorder(new LineBorder(Color.DARK_GRAY,2)); seriesDescriptionText.setForeground(Color.black); totalImagesText.setForeground(Color.black); modalityText.setForeground(Color.black); @@ -229,11 +226,11 @@ * This routine used to remove the selection coloring. */ public void setNoSelectionColoring() { - this.setBorder(new EtchedBorder(Color.GRAY, Color.GRAY)); - seriesDescriptionText.setForeground(Color.CYAN); - totalImagesText.setForeground(Color.CYAN); - modalityText.setForeground(Color.CYAN); - institutionText.setForeground(Color.CYAN); + this.setBorder(new LineBorder(Color.lightGray)); + seriesDescriptionText.setForeground(new Color(0,70,104)); + totalImagesText.setForeground(new Color(0,70,104)); + modalityText.setForeground(new Color(0,70,104)); + institutionText.setForeground(new Color(0,70,104)); } private void setTotalInstacne() { Modified: oviyam/mayam/trunk/src/in/raster/mayam/model/table/renderer/CellRenderer.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/model/table/renderer/CellRenderer.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/model/table/renderer/CellRenderer.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -53,14 +53,13 @@ private Color whiteColor = new Color(254, 254, 254); private Color alternateColor = new Color(237, 243, 254); - private Color selectedColor = new Color(61, 128, 223); - + private Color selectedColor = new Color(142,104,104); public Component getTableCellRendererComponent(JTable table, Object value, boolean selected, boolean focused, int row, int column) { super.getTableCellRendererComponent(table, value, - selected, focused, row, column); + selected, false, row, column); // Set the background color Color bg; Modified: oviyam/mayam/trunk/src/in/raster/mayam/util/DicomTagsReader.java =================================================================== --- oviyam/mayam/trunk/src/in/raster/mayam/util/DicomTagsReader.java 2010-07-16 23:06:06 UTC (rev 13753) +++ oviyam/mayam/trunk/src/in/raster/mayam/util/DicomTagsReader.java 2010-07-17 13:26:32 UTC (rev 13754) @@ -119,7 +119,8 @@ dcmTags.setTagLength(tagLength); dcmTags.setTagValue(dcmObject.getString(tag)); - } catch (Exception e) { + }catch(UnsupportedOperationException e){} + catch (Exception e) { e.printStackTrace(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |