Skip to content

Commit

Permalink
STYLE: get rid of warnings on ubuntu linux
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorov committed Jul 25, 2012
1 parent d8be88b commit 5b413aa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 11 additions & 1 deletion Logic/vtkSlicerReportingModuleLogic.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,11 @@ vtkMRMLScalarVolumeNode* vtkSlicerReportingModuleLogic::GetMarkupVolumeNode(vtkM

int numPoints = cpNode->GetNumberOfControlPoints();
vtkDebugMacro("GetMarkupVolumeNode: have a control points node with " << numPoints << " points");
if(!numPoints)
{
vtkErrorMacro("GetMarkupVolumeNode: Input node has 0 control points!");
return 0;
}

// get the associated node
const char *associatedNodeID = cpNode->GetAttribute("AssociatedNodeID");
Expand Down Expand Up @@ -2113,13 +2118,18 @@ bool vtkSlicerReportingModuleLogic::DicomSegRead(vtkCollection* labelNodes, cons
}

DcmFileFormat fileFormat;
DcmDataset *segDataset;
DcmDataset *segDataset = NULL;
OFCondition status = fileFormat.loadFile(segFileName.c_str());
if(status.good())
{
std::cout << "Loaded dataset for " << segFileName << std::endl;
segDataset = fileFormat.getAndRemoveDataset();
}
else
{
std::cout << "Failed to load the dataset for " << instanceUID << std::endl;
return false;
}

// No go if this is not a SEG modality
{
Expand Down
7 changes: 6 additions & 1 deletion Prototype/ReadDICOMSEG.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,18 @@ int main(int argc, char** argv)

// Step 1: load the input DICOM, find the referenced frames in the DICOM db
DcmFileFormat fileFormat;
DcmDataset *segDataset;
DcmDataset *segDataset = NULL;
OFCondition status = fileFormat.loadFile(argv[1]);
if(status.good())
{
std::cout << "Loaded dataset for " << argv[1] << std::endl;
segDataset = fileFormat.getAndRemoveDataset();
}
else
{
std::cerr << "Failed to read the dataset for " << argv[1] << std::endl;
return -1;
}

// No go if this is not a SEG modality
{
Expand Down

0 comments on commit 5b413aa

Please sign in to comment.