Changeset 4979


Ignore:
Timestamp:
Feb 7, 2015, 3:38:59 PM (5 years ago)
Author:
ldelgass
Message:

Add guards around debugging output in DICOM to VTK converter

Location:
trunk/gui/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/src/RpDicomToVtk.cc

    r4128 r4979  
    2727#include <stdio.h>
    2828#include "tcl.h"
     29
     30// #define RP_DICOM_TRACE
    2931
    3032static int
     
    9597    int series = 0;
    9698
     99#ifdef RP_DICOM_TRACE
    97100    fprintf(stderr, "Num Studies: %d\n", numStudies);
     101#endif
    98102    vtkStringArray *files;
    99103#if 0
    100104    for (int i = 0; i < numStudies; i++) {
    101105        int numSeries = sorter->GetNumberOfSeriesInStudy(i);
     106#ifdef RP_DICOM_TRACE
    102107        fprintf(stderr, "Study %d: %d series\n", i, numSeries);
     108#endif
    103109        int k = sorter->GetFirstSeriesInStudy(i);
    104110        for (int j = 0; j < numSeries; j++) {
     
    144150#ifdef USE_VTK_DICOM_PACKAGE
    145151    vtkStringArray *ids = reader->GetStackIDs();
     152#ifdef RP_DICOM_TRACE
    146153    for (int i = 0; i < ids->GetNumberOfValues(); i++) {
    147154        fprintf(stderr, "Stack: %s\n", ids->GetValue(i).c_str());
    148155    }
     156#endif
    149157    vtkIntArray *fidxArray = reader->GetFileIndexArray();
    150158    vtkDICOMMetaData *md = reader->GetMetaData();
     
    160168    }
    161169#endif
     170#ifdef RP_DICOM_TRACE
    162171    fprintf(stderr, "Number of data elements: %d\n", md->GetNumberOfDataElements());
    163 
     172#endif
    164173    Tcl_ListObjAppendElement(interp, metaDataObj, Tcl_NewStringObj("num_files", -1));
    165174    Tcl_ListObjAppendElement(interp, metaDataObj, Tcl_NewIntObj(md->GetNumberOfInstances()));
     
    234243
    235244    Tcl_ListObjAppendList(interp, objPtr, metaDataObj);
    236 
     245#ifdef RP_DICOM_TRACE
    237246    fprintf(stderr, "writing VTK\n");
    238 
     247#endif
    239248    vtkSmartPointer<vtkDataSetWriter> writer = vtkSmartPointer<vtkDataSetWriter>::New();
    240249    writer->SetInputConnection(reader->GetOutputPort());
     
    242251    writer->WriteToOutputStringOn();
    243252    writer->Update();
    244 
     253#ifdef RP_DICOM_TRACE
    245254    fprintf(stderr, "writing VTK...done\n");
    246 
     255#endif
    247256    Tcl_ListObjAppendElement(interp, objPtr, Tcl_NewStringObj("vtkdata", -1));
    248257
  • trunk/gui/src/RpReadPoints.c

    r3404 r4979  
    8888    return TCL_OK;
    8989}
    90    
     90
    9191/*
    9292 *  ReadPoints string dimVar pointsVar
Note: See TracChangeset for help on using the changeset viewer.