Processing DV images within jython script

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Processing DV images within jython script

perpetuum_mobile
Greetings,

currently I'm trying to process/analyse images in an dv file.

Within an Image Stack consisting of *.tiff files it is quite straight forward to access each slice/image within the image stack:

imp = IJ.openImage("http://imagej.nih.gov/ij/images/flybrain.zip")
stack = imp.getImageStack()  
cp = stack.getProcessor(slice_number)

where it is possible to directly address the desired image from the image stack.

Now applying the same procedure on .dv file leads to the following error message:

"Traceback (most recent call last):
  File "<iostream>", line 32, in <module>
AttributeError: 'NoneType' object has no attribute 'getImageStack'
java.lang.NullPointerException: null"

Which tells me that the type of the dv file cannot be determined and thus the the single images within the dv-stack (if it has a stack structure) is not accessible.

How can I read dv files within an jython script in Fiji?

I couldn't find any fruitful functions in the Fiji API, however I must also admit, that I bare quite a little knowledge on the Deltavision dv file format.

Thank you in advance for any hints and

with best regards

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Processing DV images within jython script

Rasband, Wayne (NIH/NIMH) [E]
On May 22, 2013, at 10:11 AM, perpetuum_mobile wrote:

> Greetings,
>
> currently I'm trying to process/analyse images in an dv file.
>
> Within an Image Stack consisting of *.tiff files it is quite straight
> forward to access each slice/image within the image stack:
>
> imp = IJ.openImage("http://imagej.nih.gov/ij/images/flybrain.zip")
> stack = imp.getImageStack()  
> cp = stack.getProcessor(slice_number)
>
> where it is possible to directly address the desired image from the image
> stack.
>
> Now applying the same procedure on .dv file leads to the following error
> message:
>
> "Traceback (most recent call last):
>  File "<iostream>", line 32, in <module>
> AttributeError: 'NoneType' object has no attribute 'getImageStack'
> java.lang.NullPointerException: null"

Some reader plugins, including Bio-Formats, open and display the image without returning a reference to it. You can work around this problem by adding

   imp = WindowManager.getCurrentImage()

just after

   imp = IJ.openImage(path)

-wayne


> Which tells me that the type of the dv file cannot be determined and thus
> the the single images within the dv-stack (if it has a stack structure) is
> not accessible.
>
> How can I read dv files within an jython script in Fiji?
>
> I couldn't find any fruitful functions in the Fiji API, however I must also
> admit, that I bare quite a little knowledge on the Deltavision dv file
> format.
>
> Thank you in advance for any hints and
>
> with best regards
>
> Dan
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Processing-DV-images-within-jython-script-tp5003084.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html