Hi,

I use 3 files for the vtkDICOMImageReader plugin :

- One CMakeList.txt where you can find those lines:

# READERS PLUGIN --------------------------------------------------

  # Use the ADD_PARAVIEW_PLUGIN macro to build a plugin
 ADD_PARAVIEW_PLUGIN(
   DICOMImageReader          #<--Name for the plugin
  "1.0"                        #<--Version string
   SERVER_MANAGER_XML DICOMReader.xml  #<-- server manager xml
   GUI_RESOURCE_FILES DICOMReaderGUI.xml
 )
#------------------------------------------------------------------

You can also use this file for other ADD_PARAVIEW_PLUGIN command

- One DICOMReaderGUI.xml
- One DICOMReader.xml

Both latter are given.

Regarding the GDCMReader, I am sorry I could not help you. As I said,
I had never tried this lib in a Paraview framework. The best you can
do - well, the laziest in fact - is to ask the GDCM development team
to give a built-in paraview plugin.

Today, the vtkDICOMImageReader is sufficient for me, and what I give
here makes it works in ParaView 3.4 stable and nightly CVS 3.5, both
Windows (XP and Vista) and Linux (Fedora 9). This is true when the
plugin is loaded on the computer that built Paraview. Other problems
arise when deploying on 'pure-of-devel-stuff' systems.

I hope this will help.

Best regards,

Jerome
2009/2/9 Biao She <sheb...@gmail.com>:
> Thanks for your help, Jerome.
> I find the vtkGdcmReader files in the latest GDCM package. After I build
> these files as a Paraview Plug-in and load it, I got this error message from
> Paraview console:
> ERROR: In
> /usr/scratch/bshe/Paraview/ParaView-3.4.0/Servers/Common/vtkProcessModule.cxx,
> line 1079
> vtkProcessModule (0x8a7c2e0): Cannot create object of type "vtkGdcmReader".
> while processing
> Message 0 = New
>   Argument 0 = string_value {vtkGdcmReader}
>   Argument 1 = id_value {84}
>
> ERROR: In
> /usr/scratch/bshe/Paraview/ParaView-3.4.0/Servers/Common/vtkProcessModule.cxx,
> line 1080
> vtkProcessModule (0x8a7c2e0): Aborting execution for debugging purposes.
> I must do something wrong, but when I build the vtkGdcmReader, no error
> message at all. Here is my CMakeLists file:
> FIND_PACKAGE(ParaView REQUIRED)
> INCLUDE(${PARAVIEW_USE_FILE})
>
> FIND_PACKAGE (GDCM)
> IF (GDCM_FOUND)
>    INCLUDE(${GDCM_USE_FILE})
> ENDIF (GDCM_FOUND)
>
> ADD_PARAVIEW_PLUGIN(vtkGDCMReader "1.0" SERVER_MANAGER_SOURCES
> vtkGdcmReader.cxx)
> ADD_PARAVIEW_PLUGIN(vtkGDCMReader "1.0" GUI_RESOURCE_FILES pqReader.xml)
> ADD_PARAVIEW_PLUGIN(vtkGDCMReader "1.0" SERVER_MANAGER_XML reader.xml)
>
> You also mentioned that you use vtkDICOMImageReader as your DICOM reader in
> Paraview. It seems that I can only use the reader to read one DICOM image
> file. How can I write the XML files for vtkDICOMImageReader to read a series
> of DICOM files? Could you please email me your XML files for
> vtkDICOMImageReader if possible? Thanks very much!
>
> Aaron
>
>
> On Fri, Feb 6, 2009 at 12:52 AM, Jérôme <jerome.ve...@gmail.com> wrote:
>>
>> Hi,
>>
>> if you intend to use a DICOM reader in Paraview, why not using
>> directly GDCM, instead of ITK? It contains a VTK Reader... If I am
>> right, you will just have to write the XML/CMake files that make the
>> reader available in Paraview.
>>
>> In my case, I use the vtkDICOMImageReader, that is a very simple dcm
>> file series reader: just give the folder containing the files, and let
>> it read. If you need more functionalities, the GDCM reader will do the
>> trick.
>>
>> You can find a later version of GDCM than the ITK integrated one, on
>> this website: http://www.creatis.insa-lyon.fr/Public/Gdcm/ . I cannot
>> help you more, as I had never use it for now.
>>
>> Cheers,
>> Jerome
>>
>> 2009/2/6 Biao She <sheb...@gmail.com>:
>> > Hi everyone.
>> > I am wondering if anyone know how to integrate a ITK(GDCM) based DICOM
>> > reader to Paraview?
>> > My basic idea is:
>> > 1. Read DICOM series data through ITK(GDCM)
>> > 2. Export the data to a vtkImageImport class
>> > 3. Use the data in vtkImageImport as a source of Paraview
>> > I have done the first two steps. But I am not sure how to do the third
>> > one.
>> >
>> > I have read something about how to write a Paraview Reader in the
>> > Paraview
>> > book. It is said that all the readers must derive from vtkAlgorithm or
>> > one
>> > of its subclass. Fortunately, vtkImageImport is one of its subclass. So,
>> > I
>> > guess it would be a good idea to choose vtkImageImport as a superclass
>> > of my
>> > reader. Am I right?
>> > If I choose vtkImageImport as a superclass, to make my reader works
>> > properly, which methods should be implemented in my reader?
>> >
>> > The last question is: How do I read the path to DICOM files from
>> > Paraview
>> > Client GUI and pass it to my reader? For example, the DICOM data is
>> > stored
>> > in /usr/DATA/ directory, how can I pass this value to my reader?
>> >
>> > Thanks very much for your help!
>> >
>> > Aaron
>> >
>> > _______________________________________________
>> > ParaView mailing list
>> > ParaView@paraview.org
>> > http://www.paraview.org/mailman/listinfo/paraview
>> >
>> >
>
>
<ServerManagerConfiguration>
  
<ProxyGroup name="sources">
   <!-- ================================================================== -->
   <SourceProxy name="DICOMImageReader" class="vtkDICOMImageReader"
                label="DICOM Reader">
     <StringVectorProperty
                           name="DirectoryName"
                           number_of_elements="1"
                           command="SetDirectoryName"
                           immediate_update="1">
         <FileListDomain name="files"/>
         <Documentation>
            This property specifies the directory name for the vtk Dicom reader.
         </Documentation>
         <Hints>
           <UseDirectoryName />
           <Property name="DirectoryName" show="1" />
         </Hints> 
      </StringVectorProperty>

   </SourceProxy>
    <!-- End DICOM Reader -->
</ProxyGroup>
</ServerManagerConfiguration>
<ParaViewReaders>
  <Reader name="DICOMImageReader" extensions="dcm"
          file_description="DICOM Files and folders">
  </Reader>
</ParaViewReaders>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to