Skip to content

Commit

Permalink
Add a simple test for use case
Browse files Browse the repository at this point in the history
  • Loading branch information
malaterre committed Sep 28, 2010
1 parent 5787470 commit e5e8e4b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 14 deletions.
35 changes: 35 additions & 0 deletions Testing/TestTypicalPipeline.cxx
@@ -0,0 +1,35 @@
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkDICOMBase.h,v $
Language: C++
Date: $Date: 2009-11-29 15:51:11 $
Version: $Revision: 1.1 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/

int main(int argc, char *argv[])
{
const char peer[] = "dicomserver";
const int port = 104;

// Do a C-MOVE
typedef itk::GDCMCMoveSCU CMoveImplementationType;
CMoveImplementationType::Pointer gdcmCMove = CMoveImplementationType::New();
gdcmCMove->SetPeer( peer );
gdcmCMove->SetPort( port );

typedef itk::DICOMCMove CMoveType;
CMoveType::Pointer cmove = CMoveType::New();

cmove->SetImplementation( gdcmCMove );

return EXIT_SUCCESS;
}
14 changes: 1 addition & 13 deletions itkDICOMBase.h
Expand Up @@ -27,7 +27,7 @@ namespace itk
/** \class DICOMBase
* \brief Abstract superclass defines image DICOM interface.
*/
class ITK_EXPORT DICOMBase : public LightProcessObject
class ITK_EXPORT DICOMBase : virtual public Object
{
public:
/** Standard class typedefs. */
Expand Down Expand Up @@ -66,12 +66,6 @@ class ITK_EXPORT DICOMBase : public LightProcessObject
itkSetMacro(PortNumber, unsigned int);
itkGetMacro(PortNumber, unsigned int);

/* network options: **/
/** query information model: */
typedef enum { Worklist, Patient, Study, PSOnly} QueryInformationModelType;
itkSetEnumMacro(QueryInformationModel, QueryInformationModelType);
itkGetEnumMacro(QueryInformationModel, QueryInformationModelType);

/** application entity titles: */
/** set calling AE title */
itkSetStringMacro(AETitle);
Expand Down Expand Up @@ -100,22 +94,16 @@ class ITK_EXPORT DICOMBase : public LightProcessObject
itkSetMacro(MaxPDU, unsigned int);
itkGetMacro(MaxPDU, unsigned int);

/// repeat n times
itkSetMacro(NumberOfRepeat, unsigned int);
itkGetMacro(NumberOfRepeat, unsigned int);

private:
// FIXME: an abstract class should not have data member:
std::string m_PeerHostname;
unsigned int m_PortNumber;
QueryInformationModelType m_QueryInformationModel;
std::string m_AETitle;
std::string m_CalledAETitle;
unsigned int m_Timeout;
unsigned int m_ACSETimeout;
unsigned int m_DIMSETimeout;
unsigned int m_MaxPDU;
unsigned int m_NumberOfRepeat;

private:
DICOMBase(const Self&); //purposely not implemented
Expand Down
11 changes: 10 additions & 1 deletion itkDICOMMoveSCU.h
Expand Up @@ -27,7 +27,7 @@ namespace itk

/** \class DICOMMoveSCU
* \brief
* - SCU for the Query/Retrieve Service Class
* - SCU for the Query/Retrieve Service Class
* - SCP for the Storage Service Class
*/
class ITK_EXPORT DICOMMoveSCU : public DICOMSCU, public DICOMSCP
Expand All @@ -41,6 +41,15 @@ class ITK_EXPORT DICOMMoveSCU : public DICOMSCU, public DICOMSCP
/** Run-time type information (and related methods). */
itkTypeMacro(DICOMMoveSCU, Superclass);

/* network options: **/
/** query information model: */
typedef enum { Worklist, Patient, Study, PSOnly} QueryInformationModelType;
itkSetEnumMacro(QueryInformationModel, QueryInformationModelType);
itkGetEnumMacro(QueryInformationModel, QueryInformationModelType);

private:
QueryInformationModelType m_QueryInformationModel;

private:
DICOMMoveSCU(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
Expand Down

0 comments on commit e5e8e4b

Please sign in to comment.